updated NodeTypes to be used directly

This commit is contained in:
Blake Harnden 2020-03-10 23:11:37 -07:00
parent f277e96c9a
commit 5cdfd8d8b9
9 changed files with 12 additions and 16 deletions

View file

@ -472,7 +472,7 @@ class CoreNode(CoreNodeBase):
Provides standard core node logic.
"""
apitype = NodeTypes.DEFAULT.value
apitype = NodeTypes.DEFAULT
valid_address_types = {"inet", "inet6", "inet6link"}
def __init__(

View file

@ -72,7 +72,7 @@ class DockerClient:
class DockerNode(CoreNode):
apitype = NodeTypes.DOCKER.value
apitype = NodeTypes.DOCKER
def __init__(
self,

View file

@ -66,7 +66,7 @@ class LxdClient:
class LxcNode(CoreNode):
apitype = NodeTypes.LXC.value
apitype = NodeTypes.LXC
def __init__(
self,

View file

@ -999,7 +999,7 @@ class SwitchNode(CoreNetwork):
Provides switch functionality within a core node.
"""
apitype = NodeTypes.SWITCH.value
apitype = NodeTypes.SWITCH
policy = "ACCEPT"
type = "lanswitch"
@ -1010,7 +1010,7 @@ class HubNode(CoreNetwork):
ports by turning off MAC address learning.
"""
apitype = NodeTypes.HUB.value
apitype = NodeTypes.HUB
policy = "ACCEPT"
type = "hub"
@ -1029,7 +1029,7 @@ class WlanNode(CoreNetwork):
Provides wireless lan functionality within a core node.
"""
apitype = NodeTypes.WIRELESS_LAN.value
apitype = NodeTypes.WIRELESS_LAN
linktype = LinkTypes.WIRED
policy = "DROP"
type = "wlan"
@ -1140,6 +1140,6 @@ class TunnelNode(GreTapBridge):
Provides tunnel functionality in a core node.
"""
apitype = NodeTypes.TUNNEL.value
apitype = NodeTypes.TUNNEL
policy = "ACCEPT"
type = "tunnel"

View file

@ -264,7 +264,7 @@ class Rj45Node(CoreNodeBase, CoreInterface):
network.
"""
apitype = NodeTypes.RJ45.value
apitype = NodeTypes.RJ45
type = "rj45"
def __init__(