git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e5a8707
)
r1.4 adding more information for sfa plugin
author
nlebreto
<nicolas.lebreton@inria.fr>
Tue, 28 Jan 2014 16:39:23 +0000
(17:39 +0100)
committer
nlebreto
<nicolas.lebreton@inria.fr>
Tue, 28 Jan 2014 16:39:23 +0000
(17:39 +0100)
sfa/bonfire/bonfire.py
patch
|
blob
|
history
diff --git
a/sfa/bonfire/bonfire.py
b/sfa/bonfire/bonfire.py
index
64fe2e1
..
84ad080
100644
(file)
--- a/
sfa/bonfire/bonfire.py
+++ b/
sfa/bonfire/bonfire.py
@@
-32,12
+32,16
@@
import time
# 7) remove slice or key
# python -c 'import bonfire; print bonfire.remove_slice("topdomain.dummy.alice_slice")'
# 7) remove slice or key
# python -c 'import bonfire; print bonfire.remove_slice("topdomain.dummy.alice_slice")'
-
-
+# 8) attach slice to a user
+# python -c 'import bonfire; print bonfire.create_slice_attach_user("topdomain.dummy.alice")'
+
# ########################################################## #
# ########################################################## #
-
-
# ########################################################## #
# ########################################################## #
+
+# create a slice and attach a specific user to it
+def create_slice_attach_user(user_slice):
+ call = "sfa.py add -x {0}_slice -t slice -r {0}@dummy.net".format(user_slice)
+ callcreateslice = subprocess.Popen(call, shell=True)
# remove slice or key
def remove_slice(name):
# remove slice or key
def remove_slice(name):