Skip to content

Add nornir_args argument to NornirNutsContext - #141

Open
hvanderheide wants to merge 1 commit into
network-unit-testing-system:mainfrom
hvanderheide:nornir-parameters
Open

Add nornir_args argument to NornirNutsContext#141
hvanderheide wants to merge 1 commit into
network-unit-testing-system:mainfrom
hvanderheide:nornir-parameters

Conversation

@hvanderheide

Copy link
Copy Markdown

By setting the nornir_args argument in NornirNutsContext's initialize method, the user gets access to the InitNornir arguments. This can be used for more efficient filtering for example.

My use-case has NUTS hooked into Netbox with the nornir_netbox plugin. By adding a --site pytest argument and setting the value in the filter_paramers of the inventory options, I scope my tests to a specific site, and avoid downloading the complete Netbox database on each run.

I took me a while to figure out this solution, but the change is simple. Maybe too simple. Happy to hear your thoughts.

By setting the nornir_args argument in NornirNutsContext's initialize method, the user gets access to the InitNornir arguments. This can be used for more efficient filtering for example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant