svn keywords
[plcapi.git] / PLC / Methods / SliceUpdate.py
1 # $Id$
2 # $URL$
3 import time
4
5 from PLC.Faults import *
6 from PLC.Method import Method
7 from PLC.Parameter import Parameter, Mixed
8 from PLC.Slices import Slice, Slices
9 from PLC.Auth import Auth
10 from PLC.Methods.UpdateSlice import UpdateSlice
11
12 class SliceUpdate(UpdateSlice):
13     """
14     Deprecated. See UpdateSlice.
15    
16     """
17
18     status = 'deprecated'
19
20     roles = ['admin', 'pi', 'user']
21
22     accepts = [
23         Auth(),
24         Slice.fields['name'],
25         Slice.fields['url'],
26         Slice.fields['description'],
27         ]
28
29     returns = Parameter(int, '1 if successful')
30
31     def call(self, auth, slice_name, url, description):
32
33         slice_fields = {}
34         slice_fields['url'] = url
35         slice_fields['description'] = description
36         
37         return UpdateSlice.call(self, auth, slice_name, slice_fields)
38
39         return 1