]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Merge trunk
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>
Wed, 24 Aug 2011 11:54:53 +0000 (12:54 +0100)
committerSalvatore Orlando <salvatore.orlando@eu.citrix.com>
Wed, 24 Aug 2011 11:54:53 +0000 (12:54 +0100)
1  2 
quantum/client.py
tests/unit/test_api.py

index 6a58e641a298b8cf8af153f841a7effd44af6566,74ac1958ba0cde0c14b3f313dc779ab9a0228d99..c75b5a243e92d401b87e9f945bf13965493c6a4b
@@@ -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.
  
index 78eedd248fae9a250a4549cd423babbca87df938,e56a2cdd77edc817f81851c8538096a1ef90a0bb..a374dffcebccf44d85244c01a52a1dba5d945fae
@@@ -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):