X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=trunk%2FPLC%2FMethods%2FSliceDelete.py;fp=trunk%2FPLC%2FMethods%2FSliceDelete.py;h=70f6696d51b1f90123fba7659569db37d51f9789;hb=5a4c1b1278ffa01e630fde47f7c54888ed20a576;hp=0000000000000000000000000000000000000000;hpb=cee5ab52df1c9f38b6eaff2dd354cb22f59028c7;p=plcapi.git diff --git a/trunk/PLC/Methods/SliceDelete.py b/trunk/PLC/Methods/SliceDelete.py new file mode 100644 index 0000000..70f6696 --- /dev/null +++ b/trunk/PLC/Methods/SliceDelete.py @@ -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)