summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/get-opnfv-scenario-requirements.yml
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-12-14 09:42:47 +0000
committerMarkos Chandras <mchandras@suse.de>2017-12-14 13:30:25 +0000
commitdc2856dde1760d408b03fd95a104133b6efd9c10 (patch)
tree40f4ba3be1c1743b50cf9a8fe7c9a145ce39ce85 /xci/playbooks/get-opnfv-scenario-requirements.yml
parentb2dfffae695ea299ac5f11e48f99068390bcc671 (diff)
xci: Add flavor information for scenarios
Scenarios may not support all XCI flavors so record that information per scenario basis. This will resolve failures when we try to deploy a scenario that doesn't support the selected flavor. JIRA: RELENG-338 Change-Id: I5f73b139ee6c1831896aa32147c4dc1368673d92 Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks/get-opnfv-scenario-requirements.yml')
-rw-r--r--xci/playbooks/get-opnfv-scenario-requirements.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml
index 11aee8ee..173b825e 100644
--- a/xci/playbooks/get-opnfv-scenario-requirements.yml
+++ b/xci/playbooks/get-opnfv-scenario-requirements.yml
@@ -83,6 +83,26 @@
loop_control:
label: "{{ item.item.scenario }}"
+ - name: Determine if selected {{ OPNFV_SCENARIO }} scenario can be deployed
+ set_fact:
+ deploy_scenario_on_flavor: XCI_FLAVOR in item.flavors
+ when: OPNFV_SCENARIO == item.scenario
+ with_items: "{{ scenarios }}"
+ loop_control:
+ label: "{{ item.scenario }}"
+
+ - name: Fail if {{ XCI_FLAVOR }} is not supported in {{ OPNFV_SCENARIO }}
+ fail:
+ msg:
+ - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ - ERROR! The {{ OPNFV_SCENARIO }} scenario does not support the {{ XCI_FLAVOR }}
+ - ''
+ - This is a great chance for you to contribute to XCI ;-)
+ - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ - ''
+ when:
+ - not deploy_scenario_on_flavor
+
vars:
ansible_python_interpreter: "/usr/bin/python"
scenarios: "{{ lookup('file', scenario_file) | from_yaml }}"