xci: xci-deploy.sh: Allow scenarios to overrides XCI variables. 97/44797/9
authorMarkos Chandras <mchandras@suse.de>
Wed, 11 Oct 2017 14:13:04 +0000 (15:13 +0100)
committerMarkos Chandras <mchandras@suse.de>
Tue, 17 Oct 2017 15:24:45 +0000 (16:24 +0100)
Scenario may want to override variables exported by the XCI so
allow them to define their own 'xci_overrides' file in the root directory
of the role to do so.

Change-Id: I6648eb43831a2aecc08d745a8c0fc191ce56e1b2
Signed-off-by: Markos Chandras <mchandras@suse.de>
xci/xci-deploy.sh

index d73cf5c..1e70d0d 100755 (executable)
@@ -128,6 +128,13 @@ fi
 
 # TODO: The xci playbooks can be put into a playbook which will be done later.
 
+#-------------------------------------------------------------------------------
+# Get scenario variables overrides
+#-------------------------------------------------------------------------------
+if [[ -f $XCI_PATH/scenarios/${OPNFV_SCENARIO:-_no_scenario_}/xci_overrides ]]; then
+    source $XCI_PATH/scenarios/$OPNFV_SCENARIO/xci_overrides
+fi
+
 #-------------------------------------------------------------------------------
 # Start provisioning VM nodes
 #-------------------------------------------------------------------------------