430: exceptions.PortNotFound,
431: exceptions.StateInvalid,
432: exceptions.PortInUse,
- 440: exceptions.AlreadyAttached
- 440: exceptions.AlreadyAttached,
- 441: exceptions.AttachmentNotReady,
--}
++ 440: exceptions.AlreadyAttached}
class ApiCall(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.
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):