diff options
author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-07-28 01:36:55 +0000 |
---|---|---|
committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-07-28 01:36:55 +0000 |
commit | 559b73ed18a271dd35c7b9d00306c8c5b33bd45b (patch) | |
tree | b73ac4aa2f44b0abac25234503a69d00d7a30afc | |
parent | d811f82e524bd7634dd59f0074129fb41fb28c12 (diff) | |
download | nova-559b73ed18a271dd35c7b9d00306c8c5b33bd45b.tar.gz nova-559b73ed18a271dd35c7b9d00306c8c5b33bd45b.tar.xz nova-559b73ed18a271dd35c7b9d00306c8c5b33bd45b.zip |
remove authman from images/s3.py and replace with flags
-rw-r--r-- | nova/image/s3.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/nova/image/s3.py b/nova/image/s3.py index 8685c96fd..ccbfa89cd 100644 --- a/nova/image/s3.py +++ b/nova/image/s3.py @@ -34,7 +34,6 @@ from nova import flags from nova import image from nova import log as logging from nova import utils -from nova.auth import manager from nova.image import service from nova.api.ec2 import ec2utils @@ -43,6 +42,10 @@ LOG = logging.getLogger("nova.image.s3") FLAGS = flags.FLAGS flags.DEFINE_string('image_decryption_dir', '/tmp', 'parent dir for tempdir used for image decryption') +flags.DEFINE_string('s3_access_key', 'notchecked', + 'access key to use for s3 server for images') +flags.DEFINE_string('s3_secret_key', 'notchecked', + 'secret key to use for s3 server for images') class S3ImageService(service.BaseImageService): @@ -82,11 +85,10 @@ class S3ImageService(service.BaseImageService): @staticmethod def _conn(context): - # TODO(vish): is there a better way to get creds to sign - # for the user? - authman = manager.AuthManager() - access = authman.get_access_key(context.user_id, context.project_id) - secret = str(authman.get_user(context.user_id).secret) + # NOTE(vish): access and secret keys for s3 server are not + # checked in nova-objectstore + access = FLAGS.s3_access_key + secret = FLAGS.s3_secret_key calling = boto.s3.connection.OrdinaryCallingFormat() return boto.s3.connection.S3Connection(aws_access_key_id=access, aws_secret_access_key=secret, |