1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
This commit is contained in:
jeremystretch
2022-11-15 11:24:36 -05:00
parent 640fd8045d
commit 6f8a7fdbe3
10 changed files with 82 additions and 43 deletions

View File

@@ -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: