From e51b2e4a61835af998b9bf75d2ed41a9cf2b754c Mon Sep 17 00:00:00 2001 From: Bryan Sullivan Date: Tue, 6 Feb 2018 20:52:56 -0500 Subject: Fix anteater issue with use of /tmp JIRA: MODELS-2 Change-Id: I4352dacc102fab89aa307ef25877ee6f3ba8248e Signed-off-by: Bryan Sullivan --- tests/utils/cloudify-clean.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/utils/cloudify-clean.sh b/tests/utils/cloudify-clean.sh index d7e6aa9..cae416b 100644 --- a/tests/utils/cloudify-clean.sh +++ b/tests/utils/cloudify-clean.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015-2016 AT&T Intellectual Property, Inc +# Copyright 2015-2018 AT&T Intellectual Property, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ # Status: this is a work in progress, under test.# # # Prerequisites: -# $ bash /tmp/cloudify/cloudify-setup.sh +# $ bash cloudify-setup.sh # # How to use: # $ bash cloudify-clean.sh @@ -31,12 +31,12 @@ # flip=($(neutron floatingip-list|grep -v "+"|grep -v id|awk '{print $2}')); for id in ${flip[@]}; do neutron floatingip-delete ${id}; done function setenv () { -mkdir -p /tmp/cloudify +mkdir -p ~/tmp/cloudify if [ "$dist" == "Ubuntu" ]; then echo "cloudify-clean.sh: Ubuntu-based install" echo "cloudify-clean.sh: Create the environment file" KEYSTONE_HOST=$(juju status --format=short | awk "/keystone\/0/ { print \$3 }") - cat </tmp/cloudify/admin-openrc.sh + cat <~/tmp/cloudify/admin-openrc.sh export CONGRESS_HOST=$(juju status --format=short | awk "/openstack-dashboard/ { print \$3 }") export HORIZON_HOST=$(juju status --format=short | awk "/openstack-dashboard/ { print \$3 }") export KEYSTONE_HOST=$KEYSTONE_HOST @@ -59,7 +59,7 @@ else echo "cloudify-clean.sh: Get address of Controller node" export CONTROLLER_HOST1=$(openstack server list | awk "/overcloud-controller-0/ { print \$8 }" | sed 's/ctlplane=//g') echo "cloudify-clean.sh: Create the environment file" - cat </tmp/cloudify/admin-openrc.sh + cat <~/tmp/cloudify/admin-openrc.sh export CONGRESS_HOST=$CONTROLLER_HOST1 export KEYSTONE_HOST=$CONTROLLER_HOST1 export CEILOMETER_HOST=$CONTROLLER_HOST1 @@ -68,16 +68,16 @@ export GLANCE_HOST=$CONTROLLER_HOST1 export NEUTRON_HOST=$CONTROLLER_HOST1 export NOVA_HOST=$CONTROLLER_HOST1 EOF - cat ~/overcloudrc >>/tmp/cloudify/admin-openrc.sh + cat ~/overcloudrc >>~/tmp/cloudify/admin-openrc.sh source ~/overcloudrc export OS_REGION_NAME=$(openstack endpoint list | awk "/ nova / { print \$4 }") # sed command below is a workaound for a bug - region shows up twice for some reason - cat <>/tmp/cloudify/admin-openrc.sh + cat <>~/tmp/cloudify/admin-openrc.sh export OS_REGION_NAME=$OS_REGION_NAME EOF fi -source /tmp/cloudify/admin-openrc.sh +source ~/tmp/cloudify/admin-openrc.sh } dist=`grep DISTRIB_ID /etc/*-release | awk -F '=' '{print $2}'` -- cgit 1.2.3-korg