Discovered Device Classification¶
A Discovered Device Classification stores the pre-computed Location, Role, and Tenant classifications for a Not Imported DiscoveredDevice. Records are written automatically by the classification engine after each discovery scan or rule change, and deleted automatically when the device transitions to any other inventory status.
Fields¶
discovered_device(one-to-one): TheDiscoveredDevicethis classification belongs to.location(foreign key): Matched Nautobot Location (optional).location_device_classification_rule(foreign key): TheDeviceClassificationRulethat produced the Location match (optional).location_match_reason(string): Human-readable explanation of the Location match.role(foreign key): Matched Nautobot Role (optional).role_device_classification_rule(foreign key): TheDeviceClassificationRulethat produced the Role match (optional).role_match_reason(string): Human-readable explanation of the Role match.tenant(foreign key): Matched Nautobot Tenant (optional).tenant_device_classification_rule(foreign key): TheDeviceClassificationRulethat produced the Tenant match (optional).tenant_match_reason(string): Human-readable explanation of the Tenant match.created(datetime): Timestamp of when the record was first created (auto-set).last_updated(datetime): Timestamp of the last save (auto-set).
Behavior¶
- A
DiscoveredDeviceClassificationcan only exist for devices with status Not Imported. Saving one for a device with any other status raises a validation error. - Each target (Location, Role, Tenant) is classified independently — a device may have some targets matched and others left blank.
- When the associated
DiscoveredDevicetransitions to any status other than Not Imported, its classification record is deleted automatically.