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