示例#1
0
 def _test_delete_attachment_portnotfound(self, fmt):
     LOG.debug("_test_delete_attachment_portnotfound - fmt:%s - START", fmt)
     port_state = "ACTIVE"
     network_id = self._create_network(fmt)
     self._create_port(network_id, port_state, fmt)
     del_attachment_req = testlib.delete_attachment_request(self.tenant_id, network_id, "A_BAD_ID", fmt)
     del_attachment_res = del_attachment_req.get_response(self.api)
     self.assertEqual(del_attachment_res.status_int, self._port_not_found_code)
     LOG.debug("_test_delete_attachment_portnotfound - fmt:%s - END", fmt)
示例#2
0
 def _test_delete_attachment(self, fmt):
     LOG.debug("_test_delete_attachment - fmt:%s - START", fmt)
     port_state = "ACTIVE"
     network_id = self._create_network(fmt)
     interface_id = "test_interface"
     port_id = self._create_port(network_id, port_state, fmt)
     put_attachment_req = testlib.put_attachment_request(self.tenant_id, network_id, port_id, interface_id, fmt)
     put_attachment_res = put_attachment_req.get_response(self.api)
     self.assertEqual(put_attachment_res.status_int, 204)
     del_attachment_req = testlib.delete_attachment_request(self.tenant_id, network_id, port_id, fmt)
     del_attachment_res = del_attachment_req.get_response(self.api)
     self.assertEqual(del_attachment_res.status_int, 204)
     LOG.debug("_test_delete_attachment - fmt:%s - END", fmt)