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:
parent
eb5dd3780c
commit
463618ddf8
16 changed files with 46 additions and 36 deletions
|
@ -336,9 +336,16 @@ def main():
|
|||
|
||||
if __name__ == "__main__":
|
||||
# configure nodes to use
|
||||
node_map = nodemaps.CLASSIC_NODES
|
||||
node_map = nodemaps.NODES
|
||||
if len(sys.argv) == 2 and sys.argv[1] == "ovs":
|
||||
node_map = nodemaps.OVS_NODES
|
||||
from core.netns.openvswitch import OVS_NODES
|
||||
node_map.update(OVS_NODES)
|
||||
|
||||
# update with BSD based nodes
|
||||
if os.uname()[0] == "FreeBSD":
|
||||
from core.bsd.nodes import BSD_NODES
|
||||
node_map.update(BSD_NODES)
|
||||
|
||||
nodeutils.set_node_map(node_map)
|
||||
|
||||
# load default services
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue