svn keywords
[plcapi.git] / PLC / Methods / SliceRenew.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 SliceRenew(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['expires']
26         ]
27
28     returns = Parameter(int, '1 if successful')
29
30     def call(self, auth, slice_name, slice_expires):
31
32         slice_fields = {}
33         slice_fields['expires'] = slice_expires
34         
35         return UpdateSlice.call(self, auth, slice_name, slice_fields)
36