fix calling convention
[plcapi.git] / PLC / Methods / DeleteNodeFromNodeGroup.py
index aa80631..70c05ce 100644 (file)
@@ -3,7 +3,7 @@ from PLC.Method import Method
 from PLC.Parameter import Parameter, Mixed
 from PLC.NodeGroups import NodeGroup, NodeGroups
 from PLC.Nodes import Node, Nodes
-from PLC.Auth import PasswordAuth
+from PLC.Auth import Auth
 
 class DeleteNodeFromNodeGroup(Method):
     """
@@ -15,16 +15,16 @@ class DeleteNodeFromNodeGroup(Method):
     roles = ['admin']
 
     accepts = [
-        PasswordAuth(),
+        Auth(),
+       Mixed(Node.fields['node_id'],
+             Node.fields['hostname']),
         Mixed(NodeGroup.fields['nodegroup_id'],
              NodeGroup.fields['name']),
-       Mixed(Node.fields['node_id'],
-             Node.fields['hostname'])
         ]
 
     returns = Parameter(int, '1 if successful')
 
-    def call(self, auth, nodegroup_id_or_name, node_id_or_hostname):
+    def call(self, auth, node_id_or_hostname, nodegroup_id_or_name):
         # Get node info
        nodes = Nodes(self.api, [node_id_or_hostname])
        if not nodes: