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),endpointand object attributes are given in by users in ansible playbook task. Object attributes are split into two module args:idwhere object identifiers like name, slug etc. forendpoint.get(**id)are given as k:v pairsattrswhere extra k:v pairs are given for creating or updating an objectError handling is done by backend
pynautobotand error message is returned in ansible taskmsgkey.Still TODO if these modules are welcomed: