Remove support for extensions as lists
With tempest devstack and networking-odl switched to using dict, we can now remove support for using lists for the list of extensions. Depends-on: https://review.openstack.org/539686/ Depends-on: https://review.openstack.org/539708/ Depends-on: https://review.openstack.org/539854/ Change-Id: I62aaa737300c3b24e416f18e4bc469e7bd46ea29
This commit is contained in:
parent
40ef3c084e
commit
b3615c0d97
@ -5,34 +5,18 @@
|
||||
register: sources
|
||||
no_log: true
|
||||
|
||||
- name: Output a warning when input is not a dict and not empty
|
||||
debug:
|
||||
msg: "WARNING: extensions_to_txt is a list, values defined by parents will be overwritten"
|
||||
when:
|
||||
- extensions_to_txt is not mapping
|
||||
- extensions_to_txt
|
||||
|
||||
- name: Build the extensions list when input is not a dict (including empty)
|
||||
- name: Build the extensions list from a dict (or empty)
|
||||
set_fact:
|
||||
extension_list: >
|
||||
{% set extensions = ['__does_not_match__'] -%}
|
||||
{% set extensions = ['__do_not_match__'] -%}
|
||||
{% if extensions_to_txt -%}
|
||||
{% set extensions = extensions_to_txt -%}
|
||||
{% endif -%}
|
||||
{{- extensions -}}
|
||||
when: extensions_to_txt is not mapping
|
||||
|
||||
- name: Build the extensions list when input is a dict
|
||||
set_fact:
|
||||
extension_list: >
|
||||
{% set extensions = [] -%}
|
||||
{% for extension, extension_bool in extensions_to_txt.items() -%}
|
||||
{% if extension_bool -%}
|
||||
{% set _ = extensions.append(extension) -%}
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% endif -%}
|
||||
{{- extensions -}}
|
||||
when: extensions_to_txt is mapping
|
||||
|
||||
- name: Build the extensions regular expression
|
||||
set_fact:
|
||||
|
Loading…
Reference in New Issue
Block a user