From: Salvatore Orlando Date: Wed, 24 Aug 2011 11:54:53 +0000 (+0100) Subject: Merge trunk X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=c67ae6e12feb39311a3a67b257a25bc44465776d;p=openstack-build%2Fneutron-build.git Merge trunk --- c67ae6e12feb39311a3a67b257a25bc44465776d diff --cc quantum/client.py index 6a58e641a,74ac1958b..c75b5a243 --- a/quantum/client.py +++ b/quantum/client.py @@@ -30,8 -30,10 +30,7 @@@ EXCEPTIONS = 430: exceptions.PortNotFound, 431: exceptions.StateInvalid, 432: exceptions.PortInUse, - 440: exceptions.AlreadyAttached - 440: exceptions.AlreadyAttached, - 441: exceptions.AttachmentNotReady, --} ++ 440: exceptions.AlreadyAttached} class ApiCall(object): @@@ -72,7 -72,7 +69,7 @@@ class Client(object) def __init__(self, host="127.0.0.1", port=9696, use_ssl=False, tenant=None, format="xml", testingStub=None, key_file=None, cert_file=None, - logger=None): - logger=None, action_prefix="/v0.1/tenants/{tenant_id}"): ++ logger=None, action_prefix="/v1.0/tenants/{tenant_id}"): """ Creates a new client to some service. diff --cc tests/unit/test_api.py index 78eedd248,e56a2cdd7..a374dffce --- a/tests/unit/test_api.py +++ b/tests/unit/test_api.py @@@ -523,23 -427,6 +523,22 @@@ class APITest(unittest.TestCase) show_port_res.body, content_type) self.assertEqual({'id': port_id, 'state': new_port_state}, port_data['port']) - + # now set it back to the original value + update_port_req = testlib.update_port_request(self.tenant_id, + network_id, port_id, + port_state, + format) + update_port_res = update_port_req.get_response(self.api) + self.assertEqual(update_port_res.status_int, 204) + show_port_req = testlib.show_port_request(self.tenant_id, + network_id, port_id, + format) + show_port_res = show_port_req.get_response(self.api) + self.assertEqual(show_port_res.status_int, 200) + port_data = self._port_serializer.deserialize( + show_port_res.body, content_type) + self.assertEqual({'id': port_id, 'state': port_state}, + port_data['port']) LOG.debug("_test_set_port_state - format:%s - END", format) def _test_set_port_state_networknotfound(self, format):