1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add label to interface models

This commit is contained in:
Jonathan Senecal
2020-06-04 16:44:25 -04:00
parent 56f6698ba5
commit cde1db4436
3 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,23 @@
# Generated by Django 3.0.7 on 2020-06-04 20:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dcim', '0106_role_default_color'),
]
operations = [
migrations.AddField(
model_name='interface',
name='label',
field=models.CharField(blank=True, max_length=64),
),
migrations.AddField(
model_name='interfacetemplate',
name='label',
field=models.CharField(blank=True, max_length=64),
),
]

View File

@ -263,6 +263,11 @@ class InterfaceTemplate(ComponentTemplateModel):
max_length=100,
blank=True
)
label = models.CharField(
max_length=64,
blank=True,
help_text="The physical label for this interface"
)
type = models.CharField(
max_length=50,
choices=InterfaceTypeChoices

View File

@ -605,6 +605,11 @@ class Interface(CableTermination, ComponentModel):
max_length=100,
blank=True
)
label = models.CharField(
max_length=64,
blank=True,
help_text="The physical label for this interface"
)
_connected_interface = models.OneToOneField(
to='self',
on_delete=models.SET_NULL,