Skip to content

Commit 43b9497

Browse files
authored
Closes #16926 Adds various USB cable types to front/rear ports and cable choices (#16951)
* Closes #16926 Adds various USB cable types to front/rear ports and cable choices * Closes #16926 Changes USB cable types to reflect versions-physical differences. Updated human readable labels on USB front/rear ports to match style of usb console ports * Closes #16926 Removes USB cable type choices in favor of single, generic 'USB' cable
1 parent aca693b commit 43b9497

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

netbox/dcim/choices.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1347,6 +1347,14 @@ class PortTypeChoices(ChoiceSet):
13471347
TYPE_URM_P2 = 'urm-p2'
13481348
TYPE_URM_P4 = 'urm-p4'
13491349
TYPE_URM_P8 = 'urm-p8'
1350+
TYPE_USB_A = 'usb-a'
1351+
TYPE_USB_B = 'usb-b'
1352+
TYPE_USB_C = 'usb-c'
1353+
TYPE_USB_MINI_A = 'usb-mini-a'
1354+
TYPE_USB_MINI_B = 'usb-mini-b'
1355+
TYPE_USB_MICRO_A = 'usb-micro-a'
1356+
TYPE_USB_MICRO_B = 'usb-micro-b'
1357+
TYPE_USB_MICRO_AB = 'usb-micro-ab'
13501358
TYPE_OTHER = 'other'
13511359

13521360
CHOICES = (
@@ -1406,6 +1414,19 @@ class PortTypeChoices(ChoiceSet):
14061414
(TYPE_SPLICE, 'Splice'),
14071415
),
14081416
),
1417+
(
1418+
_('USB'),
1419+
(
1420+
(TYPE_USB_A, 'USB Type A'),
1421+
(TYPE_USB_B, 'USB Type B'),
1422+
(TYPE_USB_C, 'USB Type C'),
1423+
(TYPE_USB_MINI_A, 'USB Mini A'),
1424+
(TYPE_USB_MINI_B, 'USB Mini B'),
1425+
(TYPE_USB_MICRO_A, 'USB Micro A'),
1426+
(TYPE_USB_MICRO_B, 'USB Micro B'),
1427+
(TYPE_USB_MICRO_AB, 'USB Micro AB'),
1428+
),
1429+
),
14091430
(
14101431
_('Other'),
14111432
(
@@ -1444,6 +1465,7 @@ class CableTypeChoices(ChoiceSet):
14441465
TYPE_SMF_OS2 = 'smf-os2'
14451466
TYPE_AOC = 'aoc'
14461467
TYPE_POWER = 'power'
1468+
TYPE_USB = 'usb'
14471469

14481470
CHOICES = (
14491471
(
@@ -1476,6 +1498,7 @@ class CableTypeChoices(ChoiceSet):
14761498
(TYPE_AOC, 'Active Optical Cabling (AOC)'),
14771499
),
14781500
),
1501+
(TYPE_USB, _('USB')),
14791502
(TYPE_POWER, _('Power')),
14801503
)
14811504

0 commit comments

Comments
 (0)