Change-Id: Iea9d4611fa44617ffec379b914c56326481d451b
This commit is contained in:
parent
4ad5280275
commit
f52975b4ee
@ -1605,6 +1605,7 @@ class FeatureManager(traffic_manager.IperfManager,
|
||||
admin_state_up=True)['loadbalancer']
|
||||
lb_id = self.loadbalancer['id']
|
||||
self.octavia_admin_client.wait_for_load_balancer_status(lb_id)
|
||||
if clean_up is None:
|
||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
||||
self.octavia_admin_client.
|
||||
delete_octavia_load_balancer, lb_id)
|
||||
@ -1620,6 +1621,7 @@ class FeatureManager(traffic_manager.IperfManager,
|
||||
allowed_cidrs=allowed_cidrs,
|
||||
default_tls_container_ref=tls_id
|
||||
)['listener']
|
||||
if clean_up is None:
|
||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
||||
self.octavia_admin_listener_client.
|
||||
delete_octavia_listener,
|
||||
@ -1660,6 +1662,7 @@ class FeatureManager(traffic_manager.IperfManager,
|
||||
session_persistence=session_persistence)
|
||||
self.octavia_admin_client.wait_for_load_balancer_status(lb_id)
|
||||
pool_id = self.pool['pool']['id']
|
||||
if clean_up is None:
|
||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
||||
self.octavia_admin_pools_client.
|
||||
delete_octavia_pool,
|
||||
@ -1670,6 +1673,7 @@ class FeatureManager(traffic_manager.IperfManager,
|
||||
timeout=timeout, max_retries=max_retries,
|
||||
name=lb_name)
|
||||
self.octavia_admin_client.wait_for_load_balancer_status(lb_id)
|
||||
if clean_up is None:
|
||||
self.addCleanup(test_utils.call_and_ignore_notfound_exc,
|
||||
self.octavia_hm_client.
|
||||
delete_octavia_hm,
|
||||
|
@ -656,9 +656,12 @@ class OctaviaLB_Client(base.BaseNetworkClient):
|
||||
uri = self.resource_object_path % load_balancer_id
|
||||
return self.show_resource(uri, **fields)
|
||||
|
||||
def delete_octavia_load_balancer(self, load_balancer_id, cascade=False):
|
||||
def delete_octavia_load_balancer(self, load_balancer_id):
|
||||
uri = self.resource_object_path % load_balancer_id
|
||||
return self.delete_resource(uri)
|
||||
|
||||
def delete_octavia_load_balancer_with_cascade(self, load_balancer_id):
|
||||
uri = self.resource_object_path % load_balancer_id
|
||||
if cascade:
|
||||
uri = uri + '?cascade=True'
|
||||
return self.delete_resource(uri)
|
||||
|
||||
|
@ -836,8 +836,8 @@ class OctaviaRoundRobin(feature_manager.FeatureManager):
|
||||
timeout=10, max_retries=5,
|
||||
name=lb_name)
|
||||
self.octavia_admin_client.wait_for_load_balancer_status(lb_id)
|
||||
self.octavia_admin_client.delete_octavia_load_balancer(lb_id,
|
||||
cascade=True)
|
||||
self.octavia_admin_client.\
|
||||
delete_octavia_load_balancer_with_cascade(lb_id)
|
||||
self.octavia_admin_client.\
|
||||
wait_for_load_balancer_status(lb_id, is_delete_op=True)
|
||||
lbs = self.octavia_admin_client.\
|
||||
|
@ -45,7 +45,6 @@ class TestNewCase(feature_manager.FeatureManager):
|
||||
super(TestNewCase, cls).setup_clients()
|
||||
cls.cmgr_adm = cls.get_client_manager('admin')
|
||||
cls.cmgr_alt = cls.get_client_manager('alt')
|
||||
cls.cmgr_adm = cls.get_client_manager('admin')
|
||||
cls.routers_client = cls.cmgr_adm.routers_client
|
||||
cls.networks_client = cls.cmgr_adm.networks_client
|
||||
cls.subnets_client = cls.cmgr_adm.subnets_client
|
||||
@ -279,7 +278,7 @@ class TestNewCase(feature_manager.FeatureManager):
|
||||
"""
|
||||
self.create_topo_single_network(
|
||||
"route-port", create_instance=False)
|
||||
p_client = self.ports_client
|
||||
p_client = self.cmgr_adm.ports_client
|
||||
port = self.get_router_port(p_client)
|
||||
kwargs = {'port_security_enabled': True}
|
||||
self.assertRaises(exceptions.BadRequest,
|
||||
@ -433,7 +432,7 @@ class TestNewCase(feature_manager.FeatureManager):
|
||||
# Create single network attached to router topo
|
||||
self.create_topo_single_network(
|
||||
"admin_state", create_instance=False)
|
||||
ports = self.ports_client.list_ports()
|
||||
ports = self.cmgr_adm.ports_client.list_ports()
|
||||
for port in ports['ports']:
|
||||
if 'device_owner' in port:
|
||||
if port['device_owner'] == "network:dhcp":
|
||||
@ -452,7 +451,7 @@ class TestNewCase(feature_manager.FeatureManager):
|
||||
topology_dict = self.create_topo_single_network(
|
||||
"dhcp_port", create_instance=False)
|
||||
network_state = topology_dict['network_state']
|
||||
ports = self.ports_client.list_ports()
|
||||
ports = self.cmgr_adm.ports_client.list_ports()
|
||||
for port in ports['ports']:
|
||||
if 'device_owner' in port:
|
||||
if port['device_owner'] == "network:dhcp" \
|
||||
@ -598,7 +597,7 @@ class TestNewCase(feature_manager.FeatureManager):
|
||||
1)
|
||||
fix_ip = [
|
||||
{'subnet_id': subnet_state.get('id'),
|
||||
'ip_address': network_cidr[0] + '.2'}]
|
||||
'ip_address': network_cidr[0] + '.222'}]
|
||||
args = {'fixed_ips': fix_ip, 'network_id': network_state['id']}
|
||||
self.assertRaises(exceptions.BadRequest,
|
||||
self.cmgr_adm.ports_client.create_port,
|
||||
|
Loading…
Reference in New Issue
Block a user