-
Notifications
You must be signed in to change notification settings - Fork 11
Description
I encountered some issues while trying to add the ietf-routing yang model and the is-is yang model from draft-litkowski-netmod-isis-cfg-00. You can find the particular yang files here:
https://raw.githubusercontent.com/cfra/mand/master/yang/specs/ietf-routing@2014-05-24.yang
https://raw.githubusercontent.com/cfra/mand/master/yang/specs/ietf-ipv4-unicast-routing@2014-05-24.yang
https://raw.githubusercontent.com/cfra/mand/master/yang/specs/ietf-ipv6-unicast-routing@2014-05-25.yang
https://raw.githubusercontent.com/cfra/mand/master/yang/specs/isis@2014-06-11.yang
Trying to add these files, I get the following error output from the pyang invocation that happens as part of the build process:
pyang --plugindir ../yang/pyang_plugin/ -p ../yang/specs -f OpenCPE ../yang/specs/.yang
Traceback (most recent call last):
File "/usr/local/bin/pyang", line 333, in
run()
File "/usr/local/bin/pyang", line 318, in run
emit_obj.emit(ctx, modules, fd)
File "../yang/pyang_plugin/OpenCPE.py", line 40, in emit
emit_tree(modules, fd)
File "../yang/pyang_plugin/OpenCPE.py", line 124, in emit_tree
print_children(chs, module, typedefs, groupings, augments, deviations, annotations, fd)
File "../yang/pyang_plugin/OpenCPE.py", line 196, in print_children
print_node(ch, module, typedefs, groupings, augments, deviations, annotations, fd, child_write_access)
File "../yang/pyang_plugin/OpenCPE.py", line 203, in print_node
print_children(chs, module, typedefs, groupings, augments, deviations, annotations, fd, write_access)
File "../yang/pyang_plugin/OpenCPE.py", line 196, in print_children
print_node(ch, module, typedefs, groupings, augments, deviations, annotations, fd, child_write_access)
File "../yang/pyang_plugin/OpenCPE.py", line 203, in print_node
print_children(chs, module, typedefs, groupings, augments, deviations, annotations, fd, write_access)
File "../yang/pyang_plugin/OpenCPE.py", line 196, in print_children
print_node(ch, module, typedefs, groupings, augments, deviations, annotations, fd, child_write_access)
File "../yang/pyang_plugin/OpenCPE.py", line 203, in print_node
print_children(chs, module, typedefs, groupings, augments, deviations, annotations, fd, write_access)
File "../yang/pyang_plugin/OpenCPE.py", line 196, in print_children
print_node(ch, module, typedefs, groupings, augments, deviations, annotations, fd, child_write_access)
File "../yang/pyang_plugin/OpenCPE.py", line 229, in print_node
fd.write(2_tab + "{ .flags = IDX_UNIQUE, .type = " + c_types[key_leafs[key.arg]] + ", .element = " + "field" + name + "_" + key.arg + " },\n")
KeyError: 'address-family'