From 8f8df2b8e8494961405a0a53e79fc7635398d7eb Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 26 Oct 2018 15:45:19 -0400 Subject: [PATCH] Added cable types --- netbox/dcim/constants.py | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/netbox/dcim/constants.py b/netbox/dcim/constants.py index f10900812..6f7d53239 100644 --- a/netbox/dcim/constants.py +++ b/netbox/dcim/constants.py @@ -289,12 +289,39 @@ CABLE_TERMINATION_TYPES = [ ] # Cable types -# TODO: Add more types -CABLE_TYPE_COPPER = 1000 -CABLE_TYPE_FIBER = 2000 +CABLE_TYPE_CAT3 = 1300 +CABLE_TYPE_CAT5 = 1500 +CABLE_TYPE_CAT5E = 1510 +CABLE_TYPE_CAT6 = 1600 +CABLE_TYPE_CAT6A = 1610 +CABLE_TYPE_CAT7 = 1700 +CABLE_TYPE_MMF_OM1 = 3010 +CABLE_TYPE_MMF_OM2 = 3020 +CABLE_TYPE_MMF_OM3 = 3030 +CABLE_TYPE_MMF_OM4 = 3040 +CABLE_TYPE_SMF = 3500 +CABLE_TYPE_POWER = 5000 CABLE_TYPE_CHOICES = ( - (CABLE_TYPE_COPPER, 'Copper'), - (CABLE_TYPE_FIBER, 'Fiber'), + ( + 'Copper', ( + (CABLE_TYPE_CAT3, 'CAT3'), + (CABLE_TYPE_CAT5, 'CAT5'), + (CABLE_TYPE_CAT5E, 'CAT5e'), + (CABLE_TYPE_CAT6, 'CAT6'), + (CABLE_TYPE_CAT6A, 'CAT6a'), + (CABLE_TYPE_CAT7, 'CAT7'), + ), + ), + ( + 'Fiber', ( + (CABLE_TYPE_MMF_OM1, 'Multimode Fiber (OM1)'), + (CABLE_TYPE_MMF_OM2, 'Multimode Fiber (OM2)'), + (CABLE_TYPE_MMF_OM3, 'Multimode Fiber (OM3)'), + (CABLE_TYPE_MMF_OM4, 'Multimode Fiber (OM4)'), + (CABLE_TYPE_SMF, 'Singlemode Fiber'), + ), + ), + (CABLE_TYPE_POWER, 'Power'), ) CABLE_TERMINATION_TYPE_CHOICES = {