diff --git a/netbox_topology_views/choices.py b/netbox_topology_views/choices.py index 5409fdb..3a48507 100644 --- a/netbox_topology_views/choices.py +++ b/netbox_topology_views/choices.py @@ -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'), ] diff --git a/netbox_topology_views/views.py b/netbox_topology_views/views.py index 0da90ee..457cc1e 100644 --- a/netbox_topology_views/views.py +++ b/netbox_topology_views/views.py @@ -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 = []