(most) all functions now take SessionAuth in addition to PasswordAuth
[plcapi.git] / PLC / Methods / AdmDeleteNodeNetwork.py
1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Auth import Auth
5 from PLC.Nodes import Node, Nodes
6 from PLC.NodeNetworks import NodeNetwork, NodeNetworks
7 from PLC.Methods.DeleteNodeNetwork import DeleteNodeNetwork
8
9 class AdmDeleteNodeNetwork(DeleteNodeNetwork):
10     """
11     Deprecated. See DeleteNodeNetwork.
12     """
13
14     status = "deprecated"
15
16     accepts = [
17         Auth(),
18         Mixed(Node.fields['node_id'],
19               Node.fields['hostname']),
20         Mixed(NodeNetwork.fields['nodenetwork_id'],
21               NodeNetwork.fields['ip'])
22         ]
23
24     def call(self, auth, node_id_or_hostname, nodenetwork_id_or_ip):
25         return DeleteNodeNetwork.call(self, auth, nodenetwork_id_or_ip)