0c65e57e2384f243a202aa1fa2fe3c7978d27ceb
[plcapi.git] / PLC / Methods / SliceDelete.py
1 # $Id$
2 import re
3
4 from PLC.Faults import *
5 from PLC.Method import Method
6 from PLC.Parameter import Parameter, Mixed
7 from PLC.Slices import Slice, Slices
8 from PLC.Auth import Auth
9 from PLC.Methods.DeleteSlice import DeleteSlice
10
11 class SliceDelete(DeleteSlice):
12     """
13     Deprecated. See DeleteSlice.
14
15     """
16
17     status = "deprecated"
18
19     roles = ['admin', 'pi']
20
21     accepts = [
22         Auth(),
23         Slice.fields['name']
24         ]
25
26     returns = Parameter(int, 'Returns 1 if successful, a fault otherwise.')
27
28     def call(self, auth, slice_name):
29
30         return DeleteSlice.call(self, auth, slice_name)