Merge pull request #8321 from jasonyates/8279-vc-rack-view

Fixes #8279 - No virtual chassis name in rack view
This commit is contained in:
Jeremy Stretch 2022-01-11 16:25:50 -05:00 committed by GitHub
commit f49272cacb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,12 @@ __all__ = (
def get_device_name(device):
return device.name or str(device.device_type)
if device.virtual_chassis:
return f'{device.virtual_chassis.name}:{device.vc_position}'
elif device.name:
return device.name
else:
return str(device.device_type)
class RackElevationSVG: