-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add plugins module. #203
Add plugins module. #203
Conversation
036a2a7
to
05e304a
Compare
Loving what I'm seeing here. The only thing I'm not quite sure on yet is the |
This part identifies an object. We can have, If you don't like |
I also like the idea here, thanks. This seems like something that should definitely be included. I also don't like just
Lastly, can we possibly add a test to make sure we can account for nested plugin endpoints like we did for pynautobot? That may require adding the |
Thanks for the comment @joewesch. I like that. 👍 |
I don't think we need that, as data-validation plugin has been standardized in the latest release 2.0. |
Proposal of dynamic plugins module.
This approach for plugins is slightly different than nautobot core modules, which have all endpoints statically added in the code. Looking at the variety of plugins/apps ecosystem I think that following the same patterns for plugins endpoints (a module for each endpoint) would be impractical, tedious to develop and hard to maintain in the future.
This proposal assumes that,
plugin
(pluginbase_url
),endpoint
and object attributes are given in by users in ansible playbook task. Object attributes are split into two module args:id
where object identifiers like name, slug etc. forendpoint.get(**id)
are given as k:v pairsattrs
where extra k:v pairs are given for creating or updating an objectError handling is done by backend
pynautobot
and error message is returned in ansible taskmsg
key.Still TODO if these modules are welcomed: