If the management interface of the device cannot be found (due to NAT or other circumstances meaning that the management IP doesn't exist on the device), instead of failing with an exception, create a placeholder interface and IP prefix.
By default this interface is named "PLACEHOLDER" and the prefix length is 0, but these are configurable in the plugin settings.
Added an admin view for inspecting OnboardingTasks in detail, including editing and deleting them. We should still provide a non-admin view (UI/API) for deleting completed tasks, IMHO (#26).
Fixed several bugs in onboard.py
We weren't updating the OnboardingTask's platform reference when we discovered or created the Platform.
When looking for existing Manufacturer and DeviceType objects or creating new ones if none are found, use a lower-case slug string.
We weren't updating the OnboardingTask's device_type string when we discovered or created the DeviceType.
The OnboardingTask model has no field named device; it does however have a field named created_device, so make sure we're using that one instead.
I encountered a timing issue where the RQ worker was trying to look up the OnboardingTask before it was actually present in the database, resulting in a failure and the OnboardingTask never being handled. As a (temporary?) fix, I've added a one-second sleep and retry when this case is encountered, which has fixed the issue in my environment.
0
, but these are configurable in the plugin settings.onboard.py
platform
reference when we discovered or created the Platform.slug
string.device_type
string when we discovered or created the DeviceType.device
; it does however have a field namedcreated_device
, so make sure we're using that one instead.