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
This commit is contained in:
Rafael Castillo
2022年06月20日 14:00:18 -07:00
parent 18f2c885da
commit 56c07080a7

View File

@@ -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:
Reference in New Issue
openstack/openstack-ansible-os_tempest
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.