Allow interface mode to be null (for routed interfaces)

This commit is contained in:
Jeremy Stretch
2018-01-25 11:45:12 -05:00
parent 9a6a479452
commit 4a57a554da
3 changed files with 10 additions and 7 deletions

View File

@@ -1308,7 +1308,11 @@ class Interface(models.Model):
help_text="This interface is used only for out-of-band management"
)
description = models.CharField(max_length=100, blank=True)
mode = models.PositiveSmallIntegerField(choices=IFACE_MODE_CHOICES, default=IFACE_MODE_ACCESS)
mode = models.PositiveSmallIntegerField(
choices=IFACE_MODE_CHOICES,
blank=True,
null=True
)
untagged_vlan = models.ForeignKey(
to='ipam.VLAN',
null=True,