Add Asset Tag to node label items (#712)

This commit is contained in:
Mario
2026-03-10 10:13:04 +01:00
committed by GitHub
parent d10ced8157
commit 3d97f649d9
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -15,6 +15,7 @@ class NodeLabelItems(ChoiceSet):
LOCATION = 'location'
RACK = 'rack'
VIRTUAL_CHASSIS = 'virtualchassis'
ASSET_TAG = 'assettag'
CHOICES = [
(DEVICE_NAME, 'Device Name'),
@@ -31,4 +32,5 @@ class NodeLabelItems(ChoiceSet):
(LOCATION, 'Location'),
(RACK, 'Rack'),
(VIRTUAL_CHASSIS, 'Virtual Chassis'),
(ASSET_TAG, 'Asset Tag'),
]
+1
View File
@@ -247,6 +247,7 @@ def create_node(
NodeLabelItems.LOCATION: getattr(device, 'location', None),
NodeLabelItems.RACK: getattr(device, 'rack', None),
NodeLabelItems.VIRTUAL_CHASSIS: getattr(device, 'virtual_chassis', None),
NodeLabelItems.ASSET_TAG: getattr(device, 'asset_tag', None),
}
label_items = []