mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Cleanup for #7854
This commit is contained in:
@@ -1113,7 +1113,7 @@ class VirtualDeviceContext(PrimaryModel):
|
||||
choices=VirtualDeviceContextStatusChoices,
|
||||
)
|
||||
identifier = models.PositiveSmallIntegerField(
|
||||
help_text='Unique identifier provided by the platform being virtualized (Example: Nexus VDC Identifier)',
|
||||
help_text='Numeric identifier unique to the parent device',
|
||||
blank=True,
|
||||
null=True,
|
||||
)
|
||||
@@ -1163,6 +1163,9 @@ class VirtualDeviceContext(PrimaryModel):
|
||||
def get_absolute_url(self):
|
||||
return reverse('dcim:virtualdevicecontext', kwargs={'pk': self.pk})
|
||||
|
||||
def get_status_color(self):
|
||||
return VirtualDeviceContextStatusChoices.colors.get(self.status)
|
||||
|
||||
@property
|
||||
def primary_ip(self):
|
||||
if ConfigItem('PREFER_IPV4')() and self.primary_ip4:
|
||||
|
Reference in New Issue
Block a user