mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 11:26:26 -06:00
Update IPAM enums
This commit is contained in:
parent
65d0014369
commit
2916942dbf
@ -1,123 +1,27 @@
|
|||||||
from enum import Enum
|
|
||||||
import strawberry
|
import strawberry
|
||||||
|
|
||||||
__all__ = [
|
from ipam.choices import *
|
||||||
'IPAddressFamilyEnum',
|
|
||||||
'PrefixStatusEnum',
|
__all__ = (
|
||||||
'IPRangeStatusEnum',
|
|
||||||
'IPAddressStatusEnum',
|
|
||||||
'IPAddressRoleEnum',
|
|
||||||
'FHRPGroupProtocolEnum',
|
|
||||||
'FHRPGroupAuthTypeEnum',
|
'FHRPGroupAuthTypeEnum',
|
||||||
|
'FHRPGroupProtocolEnum',
|
||||||
|
'IPAddressFamilyEnum',
|
||||||
|
'IPAddressRoleEnum',
|
||||||
|
'IPAddressStatusEnum',
|
||||||
|
'IPRangeStatusEnum',
|
||||||
|
'PrefixStatusEnum',
|
||||||
|
'ServiceProtocolEnum',
|
||||||
'VLANStatusEnum',
|
'VLANStatusEnum',
|
||||||
'VLANQinQRoleEnum',
|
'VLANQinQRoleEnum',
|
||||||
'ServiceProtocolEnum',
|
)
|
||||||
]
|
|
||||||
|
|
||||||
|
FHRPGroupAuthTypeEnum = strawberry.enum(FHRPGroupAuthTypeChoices.as_enum())
|
||||||
@strawberry.enum
|
FHRPGroupProtocolEnum = strawberry.enum(FHRPGroupProtocolChoices.as_enum())
|
||||||
class IPAddressFamilyEnum(Enum):
|
IPAddressFamilyEnum = strawberry.enum(IPAddressFamilyChoices.as_enum())
|
||||||
FAMILY_4 = 4
|
IPAddressRoleEnum = strawberry.enum(IPAddressRoleChoices.as_enum())
|
||||||
FAMILY_6 = 6
|
IPAddressStatusEnum = strawberry.enum(IPAddressStatusChoices.as_enum())
|
||||||
|
IPRangeStatusEnum = strawberry.enum(IPRangeStatusChoices.as_enum())
|
||||||
|
PrefixStatusEnum = strawberry.enum(PrefixStatusChoices.as_enum())
|
||||||
#
|
ServiceProtocolEnum = strawberry.enum(ServiceProtocolChoices.as_enum())
|
||||||
# Prefixes
|
VLANStatusEnum = strawberry.enum(VLANStatusChoices.as_enum())
|
||||||
#
|
VLANQinQRoleEnum = strawberry.enum(VLANQinQRoleChoices.as_enum())
|
||||||
|
|
||||||
|
|
||||||
@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'
|
|
||||||
|
Loading…
Reference in New Issue
Block a user