mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-13 16:47:34 -06:00
* Add cellular interface types to WIRELESS_IFACE_TYPES const Add cable termination test for cellular interface * Add regression tag to cellular test
This commit is contained in:
parent
a48bee2a2e
commit
afeddee10d
@ -53,6 +53,11 @@ WIRELESS_IFACE_TYPES = [
|
|||||||
InterfaceTypeChoices.TYPE_802151,
|
InterfaceTypeChoices.TYPE_802151,
|
||||||
InterfaceTypeChoices.TYPE_802154,
|
InterfaceTypeChoices.TYPE_802154,
|
||||||
InterfaceTypeChoices.TYPE_OTHER_WIRELESS,
|
InterfaceTypeChoices.TYPE_OTHER_WIRELESS,
|
||||||
|
InterfaceTypeChoices.TYPE_GSM,
|
||||||
|
InterfaceTypeChoices.TYPE_CDMA,
|
||||||
|
InterfaceTypeChoices.TYPE_LTE,
|
||||||
|
InterfaceTypeChoices.TYPE_4G,
|
||||||
|
InterfaceTypeChoices.TYPE_5G,
|
||||||
]
|
]
|
||||||
|
|
||||||
NONCONNECTABLE_IFACE_TYPES = VIRTUAL_IFACE_TYPES + WIRELESS_IFACE_TYPES
|
NONCONNECTABLE_IFACE_TYPES = VIRTUAL_IFACE_TYPES + WIRELESS_IFACE_TYPES
|
||||||
|
@ -954,6 +954,19 @@ class CableTestCase(TestCase):
|
|||||||
with self.assertRaises(ValidationError):
|
with self.assertRaises(ValidationError):
|
||||||
cable.clean()
|
cable.clean()
|
||||||
|
|
||||||
|
@tag('regression')
|
||||||
|
def test_cable_cannot_terminate_to_a_cellular_interface(self):
|
||||||
|
"""
|
||||||
|
A cable cannot terminate to a cellular interface
|
||||||
|
"""
|
||||||
|
device1 = Device.objects.get(name='TestDevice1')
|
||||||
|
interface2 = Interface.objects.get(device__name='TestDevice2', name='eth0')
|
||||||
|
|
||||||
|
cellular_interface = Interface(device=device1, name="W1", type=InterfaceTypeChoices.TYPE_LTE)
|
||||||
|
cable = Cable(a_terminations=[interface2], b_terminations=[cellular_interface])
|
||||||
|
with self.assertRaises(ValidationError):
|
||||||
|
cable.clean()
|
||||||
|
|
||||||
|
|
||||||
class VirtualDeviceContextTestCase(TestCase):
|
class VirtualDeviceContextTestCase(TestCase):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user