- call DeleteSlice
authorTony Mack <tmack@cs.princeton.edu>
Tue, 16 Jan 2007 22:19:21 +0000 (22:19 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 16 Jan 2007 22:19:21 +0000 (22:19 +0000)
PLC/Methods/SliceDelete.py

index b009cc4..d4ec61d 100644 (file)
@@ -1,8 +1,30 @@
+import re
+
+from PLC.Faults import *
+from PLC.Method import Method
+from PLC.Parameter import Parameter, Mixed
+from PLC.Slices import Slice, Slices
+from PLC.Auth import Auth
 from PLC.Methods.DeleteSlice import DeleteSlice
 
 class SliceDelete(DeleteSlice):
     """
     Deprecated. See DeleteSlice.
+
     """
 
     status = "deprecated"
+
+    roles = ['admin', 'pi']
+
+    accepts = [
+        Auth(),
+        Slice.fields['name']
+        ]
+
+    returns = Parameter(int, 'Returns 1 if successful, a fault otherwise.')
+
+
+    def call(self, auth, slice_name):
+
+       return DeleteSlice.call(self, auth, slice_name)