summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-01-09 18:26:50 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-09 18:26:50 +0000
commit8a46a78ddd2460358416c3cfec1de86002b0e018 (patch)
tree5666c36806d7395d61ee3147d050e92b997b3ffe /ci
parentc43b4a2afad26f7b8f58ecfa3cb17304fa94dd8b (diff)
parent9a11a203fa228cad7a86ebf2cb28ae834d17decd (diff)
Merge "Fixes attaching instack interfaces to host"
Diffstat (limited to 'ci')
-rwxr-xr-xci/clean.sh11
-rwxr-xr-xci/deploy.sh9
2 files changed, 16 insertions, 4 deletions
diff --git a/ci/clean.sh b/ci/clean.sh
index 89e89aa4..45486de0 100755
--- a/ci/clean.sh
+++ b/ci/clean.sh
@@ -2,7 +2,12 @@
#Clean script to uninstall provisioning server for Apex
#author: Dan Radez (dradez@redhat.com)
-#
+#author: Tim Rozet (trozet@redhat.com)
+CONFIG=/var/opt/opnfv
+
+##LIBRARIES
+source $CONFIG/lib/common-functions.sh
+
vm_index=4
ovs_bridges="brbm brbm1 brbm2 brbm3"
# Clean off instack VM
@@ -29,7 +34,9 @@ done
for bridge in ${ovs_bridges}; do
virsh net-destroy ${bridge} 2> /dev/null
virsh net-undefine ${bridge} 2> /dev/null
- ovs-vsctl del-br ${bridge} 2> /dev/null
+ if detach_interface_from_ovs ${bridge}; then
+ ovs-vsctl del-br ${bridge} 2> /dev/null
+ fi
done
# clean pub keys from root's auth keys
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 4e9cfde0..7dc42012 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -389,8 +389,13 @@ function configure_deps {
for network in ${enabled_network_list}; do
this_interface=$(eval echo \${${network}_bridged_interface})
# check if this a bridged interface for this network
- if [[ -n "$this_interface" || "$this_interface" != "none" ]]; then
- ovs-vsctl list-ports ${NET_MAP[$network]} | grep ${this_interface} || ovs-vsctl add-port ${NET_MAP[$network]} ${this_interface}
+ if [[ ! -z "$this_interface" || "$this_interface" != "none" ]]; then
+ if ! attach_interface_to_ovs ${NET_MAP[$network]} ${this_interface} ${network}; then
+ echo -e "${red}ERROR: Unable to bridge interface ${this_interface} to bridge ${NET_MAP[$network]} for enabled network: ${network}${reset}"
+ exit 1
+ else
+ echo -e "${blue}INFO: Interface ${this_interface} bridged to bridge ${NET_MAP[$network]} for enabled network: ${network}${reset}"
+ fi
else
echo "${red}ERROR: Unable to determine interface to bridge to for enabled network: ${network}${reset}"
exit 1