just autopep8'ed refreshpeer
[plcapi.git] / PLC / Methods / GetBootStates.py
index fd7bdd2..35537be 100644 (file)
@@ -2,20 +2,21 @@ 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)]