* Change termination type name to model * change CHOICES to model names * Change termination type name to model * change CHOICES to model names
This commit is contained in:
@@ -331,12 +331,12 @@ class PowerFeedCoordinate(NetBoxModel):
|
|||||||
class IndividualOptions(NetBoxModel):
|
class IndividualOptions(NetBoxModel):
|
||||||
CHOICES = (
|
CHOICES = (
|
||||||
('interface', 'interface'),
|
('interface', 'interface'),
|
||||||
('front port', 'front port'),
|
('frontport', 'frontport'),
|
||||||
('rear port', 'rear port'),
|
('rearport', 'rearport'),
|
||||||
('power outlet', 'power outlet'),
|
('poweroutlet', 'poweroutlet'),
|
||||||
('power port', 'power port'),
|
('powerport', 'powerport'),
|
||||||
('console port', 'console port'),
|
('consoleport', 'consoleport'),
|
||||||
('console server port', 'console server port'),
|
('consoleserverport', 'consoleserverport'),
|
||||||
)
|
)
|
||||||
|
|
||||||
user_id = models.IntegerField(
|
user_id = models.IntegerField(
|
||||||
|
|||||||
@@ -560,11 +560,11 @@ def get_topology_data(
|
|||||||
).select_related("termination_type")
|
).select_related("termination_type")
|
||||||
|
|
||||||
for link in links:
|
for link in links:
|
||||||
if link.termination_type.name in ignore_cable_type:
|
if link.termination_type.model in ignore_cable_type:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Normal device cables
|
# Normal device cables
|
||||||
if link.termination_type.name in supported_termination_types:
|
if link.termination_type.model in supported_termination_types:
|
||||||
complete_link = False
|
complete_link = False
|
||||||
if link.cable_end == "A":
|
if link.cable_end == "A":
|
||||||
if link.cable_id not in cable_ids:
|
if link.cable_id not in cable_ids:
|
||||||
|
|||||||
Reference in New Issue
Block a user