]> git-server-git.apps.pok.os.sepia.ceph.com Git - radosgw-agent.git/commitdiff
make the list_object_in_bucket use the config for versioned support
authorAlfredo Deza <adeza@redhat.com>
Fri, 13 Mar 2015 16:14:59 +0000 (12:14 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 13 Mar 2015 16:14:59 +0000 (12:14 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
radosgw_agent/client.py

index da3eca6ee0a48464eb3181f608f10445f0f481f9..2fc50ae8ab2dc250799d36bd01637e15ad327e53 100644 (file)
@@ -11,6 +11,7 @@ from boto.exception import BotoServerError
 from boto.s3.connection import S3Connection
 
 from radosgw_agent import request as aws_request
+from radosgw_agent import config
 from radosgw_agent import exceptions as exc
 from radosgw_agent.constants import DEFAULT_TIME
 from radosgw_agent.exceptions import NetworkError
@@ -118,7 +119,7 @@ def request(connection, type_, resource, params=None, headers=None,
     url = '{protocol}://{host}{path}'.format(protocol=request.protocol,
                                              host=request.host,
                                              path=request.path)
-    
+
     request.authorize(connection=connection)
 
     boto.log.debug('url = %r\nparams=%r\nheaders=%r\ndata=%r',
@@ -200,7 +201,9 @@ def get_bucket_list(connection):
 
 
 @boto_call
-def list_objects_in_bucket(connection, bucket_name, versioned=False):
+def list_objects_in_bucket(connection, bucket_name):
+    versioned = config['use_versioning']
+
     # use the boto library to do this
     bucket = connection.get_bucket(bucket_name)
     list_call = bucket.list_versions if versioned else bucket.list