11 vsys_config_dir = "/etc/planetlab/vsys-attributes"
13 if len(sys.argv) != 2: sys.exit(1)
16 sliceid = pwd.getpwnam(slicename).pw_uid
17 dpname = "dp-%d"%sliceid
19 ### Read args from stdin
20 arglines = map(string.strip, sys.stdin.readlines())
21 if len(arglines) != 1: sys.exit(1)
22 of_server = arglines[0]
24 if re.match(r'^(tcp|udp):[\d\.]+$', of_server) is None:
25 print "Address '%s' is invalid; should look like 'tcp:10.0.5.6'" % of_server
28 print "Requesting creation of data path %s."%dpname
29 os.system("ovs-openflowd %s %s" % (dpname, of_server))