Skip to content
Snippets Groups Projects
Commit f27f2032 authored by Ladislav Lhotka's avatar Ladislav Lhotka
Browse files

Use new YANG lib schema (no "submodules").

parent aedb9f24
No related branches found
No related tags found
No related merge requests found
......@@ -18,14 +18,12 @@
"schema": "https://example.com/test.yang",
"namespace": "http://example.com/test",
"conformance-type": "implement",
"submodules": {
"submodule": [
{
"name": "subtest",
"revision": "2016-04-26"
}
]
}
"submodule": [
{
"name": "subtest",
"revision": "2016-04-26"
}
]
},
{
"name": "defs",
......
......@@ -63,8 +63,8 @@ class Context:
mod = cls._load_module(name, rev)
locpref = mod.find1("prefix", required=True).argument
cls.prefix_map[mid] = { locpref: mid }
if "submodules" in item and "submodule" in item["submodules"]:
for s in item["submodules"]["submodule"]:
if "submodule" in item:
for s in item["submodule"]:
sname = s["name"]
cls.ns_map[sname] = name
rev = s["revision"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment