You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ch...@apache.org on 2013/07/17 19:35:47 UTC

[48/50] [abbrv] git commit: updated refs/heads/ldapplugin to 7bc705e

Removed unused script scripts/storage/qcow2/cleanupmyvms.sh

Signed-off-by: Rene Diepstraten <ma...@renediepstraten.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/53e6a1c0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/53e6a1c0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/53e6a1c0

Branch: refs/heads/ldapplugin
Commit: 53e6a1c0fa6b93e5c6f3307711c987fd7d4fec4c
Parents: ffe7cfe
Author: Rene Diepstraten <ma...@renediepstraten.nl>
Authored: Fri Jul 12 13:04:47 2013 +0200
Committer: Wido den Hollander <wi...@widodh.nl>
Committed: Wed Jul 17 18:35:38 2013 +0200

----------------------------------------------------------------------
 scripts/storage/qcow2/cleanupmyvms.sh | 83 ------------------------------
 1 file changed, 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/53e6a1c0/scripts/storage/qcow2/cleanupmyvms.sh
----------------------------------------------------------------------
diff --git a/scripts/storage/qcow2/cleanupmyvms.sh b/scripts/storage/qcow2/cleanupmyvms.sh
deleted file mode 100755
index e270a01..0000000
--- a/scripts/storage/qcow2/cleanupmyvms.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
- 
-
-# $Id: cleanupmyvms.sh 9804 2010-06-22 18:36:49Z alex $ $HeadURL: svn://svn.lab.vmops.com/repos/vmdev/java/scripts/storage/qcow2/cleanupmyvms.sh $
-# @VERSION@
-
-if [ "$1" == "" ]
-then
-  echo "Usage: $(basename $0) <instance>"
-  exit 3
-fi
-
-instance=$1
-
-for i in $(virsh list | grep $instance | awk '{print $2}' );  
-do   
-  files=$(virsh dumpxml $i | grep file | grep source | awk '{print $2}' | awk -F"=" '{print $2}'  );   
-  echo "Destroying VM: $i"
-  virsh destroy $i
-  virsh undefine $i
-  sleep 2
-  for f in $files; 
-  do  
-     f=${f%%/>}
-     echo "Destroying disk: $f"
-     rm -f $f
-  done; 
-done
-
-#double check, if there are vms in shut-off state
-for i in $(virsh list --all |grep $instance| awk '{print $2}')
-do
-  files=$(virsh dumpxml $i | grep file | grep source | awk '{print $2}' | awk -F"=" '{print $2}'  );   
-  echo "Undefine VM: $i"
-  virsh undefine $i
-  for f in $files;
-  do
-     f=${f%%/>}
-     if [ -f $f ]
-     then
-     	f=${f%%/>}
-     	echo "Destroying disk: $f"
-     	rm -f $f
-     fi
-  done
-done
-
-#cleanup the bridge
-br=`virsh net-list|grep $instance |awk '{print $1}'`
-if [ -n "$br" ]
-then
-virsh net-destroy $br
-fi
-#double check
-br=`brctl show |grep $instance|awk '{print $1}'`
-if [ -n "$br" ]
-then
-   ifconfig $br down
-   sleep 1
-   brctl delbr $br
-   sleep 1
-fi
-
-dnsmasq=`cat /var/run/libvirt/network/vmops-$instance-private.pid`
-kill -9 $dnsmasq 2>/dev/null
-