use self.get_auth_info
[sfa.git] / sfa / methods / reset_slice.py
1 ### $Id$
2 ### $URL$
3
4 from sfa.util.faults import *
5 from sfa.util.misc import *
6 from sfa.util.method import Method
7 from sfa.util.parameter import Parameter, Mixed
8 from sfa.util.auth import Auth
9 from sfa.util.slices import Slices
10
11 class reset_slices(Method):
12     """
13     Reset the specified slice      
14
15     @param cred credential string specifying the rights of the caller
16     @param hrn human readable name of slice to instantiate
17     @return 1 is successful, faults otherwise  
18     """
19
20     interfaces = ['aggregate', 'slicemgr']
21     
22     accepts = [
23         Parameter(str, "Credential string"),
24         Parameter(str, "Human readable name of slice to instantiate"),
25         ]
26
27     returns = [Parameter(int, "1 if successful")]
28     
29     def call(self, cred, hrn):
30        
31         self.api.auth.check(cred, 'resetslice')
32         ## XX Not yet implemented
33  
34         return 1