diff --git a/tests/e2e/tasks/tenant/clean_pre_workload.yml b/tests/e2e/tasks/tenant/clean_pre_workload.yml index addc0aec..c6165c30 100644 --- a/tests/e2e/tasks/tenant/clean_pre_workload.yml +++ b/tests/e2e/tasks/tenant/clean_pre_workload.yml @@ -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.keys() | length != 0 - name: remove osm_subnet openstack.cloud.subnet: diff --git a/tests/e2e/tasks/tenant/clean_workload_volumes.yml b/tests/e2e/tasks/tenant/clean_workload_volumes.yml index 1a56cc85..e2282be8 100644 --- a/tests/e2e/tasks/tenant/clean_workload_volumes.yml +++ b/tests/e2e/tasks/tenant/clean_workload_volumes.yml @@ -20,7 +20,7 @@ - name: Remove src osm_volume ansible.builtin.command: - cmd: openstack volume delete osm_volume + cmd: openstack volume delete osm_volume environment: OS_AUTH_TYPE: token OS_AUTH_URL: "{{ os_migrate_src_auth.auth_url }}" diff --git a/tests/e2e/tasks/tenant/seed_workload.yml b/tests/e2e/tasks/tenant/seed_workload.yml index 40ab7a49..c74466b0 100644 --- a/tests/e2e/tasks/tenant/seed_workload.yml +++ b/tests/e2e/tasks/tenant/seed_workload.yml @@ -1,12 +1,19 @@ -- name: Create osm_volume - openstack.cloud.volume: - display_name: osm_volume - size: 1 +- name: get auth token + openstack.cloud.auth: 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) }}" + register: auth_token_src + +- name: Create osm_volume + ansible.builtin.command: + cmd: openstack volume create --size 1 --display-name osm_volume + environment: + OS_AUTH_TYPE: token + OS_AUTH_URL: "{{ os_migrate_src_auth.auth_url }}" + OS_TOKEN: "{{ auth_token_src.auth_token }}" + OS_PROJECT_ID: "{{ os_migrate_src_auth.project_id|default('') }}" + OS_PROJECT_NAME: "{{ os_migrate_src_auth.project_name|default('') }}" + OS_PROJECT_DOMAIN_ID: "{{ os_migrate_src_auth.project_domain_id|default('') }}" + OS_PROJECT_DOMAIN_NAME: "{{ os_migrate_src_auth.project_domain_name|default('') }}" - name: Create osm_server openstack.cloud.server: