Merge from trunk
[plcapi.git] / trunk / PLC / Methods / SliceDelete.py
diff --git a/trunk/PLC/Methods/SliceDelete.py b/trunk/PLC/Methods/SliceDelete.py
new file mode 100644 (file)
index 0000000..70f6696
--- /dev/null
@@ -0,0 +1,29 @@
+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)