diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2020-02-04 16:32:02 -0500 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2020-02-04 16:32:02 -0500 |
commit | 5725c6d5d3bbd7ad97011b84d6bd4aa9bd6b8ab6 (patch) | |
tree | 29890953a09cdbaaa7b8c6542ba2f506a1f82bb2 /src/resource_inventory | |
parent | 078273eb7db5a481a4131d44a943f3c9e34b6b88 (diff) |
Updates Interface Models
Removes a redundant name field and adds an
explicit ForeignKey mapping between Interface
and InterfaceProfile
Change-Id: I3472ef53b889d8d5557e4f083a15940c2022877d
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/resource_inventory')
-rw-r--r-- | src/resource_inventory/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py index d152698..d4b8e83 100644 --- a/src/resource_inventory/models.py +++ b/src/resource_inventory/models.py @@ -429,9 +429,9 @@ class Interface(models.Model): id = models.AutoField(primary_key=True) mac_address = models.CharField(max_length=17) bus_address = models.CharField(max_length=50) - name = models.CharField(max_length=100, default="eth0") config = models.ManyToManyField(Vlan) host = models.ForeignKey(Host, on_delete=models.CASCADE, related_name='interfaces') + profile = models.ForeignKey(InterfaceProfile, on_delete=models.CASCADE) def __str__(self): return self.mac_address + " on host " + str(self.host) |