Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic module generation from OpenAPI spec? #357

Open
glennmatthews opened this issue Jun 18, 2024 · 1 comment
Open

Automatic module generation from OpenAPI spec? #357

glennmatthews opened this issue Jun 18, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed status: accepted This issue has been accepted by the maintainers team for implementation type: enhancement

Comments

@glennmatthews
Copy link

ISSUE TYPE
  • Feature Idea
SUMMARY

When Nautobot adds new data models and new REST API endpoints in support of those models, nautobot-ansible currently must be manually updated to add new modules (#282, #288, etc.). Similarly, when new fields are added to existing models/endpoints, or even just if some fields were missed in the initial implementation, manual updates are also needed (#273, #275, etc.).

Since ultimately these modules are a "wrapper" around the Nautobot REST API, it seems like it should be possible to (at least in large part) automatically generate module definitions based on Nautobot's REST API OpenAPI schema. A relatively small amount of automation in this area could greatly reduce the amount of manual effort needed to update and maintain these modules.

Possible inspiration:

@jvanderaa jvanderaa added status: accepted This issue has been accepted by the maintainers team for implementation help wanted Extra attention is needed labels Jul 17, 2024
@jvanderaa
Copy link
Contributor

There is one aspect of providing the modules with the capabilities to interact with the REST API. But I find more value in providing the capability to simplify the needed components in the playbook. By providing a single module that handles all of the device information. So you can provide a device with:

device:
  name:
  interfaces:
  ip_addresses:
  primary_ip:
  tags
  manufacturer:
  model:
  location

Then from there if there are multiple API calls needed to make it happen, that it just happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed status: accepted This issue has been accepted by the maintainers team for implementation type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants