-
Notifications
You must be signed in to change notification settings - Fork 237
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
Inventory improvements for nornir 3.0 #527
Conversation
Possibly dumb question(s)/statements for confirmation to make sure I'm understanding so I can update ansible bits accordingly:
but would need the auto_register method to be more like:
then anything with an entrypoint "group" of think thats all for now... im sure ill have more questions when I get back into playing around with it! |
Sorry, got caught up last couple of weeks and I haven't found the time to finish this PR and write about this. Let me show you an example:
So to answer specifically your questions:
|
Ah perfect, cool will try to get ansible updated shortly then! Thanks for the clarifications/examples, super helpful -- I'm sure I was just being dense with the registration thing, that nornir_utils repo looks like enough to make it all click for me and get me rolling, thanks! |
…ster_inventory_plugins
merged this one into 3.0.0 branch to avoid issues with future PRs but if someone has comments feel free to add them in this PR or open an issue and I will address them later |
For details go to https://github.com/nornir-automation/nornir/blob/register_inventory_plugins/docs/upgrading/2_to_3.rst
Not yet completed but figured I'd share progress
The main objective of this is:
As an example of an inventory plugin written in this new way:
https://github.com/nornir-automation/nornir/blob/register_inventory_plugins/tests/conftest.py#L22
It could be made shorter and more concise using things like
**h
but this is more explicit, easier to read and to troubleshoot. Also, note that inventory plugins no longer deal with dictionaries, they need to create the correct types and return an inventory.