From 934493bf5f4ca36e255012d24e0d9f35e300dfd5 Mon Sep 17 00:00:00 2001 From: neope <58367950+apellini@users.noreply.github.com> Date: Fri, 25 Mar 2022 08:35:57 +0100 Subject: [PATCH 1/3] #8830 Adding ClusterXL Adding ClusterCL Choice to FHRP Group --- netbox/ipam/choices.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netbox/ipam/choices.py b/netbox/ipam/choices.py index 647a82810..b95a77a5b 100644 --- a/netbox/ipam/choices.py +++ b/netbox/ipam/choices.py @@ -100,6 +100,7 @@ class IPAddressRoleChoices(ChoiceSet): ROLE_HSRP = 'hsrp' ROLE_GLBP = 'glbp' ROLE_CARP = 'carp' + ROLE_CLUSTERXL = 'clusterxl' CHOICES = ( (ROLE_LOOPBACK, 'Loopback'), @@ -108,6 +109,7 @@ class IPAddressRoleChoices(ChoiceSet): (ROLE_VIP, 'VIP'), (ROLE_VRRP, 'VRRP'), (ROLE_HSRP, 'HSRP'), + (ROLE_CLUSTERXL, 'ClusterXL'), (ROLE_GLBP, 'GLBP'), (ROLE_CARP, 'CARP'), ) @@ -119,6 +121,7 @@ class IPAddressRoleChoices(ChoiceSet): ROLE_VIP: 'success', ROLE_VRRP: 'success', ROLE_HSRP: 'success', + ROLE_CLUSTERXL: 'success', ROLE_GLBP: 'success', ROLE_CARP: 'success', } From 1cef513f6c2584a3b2961f135b8e5ad3d6336536 Mon Sep 17 00:00:00 2001 From: neope <58367950+apellini@users.noreply.github.com> Date: Fri, 25 Mar 2022 19:41:35 +0100 Subject: [PATCH 2/3] Adding ClusterXL as FHRPGroupProtocolChoices Adding in choices group standard, checkpoint and cisco and ungroupped other. --- netbox/ipam/choices.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/netbox/ipam/choices.py b/netbox/ipam/choices.py index b95a77a5b..7e704a975 100644 --- a/netbox/ipam/choices.py +++ b/netbox/ipam/choices.py @@ -100,7 +100,6 @@ class IPAddressRoleChoices(ChoiceSet): ROLE_HSRP = 'hsrp' ROLE_GLBP = 'glbp' ROLE_CARP = 'carp' - ROLE_CLUSTERXL = 'clusterxl' CHOICES = ( (ROLE_LOOPBACK, 'Loopback'), @@ -109,7 +108,6 @@ class IPAddressRoleChoices(ChoiceSet): (ROLE_VIP, 'VIP'), (ROLE_VRRP, 'VRRP'), (ROLE_HSRP, 'HSRP'), - (ROLE_CLUSTERXL, 'ClusterXL'), (ROLE_GLBP, 'GLBP'), (ROLE_CARP, 'CARP'), ) @@ -121,7 +119,6 @@ class IPAddressRoleChoices(ChoiceSet): ROLE_VIP: 'success', ROLE_VRRP: 'success', ROLE_HSRP: 'success', - ROLE_CLUSTERXL: 'success', ROLE_GLBP: 'success', ROLE_CARP: 'success', } @@ -138,14 +135,22 @@ class FHRPGroupProtocolChoices(ChoiceSet): PROTOCOL_HSRP = 'hsrp' PROTOCOL_GLBP = 'glbp' PROTOCOL_CARP = 'carp' + PROTOCOL_CLUSTERXL = 'clusterxl' PROTOCOL_OTHER = 'other' CHOICES = ( - (PROTOCOL_VRRP2, 'VRRPv2'), - (PROTOCOL_VRRP3, 'VRRPv3'), - (PROTOCOL_HSRP, 'HSRP'), - (PROTOCOL_GLBP, 'GLBP'), - (PROTOCOL_CARP, 'CARP'), + ('Standard', ( + (PROTOCOL_VRRP2, 'VRRPv2'), + (PROTOCOL_VRRP3, 'VRRPv3'), + (PROTOCOL_CARP, 'CARP'), + ), + ('CheckPoint', ( + (PROTOCOL_CLUSTERXL, 'ClusterXL'), + ), + ('Cisco', ( + (PROTOCOL_HSRP, 'HSRP'), + (PROTOCOL_GLBP, 'GLBP'), + ), (PROTOCOL_OTHER, 'Other'), ) From 37781bd2087250806173a10dc15a8e412bcf7eb3 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 28 Mar 2022 09:37:33 -0400 Subject: [PATCH 3/3] Fix parentheses --- netbox/ipam/choices.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netbox/ipam/choices.py b/netbox/ipam/choices.py index 7e704a975..6c23dd8c0 100644 --- a/netbox/ipam/choices.py +++ b/netbox/ipam/choices.py @@ -143,14 +143,14 @@ class FHRPGroupProtocolChoices(ChoiceSet): (PROTOCOL_VRRP2, 'VRRPv2'), (PROTOCOL_VRRP3, 'VRRPv3'), (PROTOCOL_CARP, 'CARP'), - ), + )), ('CheckPoint', ( (PROTOCOL_CLUSTERXL, 'ClusterXL'), - ), + )), ('Cisco', ( (PROTOCOL_HSRP, 'HSRP'), (PROTOCOL_GLBP, 'GLBP'), - ), + )), (PROTOCOL_OTHER, 'Other'), )