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:
1 changed files with 10 additions and 0 deletions
@@ -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
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.