summaryrefslogtreecommitdiffstats
path: root/scripts/resource_cleanup.sh
diff options
context:
space:
mode:
authorjuraj.linkes <jlinkes@cisco.com>2017-06-03 11:25:51 +0200
committerjuraj.linkes <jlinkes@cisco.com>2017-06-05 10:32:06 +0200
commit14566a1577f9e39f387180d9db7b5781e54ea7cd (patch)
tree2f7de8cdc37e4f82b2de84a22e168d23f62a986e /scripts/resource_cleanup.sh
parentc0b072ee944330f97e7eb3b03df79bf9494e6b9a (diff)
Added script for odl installation
Also refactored part of code Change-Id: I4e479d538b03d17c7b460d04ef0bdbd980d39787 Signed-off-by: juraj.linkes <jlinkes@cisco.com>
Diffstat (limited to 'scripts/resource_cleanup.sh')
-rwxr-xr-xscripts/resource_cleanup.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/resource_cleanup.sh b/scripts/resource_cleanup.sh
index af055cf..46ed8bb 100755
--- a/scripts/resource_cleanup.sh
+++ b/scripts/resource_cleanup.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-script_dir=$(dirname $0)
-. $script_dir/lib.sh
+SCRIPT_DIR=$(dirname $0)
+. $SCRIPT_DIR/lib.sh
NODE_TYPES="compute controller"
RESOURCE_TYPES="openstack opendaylight fdio"
@@ -141,7 +141,7 @@ clean_from_jumphost() {
echo "Cleanup finished"
if [[ $REMOUNT ]]
then
- $script_dir/remount_vpp_into_odl.sh
+ $SCRIPT_DIR/remount_vpp_into_odl.sh
fi
}
@@ -201,11 +201,11 @@ clean_overcloud_resource() {
if [[ $MANUAL_CONFIG ]]
then
TENANT_INTERFACE_IP=$(vppctl show int $TENANT_INTERFACE addr \
- | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+")
+ | grep -Eo "$IPV4_REGEX")
if [[ -n $PUBLIC_INTERFACE ]]
then
PUBLIC_INTERFACE_IP=$(vppctl show int $PUBLIC_INTERFACE addr \
- n| grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/[0-9]+")
+ n| grep -Eo "$IPV4_REGEX")
fi
fi
@@ -239,7 +239,7 @@ clean_overcloud_resource() {
sleep 1
service honeycomb start &> /dev/null
echo "$HOSTNAME: starting honeycomb"
- HC_IP=$(grep restconf-binding-address /opt/honeycomb/config/honeycomb.json | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
+ HC_IP=$(grep restconf-binding-address /opt/honeycomb/config/honeycomb.json | grep -Eo "$IPV4_REGEX")
HC_PORT=$(grep restconf-port /opt/honeycomb/config/honeycomb.json | grep -Eo [0-9]+)
for i in $(seq 1 30)
do
@@ -378,7 +378,7 @@ else
if [[ $ODL_RESTARTED ]]
then
ODL_IP=$(awk '/<Call/{f=1} f{print; if (/<\/Call>/) exit}' $ODL_DIR/etc/jetty.xml | \
- grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
+ grep -Eo "$IPV4_REGEX")
ODL_PORT=$(awk '/<Call/{f=1} f{print; if (/<\/Call>/) exit}' $ODL_DIR/etc/jetty.xml | \
grep jetty.port | grep -Eo [0-9]+)
echo "$HOSTNAME: waiting for odl to start"