Commit 509c6a71 authored by Ladislav Lhotka's avatar Ladislav Lhotka

Add test script.

parent d83d79b1
from yangson.datamodel import DataModel
DataModel.module_dir = "/Users/lhotka/Projects/jetconf/yang"
with open("/Users/lhotka/Projects/jetconf/data/yang-library-data.json",
encoding="utf-8") as infile:
txt = infile.read()
dm = DataModel.from_yang_library(txt)
nacm = dm.get_schema_node("/ietf-netconf-acm:nacm")
print(nacm.default_deny)
rpcname = dm.get_data_node("/ietf-netconf-acm:nacm/rule-list/rule/rpc-name")
print(rpcname)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment