From: Salvatore Orlando Date: Fri, 12 Aug 2011 11:17:30 +0000 (+0100) Subject: Merging: lp:~danwent/quantum/client-lib X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=574aa60b60ceb0aaa7b019422c51547833c9cde6;p=openstack-build%2Fneutron-build.git Merging: lp:~danwent/quantum/client-lib Some minor tweaks to the Quantum Client Library, based on my experience using the library. --- 574aa60b60ceb0aaa7b019422c51547833c9cde6 diff --cc quantum/client.py index 85d405714,706978616..517ba6d66 --- a/quantum/client.py +++ b/quantum/client.py @@@ -191,15 -207,17 +210,15 @@@ class Client(object) @api_call def create_network(self, body=None): """ - Creates a new network on the server + Creates a new network """ - body = self.serialize(body) return self.do_request("POST", self.networks_path, body=body) @api_call def update_network(self, network, body=None): """ - Updates a network on the server + Updates a network """ - body = self.serialize(body) return self.do_request("PUT", self.network_path % (network), body=body) @api_call @@@ -240,8 -259,9 +260,8 @@@ @api_call def set_port_state(self, network, port, body=None): """ - Sets the state of a port on the server + Sets the state of the specified port """ - body = self.serialize(body) return self.do_request("PUT", self.port_path % (network, port), body=body) @@@ -255,8 -275,9 +275,8 @@@ @api_call def attach_resource(self, network, port, body=None): """ - Deletes a port from a network on the server + Sets the attachment-id of the specified port """ - body = self.serialize(body) return self.do_request("PUT", self.attachment_path % (network, port), body=body)