diff options
author | Markos Chandras <mchandras@suse.de> | 2017-12-22 10:36:27 +0000 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-01-03 09:53:28 +0000 |
commit | 76da09f4dea888b247dde3852bd895bbf0e4aa20 (patch) | |
tree | f4d1d67bd509976e28fa184b5c081fd3b878917b /xci/playbooks | |
parent | d3116e3182ebae9d40544060a0318cbc382e388c (diff) |
xci: Record distribution and NFVI information for scenarios
A scenario may only support certain NFVIs or distributions so we
need a mapping with all these things so we know what can be tested
and where.
Change-Id: Ibf1b640b762085f58627e05e1d2ca13edfc4d716
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks')
-rw-r--r-- | xci/playbooks/get-opnfv-scenario-requirements.yml | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml index b44c50b4..f515c253 100644 --- a/xci/playbooks/get-opnfv-scenario-requirements.yml +++ b/xci/playbooks/get-opnfv-scenario-requirements.yml @@ -95,25 +95,47 @@ loop_control: label: "{{ item.item.scenario }}" - - name: Determine if selected {{ DEPLOY_SCENARIO }} scenario can be deployed + - name: Gather information about the selected {{ DEPLOY_SCENARIO }} scenario set_fact: - deploy_scenario_on_flavor: "{{ (XCI_FLAVOR in item.flavors) | ternary(True, False) }}" - when: DEPLOY_SCENARIO == item.scenario + deploy_scenario: "{{ item }}" with_items: "{{ scenarios }}" loop_control: label: "{{ item.scenario }}" + when: DEPLOY_SCENARIO | lower == item.scenario - - name: Fail if {{ XCI_FLAVOR }} is not supported in {{ DEPLOY_SCENARIO }} + - name: Determine if the selected {{ DEPLOY_SCENARIO }} scenario can be deployed + block: + - set_fact: + deploy_scenario_nfvi: "{{ item }}" + with_items: "{{ deploy_scenario.nfvis }}" + loop_control: + label: "{{ item.nfvi }}" + when: item.nfvi == XCI_NFVI + - set_fact: + deploy_scenario_flavor: "{{ (XCI_FLAVOR in deploy_scenario_nfvi.flavors) | bool }}" + when: + - deploy_scenario_nfvi + - set_fact: + deploy_scenario_distro: "{{ (XCI_DISTRO in deploy_scenario_nfvi.distros) | bool }}" + when: + - deploy_scenario_nfvi + - deploy_scenario_flavor + when: deploy_scenario is defined + + - name: Fail if {{ DEPLOY_SCENARIO }} is not supported fail: msg: - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - - ERROR! The {{ DEPLOY_SCENARIO }} scenario does not support the {{ XCI_FLAVOR }} + - ERROR! The {{ DEPLOY_SCENARIO }} scenario can't be deployed. This is because + - the {{ XCI_NFVI }} NFVI or the {{ XCI_FLAVOR }} flavor or the {{ XCI_DISTRO }} + - distribution is not supported by this scenario. It may also be possible that + - this scenario doesn't exist at all or it's not listed in {{ scenario_file }}. - '' - This is a great chance for you to contribute to XCI ;-) - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - '' when: - - not deploy_scenario_on_flavor + - deploy_scenario is not defined or not deploy_scenario_distro vars: ansible_python_interpreter: "/usr/bin/python" |