X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetBootStates.py;h=9105d1256a9260438668cb5fae82f28cfcba7a6f;hb=fa30ab2d1e1b9e35b1852bfb775620fb8e517496;hp=fd7bdd27aead88bc18a2466b5755fd961389725c;hpb=0bb08c2256514d0091d05a5e2a5e19e963a59358;p=plcapi.git diff --git a/PLC/Methods/GetBootStates.py b/PLC/Methods/GetBootStates.py index fd7bdd2..9105d12 100644 --- a/PLC/Methods/GetBootStates.py +++ b/PLC/Methods/GetBootStates.py @@ -1,21 +1,24 @@ +# $Id$ +# $URL$ 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)]