Allows nic mapping to set hieradata variables 61/15561/2
authorTim Rozet <trozet@redhat.com>
Tue, 14 Jun 2016 19:39:26 +0000 (15:39 -0400)
committerTim Rozet <trozet@redhat.com>
Tue, 14 Jun 2016 20:52:53 +0000 (16:52 -0400)
Currently os-net-config figures out the mapping of logical nic names,
such as "nic1" to a physical nic on the overcloud node.  This mapping is
not exposed to THT.  This patch allows the mapping to be placed in a
hieradata file that can be access by THT during the deployment.

JIRA: APEX-119

opnfv-tht-pr: 28

Change-Id: I7ec631fe2a04ce6193b72b2e56eb34a24a4507e1
Signed-off-by: Tim Rozet <trozet@redhat.com>
build/overcloud-full.sh

index 106b487..1a8d846 100755 (executable)
@@ -28,6 +28,14 @@ pushd opnfv-puppet-tripleo > /dev/null
 git archive --format=tar.gz --prefix=tripleo/ HEAD > ../opnfv-puppet-tripleo.tar.gz
 popd > /dev/null
 
+# download customized os-net-config
+git clone https://github.com/trozet/os-net-config.git -b hiera_nic_mapping
+pushd os-net-config > /dev/null
+pushd os_net_config > /dev/null
+git archive --format=tar.gz --prefix=os_net_config/ HEAD > ../../os-net-config.tar.gz
+popd > /dev/null
+popd > /dev/null
+
 pushd images > /dev/null
 
 dpdk_pkg_str=''
@@ -48,6 +56,8 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --install "centos-release-qemu-ev" \
     --run-command "yum update -y" \
     --run-command "yum remove -y qemu-system-x86" \
+    --upload ../os-net-config.tar.gz:/usr/lib/python2.7/site-packages \
+    --run-command "cd /usr/lib/python2.7/site-packages/ && rm -rf os_net_config && tar xzf os-net-config.tar.gz" \
     -a overcloud-full_build.qcow2
 
 mv -f overcloud-full_build.qcow2 overcloud-full.qcow2