[pkg-eucalyptus-commits] [SCM] managing cloud instances for Eucalyptus branch, master, updated. 3.0.0-alpha3-257-g1da8e3a

Garrett Holmstrom gholms at fedoraproject.org
Sun Jun 16 02:30:07 UTC 2013


The following commit has been merged in the master branch:
commit 6d129922f6e21be5c548fc13317c8aa5979e4fdf
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date:   Sat Feb 16 19:16:56 2013 -0800

    Implement minimal object deleting

diff --git a/euca2ools/commands/euca/deletesnapshot.py b/euca2ools/commands/walrus/deleteobject.py
similarity index 69%
copy from euca2ools/commands/euca/deletesnapshot.py
copy to euca2ools/commands/walrus/deleteobject.py
index 99d0b2f..13947b9 100644
--- a/euca2ools/commands/euca/deletesnapshot.py
+++ b/euca2ools/commands/walrus/deleteobject.py
@@ -1,6 +1,6 @@
 # Software License Agreement (BSD License)
 #
-# Copyright (c) 2009-2013, Eucalyptus Systems, Inc.
+# Copyright (c) 2013, Eucalyptus Systems, Inc.
 # All rights reserved.
 #
 # Redistribution and use of this software in source and binary forms, with or
@@ -29,11 +29,21 @@
 # POSSIBILITY OF SUCH DAMAGE.
 
 from requestbuilder import Arg
-from . import EucalyptusRequest
+from . import WalrusRequest
 
-class DeleteSnapshot(EucalyptusRequest):
-    DESCRIPTION = 'Delete a snapshot'
-    ARGS = [Arg('SnapshotId', metavar='SNAPSHOT', help='snapshot to delete')]
+class DeleteObject(WalrusRequest):
+    DESCRIPTION = 'Delete objects from the server'
+    ARGS = [Arg('paths', metavar='BUCKET/KEY', nargs='+', route_to=None)]
 
-    def print_result(self, result):
-        print self.tabify(['SNAPSHOT', self.args['SnapshotId']])
+    def configure(self):
+        WalrusRequest.configure(self)
+        for path in self.args['paths']:
+            if '/' not in path:
+                self._cli_parser.error(
+                        "path '{0}' must include a key name")
+
+    def main(self):
+        self.method = 'DELETE'
+        for path in self.args['paths']:
+            self.path = path
+            self.send()

-- 
managing cloud instances for Eucalyptus



More information about the pkg-eucalyptus-commits mailing list