Raise error with unhandled parent type: case
In the file ietf-access-control-list.yang (https://github.com/YangModels/yang/blob/master/experimental/ietf/ACL-MODEL/ietf-access-control-list.yang) when I try to compile with pyangbind and Python 2, I get the error: File "/usr/local/Cellar/python3/3.4.2_1/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pyangbind-0.5.8-py3.4.egg/pyangbind/plugin/pybind.py", line 860, in get_children raise TypeError("unhandled keyword with children %s" % parent.keyword) TypeError: unhandled keyword with children case
This seems to be associated to the YANG section of the file (line 145) because if I remove the block starting in "choice ace-ip-version {" it compiles:
Entry.";
choice ace-type {
description
"Type of access list entry.";
case ace-ip {
description "IP Access List Entry.";
choice ace-ip-version {
description
"IP version used in this Access List Entry.";
case ace-ipv4 {
uses packet-fields:acl-ipv4-header-fields;
}
case ace-ipv6 {
uses packet-fields:acl-ipv6-header-fields;
}
}**
uses packet-fields:acl-ip-header-fields;
}
From what I can see pyangbind doesn't expect a parent of type "case". Is there any workaround?
Has there been any progress on this case? I have a juniper configuration.yang file that I'm trying to use and it fails with exactly the same error, the offending sequence is:
choice compute-node-identifier {
case case_1 {
leaf mac-address {
description "MAC address of the network boot interface";
junos:must "(\".. interfaces\")";
junos:must-message "Must specify management interface";
junos:must "(\".. .. local-management\")";
junos:must-message "Must specify compute cluster local-management";
junos:must "(unique \"services app-engine compute-cluster <*> compute-node <*> mac-address $$\")";
junos:must-message "MAC address must be unique across compute clusters";
junos:must "(\".. interfaces\")";
junos:must-message "Must specify management interface";
junos:must "(\".. .. local-management\")";
junos:must-message "Must specify compute cluster local-management";
junos:must "(unique \"services app-engine compute-cluster <*> compute-node <*> mac-address $$\")";
junos:must-message "MAC address must be unique across compute clusters";
type mac-addr;
}
}
Editing it is not really an option.
I confirm the same issue as above with the junos configuration module.
Possible fix in https://github.com/robshakir/pyangbind/pull/340
https://github.com/robshakir/pyangbind/pull/340 was merged and included in https://github.com/robshakir/pyangbind/releases/tag/0.8.5
Considering this issue fixed. Please re-open if not.