DeleteNodeNetwork need not require node_id_or_hostname to be passed in
[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 PasswordAuth
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     accepts = [
15         PasswordAuth(),
16         Mixed(Node.fields['node_id'],
17               Node.fields['hostname']),
18         Mixed(NodeNetwork.fields['nodenetwork_id'],
19               NodeNetwork.fields['hostname'])
20         ]
21
22     def call(self, auth, node_id_or_hostname, nodenetwork_id_or_hostname):
23         return DeleteNodeNetwork.call(self, auth, nodenetwork_id_or_hostname)