Fix error loading existing IPAddress records from Nautobot 1.0.0, add ImageAttachment support, fix VirtualChassis master issue #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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 theCommand
class and callCommand.handle()
seems to fix this issue.ImageAttachment
records (inadvertently omitted) and the DeviceTypefront_image
andrear_image
fields.master
Device changes the device'svc_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 withvc_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'svc_position
to what it's meant to be, as well as associated test data.