Add Asset Tag to node label items (#712)
This commit is contained in:
@@ -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'),
|
||||
]
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user