Validates json configuration against yang data model and convert it to xml.
- This plugin lookups the input json configuration, validates it against the respective yang data model which is also given as input to this plugin and coverts it to xml format which can be used as payload within Netconf rpc.
- name: translate json to xml
debug: msg="{{ lookup('yang_json2xml', config_json,
yang_file='openconfig/public/release/models/interfaces/openconfig-interfaces.yang',
search_path='openconfig/public/release/models:pyang/modules/') }}"
Common return values are documented here, the following are the fields unique to this lookup:
Key | Returned | Description |
---|---|---|
_raw
-
|
The translated xml string from json
|
- Ganesh Nalawade (@ganeshrn)
Hint
Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.