X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetBootStates.py;h=be77fa3ae9371f4752dc54826ae5b9f22af52c25;hb=05f997154b39466090ca31d62cb49ad4d501c0c1;hp=fd7bdd27aead88bc18a2466b5755fd961389725c;hpb=0bb08c2256514d0091d05a5e2a5e19e963a59358;p=plcapi.git diff --git a/PLC/Methods/GetBootStates.py b/PLC/Methods/GetBootStates.py index fd7bdd2..be77fa3 100644 --- a/PLC/Methods/GetBootStates.py +++ b/PLC/Methods/GetBootStates.py @@ -1,21 +1,23 @@ +# $Id# from PLC.Faults import * from PLC.Method import Method from PLC.Parameter import Parameter, Mixed from PLC.BootStates import BootState, BootStates -from PLC.Auth import PasswordAuth +from PLC.Auth import Auth class GetBootStates(Method): """ - Returns a list of all valid node boot states. + Returns an array of all valid node boot states. """ - roles = ['admin', 'pi', 'user', 'tech'] + roles = ['admin', 'pi', 'user', 'tech', 'node'] accepts = [ - PasswordAuth() + Auth() ] returns = [BootState.fields['boot_state']] + def call(self, auth): - return [boot_state['boot_state'] for boot_state in BootStates(self.api).values()] + return [boot_state['boot_state'] for boot_state in BootStates(self.api)]