Open VahidTa opened 2 years ago
This module contains only augments, an XML skeleton can be generated only if it is processed together with module(s) that are augmented by it – they provide the top-level part of the XML tree.
Thank you. But it is configuration part of the platform. So, is there any hint to provide XML configs with pyang for this type of YANG models?
No, the sample-xml-skeleton
can only work with a complete tree.
Is there any feature roadmap to support above usecase? Or is it a deadend using pyang for such usecase?
You could try including the modules that define the augmented nodes?
pyang Cisco-IOS-XR-aaa-locald-cfg.yang Cisco-IOS-XR-aaa-lib-cfg.yang Cisco-IOS-XR-aaa-protocol-radius-cfg.yang -f sample-xml-skeleton
Thank you @wlupton. Yes it worked! I think it is good idea to add this example into the documentation if there isn't any.
I suppose that the XML skeleton could include dummy entries for nodes in any augmented paths, and then could include the augments. This would be a bit more consistent with 'tree' behavior. @mbj4668 and @llhotka, do you think this would make sense? (Perhaps there'd have to be a new option to enable this behaviour in order to preserve backwards-compatibility.)
Hi, I tired to convert "Cisco-IOS-XR-aaa-protocol-radius-cfg.yang" model to xml with smaple-xml-skeleton feature, but it returns empty skeleton. I tested with tree option and it worked.
Regards, Vahid