X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=root-context%2Fexec%2Fshowswitch;fp=root-context%2Fexec%2Fshowswitch;h=35e86c2b0adb125b8b3a1976a7eb7cf0f1bb2b6f;hb=10503d985ac1acdac4ed653e608ccc492baa446a;hp=0000000000000000000000000000000000000000;hpb=46f46b3486d68231a875c7c21e5dd64282b3813a;p=vsys-scripts.git diff --git a/root-context/exec/showswitch b/root-context/exec/showswitch new file mode 100755 index 0000000..35e86c2 --- /dev/null +++ b/root-context/exec/showswitch @@ -0,0 +1,20 @@ +#!/usr/bin/python + +import sys +import pwd +import re +import socket +import struct +import os +import string + +vsys_config_dir = "/etc/planetlab/vsys-attributes" + +if len(sys.argv) != 2: sys.exit(1) + +slicename=sys.argv[1] +sliceid = pwd.getpwnam(slicename).pw_uid + +dpname = "dp-%d"%sliceid + +os.system("ovs-dpctl show %s"%dpname)