[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:31:05 UTC 2013
The following commit has been merged in the master branch:
commit 10e2a8e4cfbb39d7f6c3c1ab08670541f83e3a7f
Author: Garrett Holmstrom <gholms at fedoraproject.org>
Date: Wed Apr 17 13:42:17 2013 -0700
Add ACL support to upload-bundle
diff --git a/euca2ools/commands/bundle/uploadbundle.py b/euca2ools/commands/bundle/uploadbundle.py
index ddbabee..4fc7b5a 100644
--- a/euca2ools/commands/bundle/uploadbundle.py
+++ b/euca2ools/commands/bundle/uploadbundle.py
@@ -122,8 +122,8 @@ class UploadBundle(BaseCommand):
parts[int(part.get('index'))] = part.filename.text
part_paths = [os.path.join(part_dir, path) for (index, path) in
sorted(parts.items()) if index >= self.args['part']]
- req = PutObject(sources=part_paths,
- dest=full_prefix,
+ req = PutObject(sources=part_paths, dest=full_prefix,
+ acl=self.args['acl'],
retries=self.args['retries'],
progress=self.args['progress'],
config=self.config, service=walrus,
@@ -133,6 +133,7 @@ class UploadBundle(BaseCommand):
if not self.args['skipmanifest']:
req = PutObject(sources=[self.args['manifest']],
dest=full_prefix, retries=self.args['retries'],
+ acl=self.args['acl'],
progress=self.args['progress'], config=self.config,
service=walrus, key_id=self.args['key_id'],
secret_key=self.args['secret_key'])
diff --git a/euca2ools/commands/walrus/putobject.py b/euca2ools/commands/walrus/putobject.py
index 0e27b0d..3afe81e 100644
--- a/euca2ools/commands/walrus/putobject.py
+++ b/euca2ools/commands/walrus/putobject.py
@@ -53,6 +53,7 @@ class PutObject(WalrusRequest):
help='''treat the destination as the full bucket and key name
for the uploaded object instead of a bucket and prefix. This
only works when uploading a single file.'''),
+ Arg('--acl', dest='x-amz-acl', route_to=None), ## FIXME
Arg('--guess-mime-type', action='store_true', route_to=None,
help='''automatically select MIME types for the files being
uploaded'''),
@@ -93,6 +94,8 @@ class PutObject(WalrusRequest):
self.path = bucket + '/' + keyname
self.headers['Content-Length'] = os.path.getsize(source_filename)
self.headers.pop('Content-Type', None)
+ if self.args.get('acl'):
+ self.headers['x-amz-acl'] = self.args['acl']
if self.args.get('guess_mime_type', False):
mtype = mimetypes.guess_type(source_filename)
if mtype:
--
managing cloud instances for Eucalyptus
More information about the pkg-eucalyptus-commits
mailing list