mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -06:00
Update IPAM enums
This commit is contained in:
parent
65d0014369
commit
2916942dbf
@ -1,123 +1,27 @@
|
||||
from enum import Enum
|
||||
import strawberry
|
||||
|
||||
__all__ = [
|
||||
'IPAddressFamilyEnum',
|
||||
'PrefixStatusEnum',
|
||||
'IPRangeStatusEnum',
|
||||
'IPAddressStatusEnum',
|
||||
'IPAddressRoleEnum',
|
||||
'FHRPGroupProtocolEnum',
|
||||
from ipam.choices import *
|
||||
|
||||
__all__ = (
|
||||
'FHRPGroupAuthTypeEnum',
|
||||
'FHRPGroupProtocolEnum',
|
||||
'IPAddressFamilyEnum',
|
||||
'IPAddressRoleEnum',
|
||||
'IPAddressStatusEnum',
|
||||
'IPRangeStatusEnum',
|
||||
'PrefixStatusEnum',
|
||||
'ServiceProtocolEnum',
|
||||
'VLANStatusEnum',
|
||||
'VLANQinQRoleEnum',
|
||||
'ServiceProtocolEnum',
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class IPAddressFamilyEnum(Enum):
|
||||
FAMILY_4 = 4
|
||||
FAMILY_6 = 6
|
||||
|
||||
|
||||
#
|
||||
# Prefixes
|
||||
#
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class PrefixStatusEnum(Enum):
|
||||
STATUS_CONTAINER = 'container'
|
||||
STATUS_ACTIVE = 'active'
|
||||
STATUS_RESERVED = 'reserved'
|
||||
STATUS_DEPRECATED = 'deprecated'
|
||||
|
||||
|
||||
#
|
||||
# IP Ranges
|
||||
#
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class IPRangeStatusEnum(Enum):
|
||||
STATUS_ACTIVE = 'active'
|
||||
STATUS_RESERVED = 'reserved'
|
||||
STATUS_DEPRECATED = 'deprecated'
|
||||
|
||||
|
||||
#
|
||||
# IP Addresses
|
||||
#
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class IPAddressStatusEnum(Enum):
|
||||
STATUS_ACTIVE = 'active'
|
||||
STATUS_RESERVED = 'reserved'
|
||||
STATUS_DEPRECATED = 'deprecated'
|
||||
STATUS_DHCP = 'dhcp'
|
||||
STATUS_SLAAC = 'slaac'
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class IPAddressRoleEnum(Enum):
|
||||
ROLE_LOOPBACK = 'loopback'
|
||||
ROLE_SECONDARY = 'secondary'
|
||||
ROLE_ANYCAST = 'anycast'
|
||||
ROLE_VIP = 'vip'
|
||||
ROLE_VRRP = 'vrrp'
|
||||
ROLE_HSRP = 'hsrp'
|
||||
ROLE_GLBP = 'glbp'
|
||||
ROLE_CARP = 'carp'
|
||||
|
||||
|
||||
#
|
||||
# FHRP
|
||||
#
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class FHRPGroupProtocolEnum(Enum):
|
||||
PROTOCOL_VRRP2 = 'vrrp2'
|
||||
PROTOCOL_VRRP3 = 'vrrp3'
|
||||
PROTOCOL_HSRP = 'hsrp'
|
||||
PROTOCOL_GLBP = 'glbp'
|
||||
PROTOCOL_CARP = 'carp'
|
||||
PROTOCOL_CLUSTERXL = 'clusterxl'
|
||||
PROTOCOL_OTHER = 'other'
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class FHRPGroupAuthTypeEnum(Enum):
|
||||
AUTHENTICATION_PLAINTEXT = 'plaintext'
|
||||
AUTHENTICATION_MD5 = 'md5'
|
||||
|
||||
|
||||
#
|
||||
# VLANs
|
||||
#
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class VLANStatusEnum(Enum):
|
||||
STATUS_ACTIVE = 'active'
|
||||
STATUS_RESERVED = 'reserved'
|
||||
STATUS_DEPRECATED = 'deprecated'
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class VLANQinQRoleEnum(Enum):
|
||||
ROLE_SERVICE = 'svlan'
|
||||
ROLE_CUSTOMER = 'cvlan'
|
||||
|
||||
#
|
||||
# Services
|
||||
#
|
||||
|
||||
|
||||
@strawberry.enum
|
||||
class ServiceProtocolEnum(Enum):
|
||||
PROTOCOL_TCP = 'tcp'
|
||||
PROTOCOL_UDP = 'udp'
|
||||
PROTOCOL_SCTP = 'sctp'
|
||||
FHRPGroupAuthTypeEnum = strawberry.enum(FHRPGroupAuthTypeChoices.as_enum())
|
||||
FHRPGroupProtocolEnum = strawberry.enum(FHRPGroupProtocolChoices.as_enum())
|
||||
IPAddressFamilyEnum = strawberry.enum(IPAddressFamilyChoices.as_enum())
|
||||
IPAddressRoleEnum = strawberry.enum(IPAddressRoleChoices.as_enum())
|
||||
IPAddressStatusEnum = strawberry.enum(IPAddressStatusChoices.as_enum())
|
||||
IPRangeStatusEnum = strawberry.enum(IPRangeStatusChoices.as_enum())
|
||||
PrefixStatusEnum = strawberry.enum(PrefixStatusChoices.as_enum())
|
||||
ServiceProtocolEnum = strawberry.enum(ServiceProtocolChoices.as_enum())
|
||||
VLANStatusEnum = strawberry.enum(VLANStatusChoices.as_enum())
|
||||
VLANQinQRoleEnum = strawberry.enum(VLANQinQRoleChoices.as_enum())
|
||||
|
Loading…
Reference in New Issue
Block a user