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

Migrate to Nornir 3.x and refactor inventory to support multiple SOT #205

Merged
merged 13 commits into from
May 10, 2021

Conversation

dgarros
Copy link
Contributor

@dgarros dgarros commented May 10, 2021

This PR is refactoring how the project is managing the inventory to allow multiple inventories to coexist.
In the process, I upgraded Nornir to the latest version.

I moved the inventory for Netbox IN network_importer.adapters.netbox_api and I created a similar inventory for Nautobot as well.

Also, I started to remove the license at the top of some files to align with other NTC projects but I haven't checked all files.

I think we should be good to merge this PR into add_nautobot when the tests are passing but here is a list of TODO that we need to address before merging into develop:

  • Add unit tests for Nautobot inventory
  • Add integration tests for Nautobot
  • Update the documentation with the latest changes regarding the inventory
  • Remove the reference to the license from all files, to align with other NTC project

Configuration File Changes

[inventory]

  • fqdn, filter and use_primary_ip have been removed from the inventory section, these settings are now part of the NetboxAPIInventory settings
  • supported_platforms has been moved to the inventory section, it was previously under [netbox]
  • a new section [inventory.settings] is available and everything in this section will be passed to the inventory class at runtime. This allow each inventory to define and validate its own settings.

[netbox] & [nautobot]

Both sections have been removed from the main configuration and are now defined within each adapter under network_importer.adapters.ADAPTER_NAME.settings

[adapters]

  • network_params has been renamed to network_settings
  • sot_params has been renamed to sot_settings

@dgarros dgarros requested a review from jvanderaa May 10, 2021 14:26
Copy link
Contributor

@jvanderaa jvanderaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor update that would not be harmful to merge in.

network_importer/adapters/nautobot_api/inventory.py Outdated Show resolved Hide resolved
@dgarros dgarros merged commit d5a1e5f into add_nautobot May 10, 2021
@dgarros dgarros deleted the gda-nautobot-inventory branch May 10, 2021 21:28
@dgarros dgarros mentioned this pull request Jul 19, 2021
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.

2 participants