blob: 09305d2ad82cba31a8f4313113b8484688bd2a8d [file] [log] [blame]
Dominik Fleischmann5e4a7512020-03-06 14:05:06 +01001#! /bin/bash
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
Dominik Fleischmann5e4a7512020-03-06 14:05:06 +010015
Dominik Fleischmann5e4a7512020-03-06 14:05:06 +010016
beierlma4a37f72020-06-26 12:55:01 -040017juju destroy-model osm --destroy-storage -y --force --no-wait
Dominik Fleischmann5e4a7512020-03-06 14:05:06 +010018sudo snap unalias osm
19sudo snap remove osmclient
beierlma4a37f72020-06-26 12:55:01 -040020CONTROLLER_NAME="osm-vca"
21CONTROLLER_PRESENT=$(juju controllers 2>/dev/null| grep ${CONTROLLER_NAME} | wc -l)
22if [[ $CONTROLLER_PRESENT -ge 1 ]]; then
23 cat << EOF
24The VCA with the name "${CONTROLLER_NAME}" has been left in place to ensure that no other
25applications are using it. If you are sure you wish to remove this controller,
26please execute the following command:
27
28 juju destroy-controller --release-storage --destroy-all-models -y ${CONTROLLER_NAME}
29
30EOF
31fi