1 ### $Id: reboot.py 15428 2009-10-23 15:28:03Z tmack $
2 ### $URL: https://svn.planet-lab.org/svn/sfa/trunk/sfacomponent/methods/reboot.py $
4 from sfa.util.faults import *
5 from sfa.util.method import Method
6 from sfa.util.parameter import Parameter, Mixed
12 @param cred credential string specifying the rights of the caller
16 interfaces = ['component']
19 Parameter(str, "Credential string"),
26 self.api.auth.check(cred, 'reboot')
27 # send the call to the right manager
28 manager_base = 'sfa.managers'
29 mgr_type = self.api.config.SFA_CM_TYPE
30 manager_module = manager_base + ".component_manager_%s" % mgr_type
31 manager = __import__(manager_module, fromlist=[manager_base])