-@export_to_docbook(roles=['nm-controller', 'self'],
- accepts=[Parameter(str, 'A sliver/slice name.')],
- returns=Parameter(dict, "A resource specification"))
+
+@export_to_docbook(roles=['nm-controller', 'self'],
+ accepts=[Parameter(str, 'A sliver/slice name.')],
+ returns=Parameter(int, '1 if successful'))
+@export_to_api(1)
+def ReCreate(sliver_name):
+ """Stop, Destroy, Create, Start sliver in order to reinstall it."""
+ rec = sliver_name
+ account.get(rec['name']).stop()
+ account.get(rec['name']).ensure_created(rec)
+ account.get(rec['name']).start(rec)
+ logger.log("api_calls: ReCreate %s"%rec['name'])
+
+@export_to_docbook(roles=['nm-controller', 'self'],
+ accepts=[Parameter(str, 'A sliver/slice name.')],
+ returns=Parameter(dict, "A resource specification"))