Commit 1dcb58fb authored by David Hancock's avatar David Hancock

Add cloudlab manifest parsing config script

parent ea4e7a0a
import argparse
import sys
import subprocess
def parse_manifest(args):
nodes = []
with open(args.manifest, "r") as m:
for line in m:
if "<emulab:vnode name=" in line:
node_num = line.split("\"")[1].split("pc")[1]
return nodes
def parse_args(args):
parser = argparse.ArgumentParser(description='Configure HyPer4/ConViDa evaluation')
parser.add_argument('--user', help='cloudlab username',
type=str, action="store")
parser.add_argument('--manifest', help='path to cloudlab manifest',
type=str, action="store", default="manifest")
return parser.parse_args(args)
def main():
args = parse_args(sys.argv[1:])
config_args = ['./']
if args.user:
nodes = args.func(args)
config_args += nodes
elif args.manifest:
print("Error: missing cloudlab username")
if __name__ == '__main__':
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment