Skip to content

Commit

Permalink
dev: patched security group and subnet clean steps
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudguruab committed Oct 15, 2023
1 parent 0c56b2f commit dc85528
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/consistency-functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ jobs:
sudo apt remove postgresql-client-common
sudo apt install postgresql-client-common=238
sudo apt install postgresql-common
sudo python -m pip install wheel
sudo python -m pip install --upgrade pip
sudo python -m pip install --upgrade virtualenv
# https://github.com/pypa/setuptools/issues/3772
sudo python -m pip install --upgrade 'setuptools<66'
sudo python -m pip install ovs
sudo python -m pip install --upgrade setuptools
- name: Configure podman
run: |
mkdir -p ~/.config/containers
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tasks/tenant/clean_pre_workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

- name: remove osm_ports
ansible.builtin.include_tasks: check_pre_workload_ports.yml
when: networks_list.networks | length == 0
when: networks_list.networks | length != 0

- name: remove osm_subnet
openstack.cloud.subnet:
Expand Down Expand Up @@ -186,4 +186,4 @@

- name: remove osm_security_group_rule
ansible.builtin.include_tasks: check_pre_workload_security_group.yml
when: security_group_list.security_group | length == 0
when: security_group_list.security_group | length != 0
47 changes: 45 additions & 2 deletions tests/e2e/tasks/tenant/clean_workload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@
client_cert: "{{ os_migrate_dst_client_cert|default(omit) }}"
client_key: "{{ os_migrate_dst_client_key|default(omit) }}"

- name: check for os-migrate-osm_server boot volume
openstack.cloud.volume_info:
status: "available"
auth: "{{ item.auth }}"
validate_certs: "{{ item.validate_certs }}"
ca_cert: "{{ item.ca_cert }}"
client_cert: "{{ item.client_cert }}"
client_key: "{{ item.client_key }}"
loop:
- auth: "{{ os_migrate_src_auth }}"
validate_certs: "{{ os_migrate_src_validate_certs|default(omit) }}"
ca_cert: "{{ os_migrate_src_ca_cert|default(omit) }}"
client_cert: "{{ os_migrate_src_client_cert|default(omit) }}"
client_key: "{{ os_migrate_src_client_key|default(omit) }}"
- auth: "{{ os_migrate_dst_auth }}"
validate_certs: "{{ os_migrate_dst_validate_certs|default(omit) }}"
ca_cert: "{{ os_migrate_dst_ca_cert|default(omit) }}"
client_cert: "{{ os_migrate_dst_client_cert|default(omit) }}"
client_key: "{{ os_migrate_dst_client_key|default(omit) }}"
register: check_os_migrate_osm_server

- name: Remove osm_server boot volume
openstack.cloud.volume:
display_name: os-migrate-osm_server
Expand All @@ -95,7 +116,29 @@
ca_cert: "{{ os_migrate_dst_ca_cert|default(omit) }}"
client_cert: "{{ os_migrate_dst_client_cert|default(omit) }}"
client_key: "{{ os_migrate_dst_client_key|default(omit) }}"
ignore_errors: true
when:
- check_os_migrate_osm_server.volumes|map('name')|list|contains('os-migrate-osm_server')

- name: check for osm_volume
openstack.cloud.volume_info:
name: osm_volume
auth: "{{ item.auth }}"
validate_certs: "{{ item.validate_certs }}"
ca_cert: "{{ item.ca_cert }}"
client_cert: "{{ item.client_cert }}"
client_key: "{{ item.client_key }}"
loop:
- auth: "{{ os_migrate_src_auth }}"
validate_certs: "{{ os_migrate_src_validate_certs|default(omit) }}"
ca_cert: "{{ os_migrate_src_ca_cert|default(omit) }}"
client_cert: "{{ os_migrate_src_client_cert|default(omit) }}"
client_key: "{{ os_migrate_src_client_key|default(omit) }}"
- auth: "{{ os_migrate_dst_auth }}"
validate_certs: "{{ os_migrate_dst_validate_certs|default(omit) }}"
ca_cert: "{{ os_migrate_dst_ca_cert|default(omit) }}"
client_cert: "{{ os_migrate_dst_client_cert|default(omit) }}"
client_key: "{{ os_migrate_dst_client_key|default(omit) }}"
register: check_osm_volume

- name: Remove osm_volume
openstack.cloud.volume:
Expand All @@ -117,7 +160,7 @@
ca_cert: "{{ os_migrate_dst_ca_cert|default(omit) }}"
client_cert: "{{ os_migrate_dst_client_cert|default(omit) }}"
client_key: "{{ os_migrate_dst_client_key|default(omit) }}"
ignore_errors: true
when: check_osm_volume.volumes | length != 0

- name: Remove osm_fip
import_tasks: clean_workload_existing_fip.yml

0 comments on commit dc85528

Please sign in to comment.