From 66f61889b69775446b28e3efa127b06830885abb Mon Sep 17 00:00:00 2001 From: Jan Jasek Date: Wed, 16 Oct 2024 16:16:49 +0200 Subject: [PATCH] pytest-based UI tests add fix create instance If delpoy has more than 1 external network, then creating instance can fail because auto_ip create a floating ip under an unreachable external network (different than public). Change-Id: I1c894f4bde6f3a1d758be550fab946fedaa672e6 --- openstack_dashboard/test/selenium/integration/conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/openstack_dashboard/test/selenium/integration/conftest.py b/openstack_dashboard/test/selenium/integration/conftest.py index 66a6cf436c..a61a0b0927 100644 --- a/openstack_dashboard/test/selenium/integration/conftest.py +++ b/openstack_dashboard/test/selenium/integration/conftest.py @@ -206,6 +206,10 @@ def new_instance_demo(complete_default_test_network, request, instance_name, count = request.param[0] auto_ip_param = request.param[1] + if auto_ip_param: + ip_pool_param = config.network.external_network + else: + ip_pool_param = None instance = openstack_demo.create_server( instance_name, image=config.image.images_list[0], @@ -213,6 +217,7 @@ def new_instance_demo(complete_default_test_network, request, instance_name, availability_zone=config.launch_instances.available_zone, network=complete_default_test_network.name, auto_ip=auto_ip_param, + ip_pool=ip_pool_param, wait=True, max_count=count, )