diff options
author | blsaws <bs3131@att.com> | 2016-02-18 16:13:31 -0800 |
---|---|---|
committer | blsaws <bs3131@att.com> | 2016-02-18 16:13:31 -0800 |
commit | b7c1cdc92dcdb60200273df44aeb852f89207de5 (patch) | |
tree | 7937321d19d5c2ef8970df0d247dc276aa9f966d /components/congress/joid/clean_congress.sh | |
parent | 56db520ef9207574138e39e65600135a8222fe59 (diff) |
correct "set" commands. use "source" instead of "sh".
add lxc-destroy to cleanup script.
JIRA: COPPER-2
Change-Id: I3436ad4958405a71bc28ce4ed9b0a7ff0a596b6f
Signed-off-by: blsaws <bs3131@att.com>
Diffstat (limited to 'components/congress/joid/clean_congress.sh')
-rw-r--r-- | components/congress/joid/clean_congress.sh | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/components/congress/joid/clean_congress.sh b/components/congress/joid/clean_congress.sh index 4d8d7b7..2afc0b3 100644 --- a/components/congress/joid/clean_congress.sh +++ b/components/congress/joid/clean_congress.sh @@ -18,17 +18,24 @@ # LXC container in the OPNFV Controller node. # Presumably something has failed, and any record of the Congress feature # in OpenStack needs to be removed, so you can try the install again. -# Most of the items removed by this script were created in install_congress_5.sh source ~/admin-openrc.sh <<EOF openstack EOF +source ~/env.sh +set -x echo on +juju ssh ubuntu@node1-control "sudo lxc-stop --name juju-trusty-congress; sudo lxc-destroy --name juju-trusty-congress; exit" # Delete Congress user export CONGRESS_USER=$(openstack user list | awk "/ congress / { print \$2 }") -openstack user delete $CONGRESS_USER +if [ "$CONGRESS_USER" != "" ]; then + openstack user delete $CONGRESS_USER +fi # Delete Congress service export CONGRESS_SERVICE=$(openstack service list | awk "/ congress / { print \$2 }") -openstack service delete $CONGRESS_SERVICE +if [ "$CONGRESS_SERVICE" != "" ]; then + openstack service delete $CONGRESS_SERVICE +fi +set -x echo off |