Add Asset Tag to node label items (#712)
This commit is contained in:
@@ -15,6 +15,7 @@ class NodeLabelItems(ChoiceSet):
|
|||||||
LOCATION = 'location'
|
LOCATION = 'location'
|
||||||
RACK = 'rack'
|
RACK = 'rack'
|
||||||
VIRTUAL_CHASSIS = 'virtualchassis'
|
VIRTUAL_CHASSIS = 'virtualchassis'
|
||||||
|
ASSET_TAG = 'assettag'
|
||||||
|
|
||||||
CHOICES = [
|
CHOICES = [
|
||||||
(DEVICE_NAME, 'Device Name'),
|
(DEVICE_NAME, 'Device Name'),
|
||||||
@@ -31,4 +32,5 @@ class NodeLabelItems(ChoiceSet):
|
|||||||
(LOCATION, 'Location'),
|
(LOCATION, 'Location'),
|
||||||
(RACK, 'Rack'),
|
(RACK, 'Rack'),
|
||||||
(VIRTUAL_CHASSIS, 'Virtual Chassis'),
|
(VIRTUAL_CHASSIS, 'Virtual Chassis'),
|
||||||
|
(ASSET_TAG, 'Asset Tag'),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -247,6 +247,7 @@ def create_node(
|
|||||||
NodeLabelItems.LOCATION: getattr(device, 'location', None),
|
NodeLabelItems.LOCATION: getattr(device, 'location', None),
|
||||||
NodeLabelItems.RACK: getattr(device, 'rack', None),
|
NodeLabelItems.RACK: getattr(device, 'rack', None),
|
||||||
NodeLabelItems.VIRTUAL_CHASSIS: getattr(device, 'virtual_chassis', None),
|
NodeLabelItems.VIRTUAL_CHASSIS: getattr(device, 'virtual_chassis', None),
|
||||||
|
NodeLabelItems.ASSET_TAG: getattr(device, 'asset_tag', None),
|
||||||
}
|
}
|
||||||
|
|
||||||
label_items = []
|
label_items = []
|
||||||
|
|||||||
Reference in New Issue
Block a user