From 14566a1577f9e39f387180d9db7b5781e54ea7cd Mon Sep 17 00:00:00 2001 From: "juraj.linkes" Date: Sat, 3 Jun 2017 11:25:51 +0200 Subject: Added script for odl installation Also refactored part of code Change-Id: I4e479d538b03d17c7b460d04ef0bdbd980d39787 Signed-off-by: juraj.linkes --- scripts/resource_cleanup.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'scripts/resource_cleanup.sh') 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 '//) exit}' $ODL_DIR/etc/jetty.xml | \ - grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+") + grep -Eo "$IPV4_REGEX") ODL_PORT=$(awk '//) exit}' $ODL_DIR/etc/jetty.xml | \ grep jetty.port | grep -Eo [0-9]+) echo "$HOSTNAME: waiting for odl to start" -- cgit 1.2.3-korg