retrieve tag_type needed for caller_may_write_tag
[plcapi.git] / PLC / Methods / GetBootStates.py
index 71e2cd4..9105d12 100644 (file)
@@ -1,3 +1,5 @@
+# $Id$
+# $URL$
 from PLC.Faults import *
 from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
@@ -6,10 +8,10 @@ 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 = [
         Auth()
@@ -17,5 +19,6 @@ class GetBootStates(Method):
 
     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)]