From: Mark Huang Date: Fri, 20 Oct 2006 18:25:02 +0000 (+0000) Subject: - search by ip X-Git-Tag: pycurl-7_13_1~493 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ae4e73607cb90a33f55e8705919a2152ae8fe8a5;p=plcapi.git - search by ip --- diff --git a/PLC/Methods/UpdateNodeNetwork.py b/PLC/Methods/UpdateNodeNetwork.py index 26063bfa..d5ae2388 100644 --- a/PLC/Methods/UpdateNodeNetwork.py +++ b/PLC/Methods/UpdateNodeNetwork.py @@ -30,17 +30,17 @@ class UpdateNodeNetwork(Method): accepts = [ PasswordAuth(), Mixed(NodeNetwork.fields['nodenetwork_id'], - NodeNetwork.fields['hostname']), + NodeNetwork.fields['ip']), update_fields ] returns = Parameter(int, '1 if successful') - def call(self, auth, nodenetwork_id_or_hostname, nodenetwork_fields): + def call(self, auth, nodenetwork_id_or_ip, nodenetwork_fields): nodenetwork_fields = dict(filter(can_update, nodenetwork_fields.items())) # Get node network information - nodenetworks = NodeNetworks(self.api, [nodenetwork_id_or_hostname]).values() + nodenetworks = NodeNetworks(self.api, [nodenetwork_id_or_ip]).values() if not nodenetworks: raise PLCInvalidArgument, "No such node network"