1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Clean up FHRP group templates, forms

This commit is contained in:
jeremystretch
2021-11-02 13:32:41 -04:00
parent 93da5a39be
commit 2cb53a0f7e
6 changed files with 71 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
from django.db.models import Q
from .choices import IPAddressRoleChoices
from .choices import FHRPGroupProtocolChoices, IPAddressRoleChoices
# BGP ASN bounds
BGP_ASN_MIN = 1
@@ -59,6 +59,14 @@ IPADDRESS_ROLES_NONUNIQUE = (
FHRPGROUPASSIGNMENT_PRIORITY_MIN = 0
FHRPGROUPASSIGNMENT_PRIORITY_MAX = 255
FHRP_PROTOCOL_ROLE_MAPPINGS = {
FHRPGroupProtocolChoices.PROTOCOL_VRRP2: IPAddressRoleChoices.ROLE_VRRP,
FHRPGroupProtocolChoices.PROTOCOL_VRRP3: IPAddressRoleChoices.ROLE_VRRP,
FHRPGroupProtocolChoices.PROTOCOL_HSRP: IPAddressRoleChoices.ROLE_HSRP,
FHRPGroupProtocolChoices.PROTOCOL_GLBP: IPAddressRoleChoices.ROLE_GLBP,
FHRPGroupProtocolChoices.PROTOCOL_CARP: IPAddressRoleChoices.ROLE_CARP,
}
#
# VLANs