svn keywords
[plcapi.git] / PLC / Methods / DeleteBootState.py
index bf4175d..2339778 100644 (file)
@@ -1,8 +1,10 @@
+# $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 DeleteBootState(Method):
     """
@@ -17,18 +19,19 @@ class DeleteBootState(Method):
     roles = ['admin']
 
     accepts = [
-        PasswordAuth(),
+        Auth(),
         BootState.fields['boot_state']
         ]
 
     returns = Parameter(int, '1 if successful')
 
+
     def call(self, auth, name):
         boot_states = BootStates(self.api, [name])
         if not boot_states:
             raise PLCInvalidArgument, "No such boot state"
-        boot_state = boot_states.values()[0]
+        boot_state = boot_states[0]
 
         boot_state.delete()
-
+       
         return 1