network-importer icon indicating copy to clipboard operation
network-importer copied to clipboard

ER: support NetBox device status assignment based on outcome

Open jeremyschulman opened this issue 6 years ago • 1 comments

When the network-importer (NI) tool processes a given device there are three general outcomes that could be used to assign the device state in NetBox:

  1. import process was successful
  2. import process failed to connect to device, therefore cannot import
  3. import process failed during the processing of the device

This ER proposes a change to the NI configuration file so that the User can identify the device status value (slug) that NI will assign upon those outcomes. The following is an example.

Note: the variable names (when_device_unreachable) are provided for example purposes only and could be different in the eventual implementation.

[netbox]
when_import_unreachable = "Offline"
when_import_fail = "Failed"
when_import_pass = "Active"

If any of these when variables are not provided, then the NI process will not modify the device status value; event when the import completes without error.

jeremyschulman avatar Jan 17 '20 14:01 jeremyschulman

Mostly done in #8 , need to also set Offline status when the primary IP is missing

dgarros avatar Jan 26 '20 19:01 dgarros