git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dd5d1e4
)
Added xml rpc ReCreate Method.
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Thu, 17 May 2007 21:11:54 +0000
(21:11 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Thu, 17 May 2007 21:11:54 +0000
(21:11 +0000)
api.py
patch
|
blob
|
history
diff --git
a/api.py
b/api.py
index
6baaf3e
..
937fb78
100644
(file)
--- a/
api.py
+++ b/
api.py
@@
-81,6
+81,14
@@
def Destroy(rec):
"""Destroy(sliver_name): destroy a non-PLC-instantiated sliver"""
if rec['instantiation'] == 'delegated': accounts.get(rec['name']).ensure_destroyed()
"""Destroy(sliver_name): destroy a non-PLC-instantiated sliver"""
if rec['instantiation'] == 'delegated': accounts.get(rec['name']).ensure_destroyed()
+@export_to_api(1)
+def ReCreate(rec):
+ """ReCreate(sliver_name): destroy then recreate
+ and start sliver regardless of instantiation."""
+ accounts.get(rec['name']).ensure_destroyed()
+ accounts.get(rec['name']).ensure_created(rec)
+ accounts.get(rec['name']).start()
+
@export_to_api(1)
def Start(rec):
"""Start(sliver_name): run start scripts belonging to the specified sliver"""
@export_to_api(1)
def Start(rec):
"""Start(sliver_name): run start scripts belonging to the specified sliver"""