summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorZhijiang Hu <hu.zhijiang@zte.com.cn>2017-09-27 02:19:51 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-27 02:19:51 +0000
commit591b723e3d962c7d118497bbad4570eab8217390 (patch)
treeed51e801eae756db6f3f4360fd50980c38701612 /ci
parentb224ded409981b390df213309c2ed6eaca14fa4b (diff)
parent6c26da419ff6fd6f82377e8e19187af37fe8d783 (diff)
Merge "Use pxe bridge to replace the bridge in VM template" into stable/euphrates
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy/deploy.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh
index b04cf713..ec30c7a8 100755
--- a/ci/deploy/deploy.sh
+++ b/ci/deploy/deploy.sh
@@ -371,6 +371,15 @@ function clean_up_target_vnetworks()
done
}
+function update_pxe_bridge()
+{
+ bridge_name=$(grep "<source * bridge" $BMDEPLOY_DAISY_SERVER_VM | awk -F "'" '{print $2}') || True
+ if [ ${bridge_name} ] && [ ${bridge_name} != ${BRIDGE} ] && [ ! -z ${bridge_name} ]; then
+ echo "Use $BRIDGE to replace the bridge in $BMDEPLOY_DAISY_SERVER_VM"
+ sed -i -e "/source * bridge/{s/source.*$/source bridge=\'$BRIDGE\'\/>/;}" $BMDEPLOY_DAISY_SERVER_VM
+ fi
+}
+
function create_daisy_vm_and_networks()
{
echo "====== Create Daisy VM ======"
@@ -378,6 +387,7 @@ function create_daisy_vm_and_networks()
if [ $IS_BARE == 0 ];then
create_node $VMDELOY_DAISY_SERVER_NET daisy1 $VMDEPLOY_DAISY_SERVER_VM daisy
else
+ update_pxe_bridge
virsh define $BMDEPLOY_DAISY_SERVER_VM
virsh start daisy
fi