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

Fix error loading existing IPAddress records from Nautobot 1.0.0, add ImageAttachment support, fix VirtualChassis master issue #43

Merged
merged 5 commits into from
Apr 29, 2021

Conversation

glennmatthews
Copy link
Contributor

@glennmatthews glennmatthews commented Apr 28, 2021

nautobot/nautobot#246 made some slight changes to the IPAM model API in Nautobot 1.0.0b4 and later, and the importer needs to be updated to handle those changes without errors.

Additionally:

  • Calling the import_netbox_json command directly seems to sometimes bypass the test database and instead use any pre-existing database in the development container (such as might have been manually populated during development and manual testing). Changing the test approach to instantiate the Command class and call Command.handle() seems to fix this issue.
  • Update poetry.lock so that the default test environment is now using Nautobot 1.0.0 instead of 1.0.0b3 (eventually we will want to add a test matrix for Travis)
  • Add support for ImageAttachment records (inadvertently omitted) and the DeviceType front_image and rear_image fields.
  • Nautobot 1.0.0 has a behavior (bug?) where creating a VirtualChassis with an assigned master Device changes the device's vc_position to 1, regardless of what it was previously set to. This can cause data validation errors since there may be a different device associated with vc_position 1 in the same VirtualChassis. I believe this should be fixed in Nautobot, but in the meantime, I'm adding logic in this plugin to restore the VirtualChassis master device's vc_position to what it's meant to be, as well as associated test data.

@glennmatthews glennmatthews added the bug Something isn't working label Apr 28, 2021
@glennmatthews glennmatthews changed the title Fix error importing existing IPAddress records from Nautobot 1.0.0 Fix error loading existing IPAddress records from Nautobot 1.0.0 Apr 29, 2021
@glennmatthews glennmatthews changed the title Fix error loading existing IPAddress records from Nautobot 1.0.0 Fix error loading existing IPAddress records from Nautobot 1.0.0, add ImageAttachment support, fix VirtualChassis master issue Apr 29, 2021
Copy link

@carbonarok carbonarok left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants