git://git.onelab.eu
/
vsys-scripts.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
prefer $() over backquotes
[vsys-scripts.git]
/
exec
/
showswitch
1
#!/usr/bin/python
2
3
import sys
4
import pwd
5
import re
6
import socket
7
import struct
8
import os
9
import string
10
11
vsys_config_dir = "/etc/planetlab/vsys-attributes"
12
13
if len(sys.argv) != 2: sys.exit(1)
14
15
slicename=sys.argv[1]
16
sliceid = pwd.getpwnam(slicename).pw_uid
17
18
dpname = "dp-%d"%sliceid
19
20
os.system("ovs-dpctl show %s"%dpname)