forked from fdio-stack/netplugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartPlugin.py
More file actions
executable file
·30 lines (24 loc) · 957 Bytes
/
Copy pathstartPlugin.py
File metadata and controls
executable file
·30 lines (24 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/python
# Start netplugin and netmaster
import api.tbed
import time
import sys
import os
import argparse
# Parse command line args
# Create the parser and sub parser
parser = argparse.ArgumentParser()
parser.add_argument('--version', action='version', version='1.0.0')
parser.add_argument("-nodes", required=True, help="list of nodes(comma seperated)")
parser.add_argument("-user", default='vagrant', help="User id for ssh")
parser.add_argument("-password", default='vagrant', help="password for ssh")
parser.add_argument("-binpath", default='/opt/gopath/bin', help="netplugin/netmaster binary path")
# Parse the args
args = parser.parse_args()
addrList = args.nodes.split(",")
# Cleanup all state and start netplugin/netmaster
testbed = api.tbed.Testbed(addrList, args.user, args.password, args.binpath)
print "Waiting for netmaster to come up"
time.sleep(15)
print "################### Started Netplugin #####################"
os._exit(0)