- does basically the same thing as Cache.py, except since we have cached
[plcapi.git] / PLC / Methods / AdmQueryConfFile.py
index 28771d2..6cf5d99 100644 (file)
@@ -3,7 +3,7 @@ from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
 from PLC.Nodes import Node, Nodes
 from PLC.ConfFiles import ConfFile, ConfFiles
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
 
 class AdmQueryConfFile(Method):
     """
@@ -15,7 +15,7 @@ class AdmQueryConfFile(Method):
     roles = ['admin', 'pi', 'user', 'tech']
 
     accepts = [
-        PasswordAuth(),
+        Auth(),
         {'node_id': Node.fields['node_id']}
         ]
 
@@ -23,7 +23,7 @@ class AdmQueryConfFile(Method):
 
     def call(self, auth, search_vals):
         if 'node_id' in search_vals:
-            conf_files = ConfFiles(self.api).values()
+            conf_files = ConfFiles(self.api)
 
             conf_files = filter(lambda conf_file: \
                                 search_vals['node_id'] in conf_file['node_ids'],