From 5f74d1464f7b3e587b3307cde2546508d2ec9383 Mon Sep 17 00:00:00 2001 From: m Date: Thu, 4 Apr 2024 16:46:30 +0300 Subject: [PATCH] Adds os_cloud_name variable for development_environment role As part of [1] this adds a new os_cloud_name var for the development_environment role to be used with the prelaunch vm test instance creation. This retains current behaviour OS_CLOUD=standalone. Needed by [2]. https://issues.redhat.com/browse/OSPRH-5754 [1] https://issues.redhat.com/browse/OSPRH-3038 [2] https://review.rdoproject.org/r/c/rdo-jobs/+/52452 --- tests/roles/dataplane_adoption/tasks/main.yaml | 2 +- tests/roles/development_environment/defaults/main.yaml | 1 + tests/roles/development_environment/files/pre_launch.bash | 2 +- tests/roles/development_environment/tasks/main.yaml | 4 +++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/roles/dataplane_adoption/tasks/main.yaml b/tests/roles/dataplane_adoption/tasks/main.yaml index 8c139324c..003d79004 100644 --- a/tests/roles/dataplane_adoption/tasks/main.yaml +++ b/tests/roles/dataplane_adoption/tasks/main.yaml @@ -332,7 +332,7 @@ - openvswitch3.1 # ovn-controller settings - edpm_ovn_bridge_mappings: ['datacentre:br-ctlplane'] + edpm_ovn_bridge_mappings: ["datacentre:{{ neutron_physical_bridge_name }}"] edpm_ovn_bridge: br-int edpm_ovn_encap_type: geneve ovn_match_northd_version: false diff --git a/tests/roles/development_environment/defaults/main.yaml b/tests/roles/development_environment/defaults/main.yaml index 83f65d456..3775bce01 100644 --- a/tests/roles/development_environment/defaults/main.yaml +++ b/tests/roles/development_environment/defaults/main.yaml @@ -2,3 +2,4 @@ prelaunch_test_instance: true prelaunch_test_instance_script: pre_launch.bash edpm_privatekey_path: ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa run_pre_adoption_validation: true +os_cloud_name: standalone diff --git a/tests/roles/development_environment/files/pre_launch.bash b/tests/roles/development_environment/files/pre_launch.bash index d40859e52..88dcdb070 100755 --- a/tests/roles/development_environment/files/pre_launch.bash +++ b/tests/roles/development_environment/files/pre_launch.bash @@ -1,6 +1,6 @@ set -e -alias openstack="ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa root@192.168.122.100 OS_CLOUD=standalone openstack" +alias openstack="ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa root@${OS_CLOUD_IP} OS_CLOUD=${OS_CLOUD_NAME} openstack" function wait_for_status() { local time=0 diff --git a/tests/roles/development_environment/tasks/main.yaml b/tests/roles/development_environment/tasks/main.yaml index 4b2f47a8a..efdd39a3e 100644 --- a/tests/roles/development_environment/tasks/main.yaml +++ b/tests/roles/development_environment/tasks/main.yaml @@ -4,8 +4,10 @@ environment: INSTALL_YAMLS_PATH: "{{ install_yamls_path }}" EDPM_PRIVATEKEY_PATH: "{{ edpm_privatekey_path }}" + OS_CLOUD_IP: "{{ standalone_ip | default(edpm_node_ip) }}" + OS_CLOUD_NAME: "{{ os_cloud_name }}" ansible.builtin.shell: cmd: | {{ shell_header }} - alias openstack="ssh -i {{ edpm_privatekey_path }} root@{{ edpm_node_ip }} OS_CLOUD=standalone openstack" + alias openstack="ssh -i {{ edpm_privatekey_path }} root@${OS_CLOUD_IP} OS_CLOUD=${OS_CLOUD_NAME} openstack" {{ lookup('ansible.builtin.file', prelaunch_test_instance_script) }}