Browse Source

Check return value for router create

The newest openstacksdk is set to rename some of the field names of
return values. This also affects the openstack.cloud collection. This
patch checks for both field names to make sure the os_tempest role
doesn't break when the collections release.

Change-Id: I4b30650a6c78e76982e22746933be7c132490a43
changes/02/846802/1
Rafael Castillo 2 months ago
parent
commit
56c07080a7
  1. 10
      tasks/tempest_resources.yml

10
tasks/tempest_resources.yml

@ -277,12 +277,22 @@
- tempest_router_create | bool
- name: Get router admin state and ip address
set_fact:
router_admin_state: "{{ _add_router['router']['is_admin_state_up'] }}"
router_ip: "{{ _add_router['router']['external_gateway_info']['external_fixed_ips'][0]['ip_address'] }}"
when:
- tempest_service_available_neutron | bool
- tempest_router_create | bool
- "'is_admin_state_up' in _add_router.router"
- name: Get router admin state and ip address for older collection versions
set_fact:
router_admin_state: "{{ _add_router['router']['admin_state_up'] }}"
router_ip: "{{ _add_router['router']['external_gateway_info']['external_fixed_ips'][0]['ip_address'] }}"
when:
- tempest_service_available_neutron | bool
- tempest_router_create | bool
- "'admin_state_up' in _add_router.router"
- name: Create tempest flavors
openstack.cloud.compute_flavor:

Loading…
Cancel
Save