ansible-collections / community.yang

Ansible Community Collection to support Yang in network devices.
GNU General Public License v3.0
10 stars 14 forks source link

Add module generate_argument_spec #65

Open jgroom33 opened 2 years ago

jgroom33 commented 2 years ago
SUMMARY

The current steps for developing a netconf ansible module in a collection is:

  1. Use resource_module_builder
  2. Choose YANG
  3. Examine/parse YANG
  4. Write json based argument_spec from selective YANG components
  5. Run resource_module_builder to generate module

NOTE: Steps 3-4 are currently simplified using community.yang.generate_spec and a schema generator

ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION

This would automate the step of generating the necessary argument_spec (Steps 3-4 above)

    - name: Generate argument_spec for foo yang
      community.yang.generate_argument_spec:
        file: foo.yang
        output:
          path: "schemas/foo.yang.json"
jgroom33 commented 2 years ago

is this being considered?