[Baremetal] Include a baremetal variable 89/60789/22
authorManuel Buil <mbuil@suse.com>
Thu, 9 Aug 2018 14:06:42 +0000 (16:06 +0200)
committerManuel Buil <mbuil@suse.com>
Mon, 1 Oct 2018 11:06:50 +0000 (13:06 +0200)
It switches between parts of the code which are specific for baremetal
or non-baremetal. Those parts come with this patch:

https://gerrit.opnfv.org/gerrit/#/c/60797

It also selects different variables when calling the opnfv-virtual.yml
playbook:

https://gerrit.opnfv.org/gerrit/#/c/60795

It decides the value of BAREMETAL based on the vendor value of the pdf

Change-Id: I8e6171f4f21db7f814a472e6ed1bacb30220b4ec
Signed-off-by: Manuel Buil <mbuil@suse.com>
xci/files/xci-lib.sh
xci/var/opnfv.yml

index 2f360e4..cb0751d 100644 (file)
@@ -52,6 +52,8 @@ function bootstrap_xci_env() {
     source "$XCI_PATH/xci/installer/${INSTALLER_TYPE}/env" &>/dev/null || true
     # source xci configuration
     source $XCI_PATH/xci/config/env-vars
+    # source the baremetal variable
+    grep -o vendor.* ${PDF} | grep -q libvirt && export BAREMETAL=false || export BAREMETAL=true
 }
 
 function install_ansible() {
index e7e3b76..b24a6d9 100644 (file)
@@ -49,3 +49,6 @@ run_tempest: "{{ lookup('env', 'RUN_TEMPEST') }}"
 core_openstack_install: "{{ lookup('env', 'CORE_OPENSTACK_INSTALL') }}"
 deploy_scenario: "{{ lookup('env','DEPLOY_SCENARIO') }}"
 installer_type: "{{ lookup('env','INSTALLER_TYPE') }}"
+
+# baremetal variables
+baremetal: "{{ lookup('env','BAREMETAL') }}"