Missing extensions within augmented node
Hey,
I recently tried to use my custom extension to mark some of containers/leaf with custom meta-data.
In order to do this I've used extension statement, as follows:
prefix a;
extension some-ext {
argument "x";
}
augment "/x:path/x:to/x:container-or-leaf" {
a:some-ext "Some additional description within extension";
}
pyang parses models without any warnings, however, I'm not not able to access extension statement directly from augmented node.
All of the extensions, augments seems to be parsed correctly due to is_grammar_valid flags at Statement objects.
Should it be considered as a bug ?
IMHO - augmented node should contain provided extension under substatements, the same as it is done for regular leafs/.. data nodes.
Best Regards, Rafał
I've found that I can enable specific augmentations one by one.
Example below:
from pyang.statements import add_copy_augment_keyword
add_copy_augment_keyword(('model', 'extension-name'))
Hi Rafal @rszwedowski
You said that pyang parses models without any warnings, But I checked your model like below:
module a {
namespace "urn:a";
prefix a;
extension some-ext {
argument x;
}
augment "/x:path/x:to/x:container-or-leaf" {
a:some-ext "Some additional description within extension";
}
}
pyang reported: a.yang:10: error: prefix "x" is not defined (reported only once)
Maybe I don't catch your opinion. Which version are you using?