generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
SUMMARY
Currently the file option for get,configure and generate_spec modules accept a list of yang files that are required for converting JSON data to XML data and reverse. However, identifying the list of required yang files currently is based on going through yang files and identifying which all files in the given directory have imported the main yang file.
To help solve this the lookup plugin can accept the main yang model file path and an optional path to look for yang files that import the given main yang model. If the path is not provided look for all yang files in the current directory to identify which all yang models have imported the given yang model and return a list of yang files.
Example usage:
- name: get list of yang files which are depedent on openconfig-interfaces yang model
set_fact:
oc_yang_files: "{{ lookup('~/yang_files/openconfig-interfaces.yang')}}"
- name: get list of yang files which are depedent on openconfig-interfaces yang model with optional search path for yang files
set_fact:
oc_yang_files: "{{ lookup('~/yang_files/openconfig-interfaces.yang', search_path='~/cisco/xr/yang')}}"
ISSUE TYPE
- Feature Idea
COMPONENT NAME
ADDITIONAL INFORMATION
Metadata
Metadata
Assignees
Labels
No labels