This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Add support for Device Lifecycle Plugin #101
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… create/update This should fix Issue #100. The Platform should not be the device model. It should be one for all Device Types and should be the Arista EOS platform. This fixes documentation and removes the errneous creation/update from tags.
Meant to put this on Platform.
…form creation Also removed verify_manufacturer method as it's no longer needed.
…and #95. I found that in an update run that the Nautobot adapter was returning no Devices. In my investigation it appears it was being caught in the try/except block for some AttributeError. I've refactored this to narrow down the block to just CustomField loading and have some logging if encountered.
The indentation was wrong causing the CF to be loaded repeatedly causing an ObjectAlreadyExists to be thrown.
I've ended up including some fixes for #93, #95, and #102 as I found that during an update run of the import Job that devices weren't being loaded during the Nautobot adapter load step. This appears to have been due to an AttributeError exception on the |
qduk
approved these changes
Oct 18, 2022
There was a problem hiding this 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR adds support for integrating with the Device Lifecycle plug-in requested in #87. It determines if the plug-in is installed by trying to import the SoftwareLCM model. If it can, it's determined to be installed and will thus create a Software Version and create a RelationshipAssocation between the Device and that Version. If the plug-in isn't found, it'll resort to the CustomField created from the tag. There's also a small fix for the platform bug described in #100.