diff options
author | 2018-02-06 20:52:56 -0500 | |
---|---|---|
committer | 2018-02-06 20:52:56 -0500 | |
commit | e51b2e4a61835af998b9bf75d2ed41a9cf2b754c (patch) | |
tree | 9a24abfb70734ad02a095df70f541b8cfe98c409 /tests/utils | |
parent | f0532d88072253ca9c5902f4cefcde61f8b0d787 (diff) |
Fix anteater issue with use of /tmp
JIRA: MODELS-2
Change-Id: I4352dacc102fab89aa307ef25877ee6f3ba8248e
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
Diffstat (limited to 'tests/utils')
-rw-r--r-- | tests/utils/cloudify-clean.sh | 16 |
1 files changed, 8 insertions, 8 deletions
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 <<EOF >/tmp/cloudify/admin-openrc.sh + cat <<EOF >~/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 <<EOF >/tmp/cloudify/admin-openrc.sh + cat <<EOF >~/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 <<EOF | sed '$d' >>/tmp/cloudify/admin-openrc.sh + cat <<EOF | sed '$d' >>~/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}'` |