X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FMethods%2FGetBootStates.py;h=35537bef0b59728c98d96f2611eaf3ab914fc023;hb=19d4a01ccf66af9e00914351b3eacd5fc880f988;hp=1c9afc3ec863eea4295c59b8bb19ae60f3726e2b;hpb=8e199f468aaf48ac1dad3090c149711f38aa6c38;p=plcapi.git diff --git a/PLC/Methods/GetBootStates.py b/PLC/Methods/GetBootStates.py index 1c9afc3..35537be 100644 --- a/PLC/Methods/GetBootStates.py +++ b/PLC/Methods/GetBootStates.py @@ -9,16 +9,14 @@ class GetBootStates(Method): Returns an array of all valid node boot states. """ - roles = ['admin', 'pi', 'user', 'tech'] + roles = ['admin', 'pi', 'user', 'tech', 'node'] accepts = [ Auth() ] returns = [BootState.fields['boot_state']] - - event_type = 'Get' - object_type = 'BootState' + def call(self, auth): return [boot_state['boot_state'] for boot_state in BootStates(self.api)]