[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, experimental, updated. debian/2.1.1-1_experimental1-51-g95835b7
Garrett Holmstrom
gholms at fedoraproject.org
Thu Jan 3 11:06:10 UTC 2013
The following commit has been merged in the experimental branch:
commit e08a53c08c48ffa92cacff04a350d50823246a62
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Tue Oct 30 10:28:37 2012 -0700
Temporary fix for deletebundle's default behavior
When euca-delete-bundle is supplied with neither a manifest path nor a
key prefix the tool deletes all bundles in the entire bucket. This
behavior is deprecated and not user-friendly, but we don't want to break
scripts in a z-stream release, so we compromise: before
euca-delete-bundle deletes everything it will pause for ten seconds to
give the user a chance to ^C out of it.
The upcoming major release will either require one to explicitly opt
into this behavior with a command line switch or remove it altogether.
diff --git a/euca2ools/commands/euca/deletebundle.py b/euca2ools/commands/euca/deletebundle.py
index 56c1c1b..5f6201b 100644
--- a/euca2ools/commands/euca/deletebundle.py
+++ b/euca2ools/commands/euca/deletebundle.py
@@ -36,6 +36,7 @@ from boto.roboto.param import Param
import os
import sys
import textwrap
+import time
from xml.dom import minidom
from boto.exception import S3ResponseError, S3CreateError
from boto.s3.key import Key
@@ -178,8 +179,15 @@ class DeleteBundle(euca2ools.commands.eucacommand.EucaCommand):
directory = os.path.abspath('/tmp')
if not self.manifest_path and not self.prefix:
- print 'Neither manifestpath nor prefix was specified.'
- print 'All manifest data in bucket will be deleted.'
+ print 'Neither a manifestpath nor a prefix was specified.'
+ print 'All bundles in bucket', self.bucket, 'will be deleted.'
+ print ('If this is not what you want, press Ctrl+C in the next '
+ '10 seconds'),
+ for __ in range(10):
+ sys.stdout.write('.')
+ sys.stdout.flush()
+ time.sleep(1)
+ print
bucket_instance = self.ensure_bucket(self.bucket)
manifests = None
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list