X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=exec%2Fconnectswitch;h=b61e1860fc7c955a572f9e1fa4acd01ff0e819e4;hb=0d2dadd8ffce4fb1f1de7270766b65d748a04b30;hp=fb15ee3591cb5e7117b9dc5d78c50a33713a2f17;hpb=4e022de54be90c0e2364720935b3d93635dcd749;p=vsys-scripts.git diff --git a/exec/connectswitch b/exec/connectswitch index fb15ee3..b61e186 100755 --- a/exec/connectswitch +++ b/exec/connectswitch @@ -21,7 +21,9 @@ arglines = map(string.strip, sys.stdin.readlines()) if len(arglines) != 1: sys.exit(1) of_server = arglines[0] -if re.match(r'^(tcp|udp):[\d\.]+$', vif) is None: exit(1) +if re.match(r'^(tcp|udp):[\d\.]+$', of_server) is None: + print "Address '%s' is invalid; should look like 'tcp:10.0.5.6'" % of_server + exit(1) print "Requesting creation of data path %s."%dpname -os.system("ovs-openflowd dp0 tcp:192.168.1.2") +os.system("ovs-openflowd %s %s" % (dpname, of_server))