|
|
@@ -285,7 +285,7 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport1 = FrontPort.objects.create(device=self.device, name='Front Port 1')
|
|
|
|
frontport1 = FrontPort.objects.create(device=self.device, name='Front Port 1')
|
|
|
|
PortAssignment.objects.create(
|
|
|
|
PortAssignment.objects.create(
|
|
|
|
front_port=frontport1,
|
|
|
|
front_port=frontport1,
|
|
|
|
front_port_position=1,
|
|
|
|
front_port_position=None,
|
|
|
|
rear_port=rearport1,
|
|
|
|
rear_port=rearport1,
|
|
|
|
rear_port_position=1
|
|
|
|
rear_port_position=1
|
|
|
|
)
|
|
|
|
)
|
|
|
@@ -348,7 +348,7 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport1 = FrontPort.objects.create(device=self.device, name='Front Port 1')
|
|
|
|
frontport1 = FrontPort.objects.create(device=self.device, name='Front Port 1')
|
|
|
|
PortAssignment.objects.create(
|
|
|
|
PortAssignment.objects.create(
|
|
|
|
front_port=frontport1,
|
|
|
|
front_port=frontport1,
|
|
|
|
front_port_position=1,
|
|
|
|
front_port_position=None,
|
|
|
|
rear_port=rearport1,
|
|
|
|
rear_port=rearport1,
|
|
|
|
rear_port_position=1
|
|
|
|
rear_port_position=1
|
|
|
|
)
|
|
|
|
)
|
|
|
@@ -417,16 +417,16 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport2_2 = FrontPort.objects.create(device=self.device, name='Front Port 2:2')
|
|
|
|
frontport2_2 = FrontPort.objects.create(device=self.device, name='Front Port 2:2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1_1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_2, front_port_position=1, rear_port=rearport1, rear_port_position=2,
|
|
|
|
front_port=frontport1_2, front_port_position=None, rear_port=rearport1, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_1, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2_1, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_2, front_port_position=1, rear_port=rearport2, rear_port_position=2,
|
|
|
|
front_port=frontport2_2, front_port_position=None, rear_port=rearport2, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -541,16 +541,16 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport2_2 = FrontPort.objects.create(device=self.device, name='Front Port 2:2')
|
|
|
|
frontport2_2 = FrontPort.objects.create(device=self.device, name='Front Port 2:2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1_1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_2, front_port_position=1, rear_port=rearport1, rear_port_position=2,
|
|
|
|
front_port=frontport1_2, front_port_position=None, rear_port=rearport1, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_1, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2_1, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_2, front_port_position=1, rear_port=rearport2, rear_port_position=2,
|
|
|
|
front_port=frontport2_2, front_port_position=None, rear_port=rearport2, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -711,22 +711,22 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport4_2 = FrontPort.objects.create(device=self.device, name='Front Port 4:2')
|
|
|
|
frontport4_2 = FrontPort.objects.create(device=self.device, name='Front Port 4:2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1_1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_2, front_port_position=1, rear_port=rearport1, rear_port_position=2,
|
|
|
|
front_port=frontport1_2, front_port_position=None, rear_port=rearport1, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3, front_port_position=1, rear_port=rearport3, rear_port_position=1,
|
|
|
|
front_port=frontport3, front_port_position=None, rear_port=rearport3, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4_1, front_port_position=1, rear_port=rearport4, rear_port_position=1,
|
|
|
|
front_port=frontport4_1, front_port_position=None, rear_port=rearport4, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4_2, front_port_position=1, rear_port=rearport4, rear_port_position=2,
|
|
|
|
front_port=frontport4_2, front_port_position=None, rear_port=rearport4, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -839,28 +839,28 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport4_2 = FrontPort.objects.create(device=self.device, name='Front Port 4:2')
|
|
|
|
frontport4_2 = FrontPort.objects.create(device=self.device, name='Front Port 4:2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1_1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_2, front_port_position=1, rear_port=rearport1, rear_port_position=2,
|
|
|
|
front_port=frontport1_2, front_port_position=None, rear_port=rearport1, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_1, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2_1, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_2, front_port_position=1, rear_port=rearport2, rear_port_position=2,
|
|
|
|
front_port=frontport2_2, front_port_position=None, rear_port=rearport2, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3_1, front_port_position=1, rear_port=rearport3, rear_port_position=1,
|
|
|
|
front_port=frontport3_1, front_port_position=None, rear_port=rearport3, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3_2, front_port_position=1, rear_port=rearport3, rear_port_position=2,
|
|
|
|
front_port=frontport3_2, front_port_position=None, rear_port=rearport3, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4_1, front_port_position=1, rear_port=rearport4, rear_port_position=1,
|
|
|
|
front_port=frontport4_1, front_port_position=None, rear_port=rearport4, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4_2, front_port_position=1, rear_port=rearport4, rear_port_position=2,
|
|
|
|
front_port=frontport4_2, front_port_position=None, rear_port=rearport4, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -966,28 +966,28 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
interface3 = Interface.objects.create(device=self.device, name='Interface 3')
|
|
|
|
interface3 = Interface.objects.create(device=self.device, name='Interface 3')
|
|
|
|
interface4 = Interface.objects.create(device=self.device, name='Interface 4')
|
|
|
|
interface4 = Interface.objects.create(device=self.device, name='Interface 4')
|
|
|
|
rearport1 = RearPort.objects.create(device=self.device, name='Rear Port 1', positions=4)
|
|
|
|
rearport1 = RearPort.objects.create(device=self.device, name='Rear Port 1', positions=4)
|
|
|
|
rearport2 = RearPort.objects.create(device=self.device, name='Rear Port 5')
|
|
|
|
rearport2 = RearPort.objects.create(device=self.device, name='Rear Port 2')
|
|
|
|
rearport3 = RearPort.objects.create(device=self.device, name='Rear Port 2', positions=4)
|
|
|
|
rearport3 = RearPort.objects.create(device=self.device, name='Rear Port 3', positions=4)
|
|
|
|
frontport1_1 = FrontPort.objects.create(device=self.device, name='Front Port 1:1')
|
|
|
|
frontport1_1 = FrontPort.objects.create(device=self.device, name='Front Port 1:1')
|
|
|
|
frontport1_2 = FrontPort.objects.create(device=self.device, name='Front Port 1:2')
|
|
|
|
frontport1_2 = FrontPort.objects.create(device=self.device, name='Front Port 1:2')
|
|
|
|
frontport2 = FrontPort.objects.create(device=self.device, name='Front Port 5')
|
|
|
|
frontport2 = FrontPort.objects.create(device=self.device, name='Front Port 2')
|
|
|
|
frontport3_1 = FrontPort.objects.create(device=self.device, name='Front Port 2:1')
|
|
|
|
frontport3_1 = FrontPort.objects.create(device=self.device, name='Front Port 3:1')
|
|
|
|
frontport3_2 = FrontPort.objects.create(device=self.device, name='Front Port 2:2')
|
|
|
|
frontport3_2 = FrontPort.objects.create(device=self.device, name='Front Port 3:2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1_1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_2, front_port_position=1, rear_port=rearport1, rear_port_position=2,
|
|
|
|
front_port=frontport1_2, front_port_position=None, rear_port=rearport1, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3_1, front_port_position=1, rear_port=rearport3, rear_port_position=1,
|
|
|
|
front_port=frontport3_1, front_port_position=None, rear_port=rearport3, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3_2, front_port_position=1, rear_port=rearport3, rear_port_position=2,
|
|
|
|
front_port=frontport3_2, front_port_position=None, rear_port=rearport3, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -1025,6 +1025,8 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
b_terminations=[rearport3]
|
|
|
|
b_terminations=[rearport3]
|
|
|
|
)
|
|
|
|
)
|
|
|
|
cable4.save()
|
|
|
|
cable4.save()
|
|
|
|
|
|
|
|
for path in CablePath.objects.all():
|
|
|
|
|
|
|
|
print(path.path_objects)
|
|
|
|
self.assertPathExists(
|
|
|
|
self.assertPathExists(
|
|
|
|
(
|
|
|
|
(
|
|
|
|
interface1, cable1, frontport1_1, rearport1, cable3, frontport2, rearport2,
|
|
|
|
interface1, cable1, frontport1_1, rearport1, cable3, frontport2, rearport2,
|
|
|
@@ -1082,10 +1084,10 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport1_2 = FrontPort.objects.create(device=self.device, name='Front Port 1:2')
|
|
|
|
frontport1_2 = FrontPort.objects.create(device=self.device, name='Front Port 1:2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1_1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_2, front_port_position=1, rear_port=rearport1, rear_port_position=2,
|
|
|
|
front_port=frontport1_2, front_port_position=None, rear_port=rearport1, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -1151,7 +1153,7 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
rearport2 = RearPort.objects.create(device=self.device, name='Rear Port 2')
|
|
|
|
rearport2 = RearPort.objects.create(device=self.device, name='Rear Port 2')
|
|
|
|
frontport1 = FrontPort.objects.create(device=self.device, name='Front Port 1')
|
|
|
|
frontport1 = FrontPort.objects.create(device=self.device, name='Front Port 1')
|
|
|
|
PortAssignment.objects.create(
|
|
|
|
PortAssignment.objects.create(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# Create cables
|
|
|
|
# Create cables
|
|
|
@@ -1469,16 +1471,16 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport2_2 = FrontPort.objects.create(device=self.device, name='Front Port 2:2')
|
|
|
|
frontport2_2 = FrontPort.objects.create(device=self.device, name='Front Port 2:2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1_1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_2, front_port_position=1, rear_port=rearport1, rear_port_position=2,
|
|
|
|
front_port=frontport1_2, front_port_position=None, rear_port=rearport1, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_1, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2_1, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_2, front_port_position=1, rear_port=rearport2, rear_port_position=2,
|
|
|
|
front_port=frontport2_2, front_port_position=None, rear_port=rearport2, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
circuittermination1 = CircuitTermination.objects.create(
|
|
|
|
circuittermination1 = CircuitTermination.objects.create(
|
|
|
@@ -1667,16 +1669,16 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport4 = FrontPort.objects.create(device=self.device, name='Front Port 4')
|
|
|
|
frontport4 = FrontPort.objects.create(device=self.device, name='Front Port 4')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3, front_port_position=1, rear_port=rearport3, rear_port_position=1,
|
|
|
|
front_port=frontport3, front_port_position=None, rear_port=rearport3, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4, front_port_position=1, rear_port=rearport4, rear_port_position=1,
|
|
|
|
front_port=frontport4, front_port_position=None, rear_port=rearport4, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -1760,28 +1762,28 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport2_4 = FrontPort.objects.create(device=self.device, name='Front Port 2:4')
|
|
|
|
frontport2_4 = FrontPort.objects.create(device=self.device, name='Front Port 2:4')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1_1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_2, front_port_position=1, rear_port=rearport1, rear_port_position=2,
|
|
|
|
front_port=frontport1_2, front_port_position=None, rear_port=rearport1, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_3, front_port_position=1, rear_port=rearport1, rear_port_position=3,
|
|
|
|
front_port=frontport1_3, front_port_position=None, rear_port=rearport1, rear_port_position=3,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1_4, front_port_position=1, rear_port=rearport1, rear_port_position=4,
|
|
|
|
front_port=frontport1_4, front_port_position=None, rear_port=rearport1, rear_port_position=4,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_1, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2_1, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_2, front_port_position=1, rear_port=rearport2, rear_port_position=2,
|
|
|
|
front_port=frontport2_2, front_port_position=None, rear_port=rearport2, rear_port_position=2,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_3, front_port_position=1, rear_port=rearport2, rear_port_position=3,
|
|
|
|
front_port=frontport2_3, front_port_position=None, rear_port=rearport2, rear_port_position=3,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2_4, front_port_position=1, rear_port=rearport2, rear_port_position=4,
|
|
|
|
front_port=frontport2_4, front_port_position=None, rear_port=rearport2, rear_port_position=4,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -1940,16 +1942,16 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport4 = FrontPort.objects.create(device=self.device, name='Front Port 4')
|
|
|
|
frontport4 = FrontPort.objects.create(device=self.device, name='Front Port 4')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3, front_port_position=1, rear_port=rearport3, rear_port_position=1,
|
|
|
|
front_port=frontport3, front_port_position=None, rear_port=rearport3, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4, front_port_position=1, rear_port=rearport4, rear_port_position=1,
|
|
|
|
front_port=frontport4, front_port_position=None, rear_port=rearport4, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -2025,16 +2027,16 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport4 = FrontPort.objects.create(device=self.device, name='Front Port 4')
|
|
|
|
frontport4 = FrontPort.objects.create(device=self.device, name='Front Port 4')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3, front_port_position=1, rear_port=rearport3, rear_port_position=1,
|
|
|
|
front_port=frontport3, front_port_position=None, rear_port=rearport3, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4, front_port_position=1, rear_port=rearport4, rear_port_position=1,
|
|
|
|
front_port=frontport4, front_port_position=None, rear_port=rearport4, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -2131,22 +2133,22 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport6 = FrontPort.objects.create(device=self.device, name='Front Port 6')
|
|
|
|
frontport6 = FrontPort.objects.create(device=self.device, name='Front Port 6')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3, front_port_position=1, rear_port=rearport3, rear_port_position=1,
|
|
|
|
front_port=frontport3, front_port_position=None, rear_port=rearport3, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4, front_port_position=1, rear_port=rearport4, rear_port_position=1,
|
|
|
|
front_port=frontport4, front_port_position=None, rear_port=rearport4, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport5, front_port_position=1, rear_port=rearport5, rear_port_position=1,
|
|
|
|
front_port=frontport5, front_port_position=None, rear_port=rearport5, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport6, front_port_position=1, rear_port=rearport6, rear_port_position=1,
|
|
|
|
front_port=frontport6, front_port_position=None, rear_port=rearport6, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -2253,10 +2255,10 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport2 = FrontPort.objects.create(device=self.device, name='Front Port 2')
|
|
|
|
frontport2 = FrontPort.objects.create(device=self.device, name='Front Port 2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -2302,10 +2304,10 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport2 = FrontPort.objects.create(device=self.device, name='Front Port 2')
|
|
|
|
frontport2 = FrontPort.objects.create(device=self.device, name='Front Port 2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -2352,10 +2354,10 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport2 = FrontPort.objects.create(device=self.device, name='Front Port 2')
|
|
|
|
frontport2 = FrontPort.objects.create(device=self.device, name='Front Port 2')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -2407,7 +2409,7 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport1 = FrontPort.objects.create(device=self.device, name='Front Port 1')
|
|
|
|
frontport1 = FrontPort.objects.create(device=self.device, name='Front Port 1')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
@@ -2521,16 +2523,16 @@ class LegacyCablePathTests(CablePathTestCase):
|
|
|
|
frontport4 = FrontPort.objects.create(device=self.device, name='Front Port 4')
|
|
|
|
frontport4 = FrontPort.objects.create(device=self.device, name='Front Port 4')
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment.objects.bulk_create([
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport1, front_port_position=1, rear_port=rearport1, rear_port_position=1,
|
|
|
|
front_port=frontport1, front_port_position=None, rear_port=rearport1, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport2, front_port_position=1, rear_port=rearport2, rear_port_position=1,
|
|
|
|
front_port=frontport2, front_port_position=None, rear_port=rearport2, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport3, front_port_position=1, rear_port=rearport3, rear_port_position=1,
|
|
|
|
front_port=frontport3, front_port_position=None, rear_port=rearport3, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
PortAssignment(
|
|
|
|
PortAssignment(
|
|
|
|
front_port=frontport4, front_port_position=1, rear_port=rearport4, rear_port_position=1,
|
|
|
|
front_port=frontport4, front_port_position=None, rear_port=rearport4, rear_port_position=1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|