From 0861c1723121f1b7f3a443601490c4ab65a7b6aa Mon Sep 17 00:00:00 2001 From: Bruno Blanes Date: Mon, 26 Jun 2023 16:47:13 -0300 Subject: [PATCH 1/4] Add Brazilian power outlet standard to choices.py --- netbox/dcim/choices.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index cc388b75063..5d1c39c7840 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -616,6 +616,9 @@ class PowerOutletTypeChoices(ChoiceSet): TYPE_ITA_N = 'ita-n' TYPE_ITA_O = 'ita-o' TYPE_ITA_MULTISTANDARD = 'ita-multistandard' + # NBR 14136 + TYPE_NBR_14136_10A = 'nbr-14136-10a' + TYPE_NBR_14136_20A = 'nbr-14136-20a' # USB TYPE_USB_A = 'usb-a' TYPE_USB_MICROB = 'usb-micro-b' @@ -724,6 +727,10 @@ class PowerOutletTypeChoices(ChoiceSet): (TYPE_ITA_O, 'ITA Type O'), (TYPE_ITA_MULTISTANDARD, 'ITA Multistandard'), )), + ('NBR 14136', ( + (TYPE_NBR_14136_10A, '2P+T 10A'), + (TYPE_NBR_14136_20A, '2P+T 20A'), + )), ('USB', ( (TYPE_USB_A, 'USB Type A'), (TYPE_USB_MICROB, 'USB Micro B'), From 38dc0bbe9f710e618f0f3f44cdeadcc845d90ba0 Mon Sep 17 00:00:00 2001 From: Bruno Blanes Date: Mon, 26 Jun 2023 17:00:02 -0300 Subject: [PATCH 2/4] Eliminate possible name conflict --- netbox/dcim/choices.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 5d1c39c7840..1113913d4d3 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -728,8 +728,8 @@ class PowerOutletTypeChoices(ChoiceSet): (TYPE_ITA_MULTISTANDARD, 'ITA Multistandard'), )), ('NBR 14136', ( - (TYPE_NBR_14136_10A, '2P+T 10A'), - (TYPE_NBR_14136_20A, '2P+T 20A'), + (TYPE_NBR_14136_10A, 'NBR 2P+T 10A'), + (TYPE_NBR_14136_20A, 'NBR 2P+T 20A'), )), ('USB', ( (TYPE_USB_A, 'USB Type A'), From 7a73a4ef92741d7407e56ce157c1b48b9938a6ed Mon Sep 17 00:00:00 2001 From: Bruno Blanes Date: Wed, 28 Jun 2023 16:37:31 -0300 Subject: [PATCH 3/4] Rename group and add IEC 60906-1 plug type --- netbox/dcim/choices.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 1113913d4d3..2585898be96 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -553,6 +553,10 @@ class PowerOutletTypeChoices(ChoiceSet): TYPE_IEC_3PNE4H = 'iec-60309-3p-n-e-4h' TYPE_IEC_3PNE6H = 'iec-60309-3p-n-e-6h' TYPE_IEC_3PNE9H = 'iec-60309-3p-n-e-9h' + # IEC 60906-1 + TYPE_IEC_60906_1 = 'iec-60906-1' + TYPE_NBR_14136_10A = 'nbr-14136-10a' + TYPE_NBR_14136_20A = 'nbr-14136-20a' # NEMA non-locking TYPE_NEMA_115R = 'nema-1-15r' TYPE_NEMA_515R = 'nema-5-15r' @@ -616,9 +620,6 @@ class PowerOutletTypeChoices(ChoiceSet): TYPE_ITA_N = 'ita-n' TYPE_ITA_O = 'ita-o' TYPE_ITA_MULTISTANDARD = 'ita-multistandard' - # NBR 14136 - TYPE_NBR_14136_10A = 'nbr-14136-10a' - TYPE_NBR_14136_20A = 'nbr-14136-20a' # USB TYPE_USB_A = 'usb-a' TYPE_USB_MICROB = 'usb-micro-b' @@ -660,6 +661,11 @@ class PowerOutletTypeChoices(ChoiceSet): (TYPE_IEC_3PNE6H, '3P+N+E 6H'), (TYPE_IEC_3PNE9H, '3P+N+E 9H'), )), + ('IEC 60906-1', ( + (TYPE_IEC_60906_1, 'IEC 60906-1'), + (TYPE_NBR_14136_10A, '2P+T 10A (NBR 14136)'), + (TYPE_NBR_14136_20A, '2P+T 20A (NBR 14136)'), + )), ('NEMA (Non-locking)', ( (TYPE_NEMA_115R, 'NEMA 1-15R'), (TYPE_NEMA_515R, 'NEMA 5-15R'), @@ -727,10 +733,6 @@ class PowerOutletTypeChoices(ChoiceSet): (TYPE_ITA_O, 'ITA Type O'), (TYPE_ITA_MULTISTANDARD, 'ITA Multistandard'), )), - ('NBR 14136', ( - (TYPE_NBR_14136_10A, 'NBR 2P+T 10A'), - (TYPE_NBR_14136_20A, 'NBR 2P+T 20A'), - )), ('USB', ( (TYPE_USB_A, 'USB Type A'), (TYPE_USB_MICROB, 'USB Micro B'), From 87b01810aa0f1db5bef026fbba42ff10403d3472 Mon Sep 17 00:00:00 2001 From: Bruno Blanes Date: Mon, 10 Jul 2023 14:41:45 -0300 Subject: [PATCH 4/4] Update choices.py Add Brazilian power port standard --- netbox/dcim/choices.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 2585898be96..eaca1a098de 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -318,6 +318,10 @@ class PowerPortTypeChoices(ChoiceSet): TYPE_IEC_3PNE4H = 'iec-60309-3p-n-e-4h' TYPE_IEC_3PNE6H = 'iec-60309-3p-n-e-6h' TYPE_IEC_3PNE9H = 'iec-60309-3p-n-e-9h' + # IEC 60906-1 + TYPE_IEC_60906_1 = 'iec-60906-1' + TYPE_NBR_14136_10A = 'nbr-14136-10a' + TYPE_NBR_14136_20A = 'nbr-14136-20a' # NEMA non-locking TYPE_NEMA_115P = 'nema-1-15p' TYPE_NEMA_515P = 'nema-5-15p' @@ -429,6 +433,11 @@ class PowerPortTypeChoices(ChoiceSet): (TYPE_IEC_3PNE6H, '3P+N+E 6H'), (TYPE_IEC_3PNE9H, '3P+N+E 9H'), )), + ('IEC 60906-1', ( + (TYPE_IEC_60906_1, 'IEC 60906-1'), + (TYPE_NBR_14136_10A, '2P+T 10A (NBR 14136)'), + (TYPE_NBR_14136_20A, '2P+T 20A (NBR 14136)'), + )), ('NEMA (Non-locking)', ( (TYPE_NEMA_115P, 'NEMA 1-15P'), (TYPE_NEMA_515P, 'NEMA 5-15P'),