small refactoring on how node maps are used, added logic to switch to using a map based on bsd nodes using previous logic

This commit is contained in:
Blake J. Harnden 2017-08-09 10:03:43 -07:00
parent eb5dd3780c
commit 463618ddf8
16 changed files with 46 additions and 36 deletions

View file

@ -206,3 +206,15 @@ class TunnelNode(NetgraphNet):
nghooks = "upper lower"
apitype = NodeTypes.TUNNEL.value
policy = "ACCEPT"
BSD_NODES = {
NodeTypes.DEFAULT: CoreNode,
NodeTypes.SWITCH: SwitchNode,
NodeTypes.HUB: HubNode,
NodeTypes.WIRELESS_LAN: WlanNode,
NodeTypes.RJ45: RJ45Node,
NodeTypes.TUNNEL: TunnelNode,
NodeTypes.PEER_TO_PEER: PtpNet,
NodeTypes.CONTROL_NET: None
}