corenova / yang-js

YANG parser and composer
Apache License 2.0
56 stars 18 forks source link

When a module tries to augment same node, error is thrown #61

Closed sindhukothe closed 7 years ago

sindhukothe commented 7 years ago

Seems like it is a standard practice in yangs (e.g. open-config yang: https://github.com/openconfig/public/blob/master/release/models/interfaces/openconfig-if-ip.yang) to augment the same node multiple times. The spec did not mention anything in this regard. But the parser throws the following error: ExpressionError: [module(openconfig-if-ip)] constraint violation for 'augment /oc-if:interfaces/oc-if:interface/oc-if:subinterfaces/oc-if:subinterface' - already defined

sekur commented 7 years ago

Hmm... interesting.

OK, we can allow duplicate arg values if the element is not a configuration node statement such as container, leaf, etc...

sekur commented 7 years ago

fixed in develop

sekur commented 7 years ago

closing, please re-open if issue persists.