mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
530 stars 342 forks source link

pyang doesn't implement sx:augment-structure (RFC 8791, ietf-yang-structure-ext) #851

Open predi opened 1 year ago

predi commented 1 year ago

pyang/plugins/structure.py only registers the extension keyword and its grammar but doesn't actually implement sx:structure augmentation.

There's a

## FIXME: validate augment-structure

comment in structure.py that should be resolved.

This could be implemented much easier if not done in form of a plugin. It is essentially a YANG "augment" statement that targets a specialized schema/data node. The majority of implementation could probably be shared with that for "augment", most notably statements.v_expand_2_augment(...) in expand_2 phase of validation.

Related to: https://github.com/mbj4668/pyang/issues/719 and https://github.com/mbj4668/pyang/issues/516