swift-bench should be able to use auth version 2.0
Fixes Bug #1011727 Change-Id: I6681bd85a5ddb82a1059913ae90696e5994aa906
This commit is contained in:
parent
c0e7c38c9f
commit
ef3e556b72
1
AUTHORS
1
AUTHORS
@ -24,6 +24,7 @@ Chmouel Boudjnah (chmouel@chmouel.com)
|
||||
Russell Bryant (rbryant@redhat.com)
|
||||
Devin Carlen (devin.carlen@gmail.com)
|
||||
Thierry Carrez (thierry@openstack.org)
|
||||
François Charlier (francois.charlier@enovance.com)
|
||||
Julien Danjou (julien.danjou@enovance.com)
|
||||
Dan Dillinger (dan.dillinger@sonian.net)
|
||||
Tom Fifield (fifieldt@unimelb.edu.au)
|
||||
|
@ -46,6 +46,7 @@ CONF_DEFAULTS = {
|
||||
'devices': 'sdb1',
|
||||
'log_level': 'INFO',
|
||||
'timeout': '10',
|
||||
'auth_version': '1.0',
|
||||
}
|
||||
|
||||
SAIO_DEFAULTS = {
|
||||
@ -67,6 +68,7 @@ if __name__ == '__main__':
|
||||
num_objects = 1000
|
||||
num_gets = 10000
|
||||
delete = yes
|
||||
auth_version = 1.0
|
||||
"""
|
||||
parser = OptionParser(usage=usage)
|
||||
parser.add_option('', '--saio', dest='saio', action='store_true',
|
||||
@ -89,6 +91,8 @@ if __name__ == '__main__':
|
||||
help='Number of GET operations to perform')
|
||||
parser.add_option('-x', '--no-delete', dest='delete', action='store_false',
|
||||
help='If set, will not delete the objects created')
|
||||
parser.add_option('-V', '--auth_version', dest='auth_version',
|
||||
help='Authentication version')
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
parser.print_help()
|
||||
|
@ -45,8 +45,11 @@ class Bench(object):
|
||||
self.key = conf.key
|
||||
self.auth_url = conf.auth
|
||||
self.use_proxy = conf.use_proxy.lower() in TRUE_VALUES
|
||||
self.auth_version = conf.auth_version
|
||||
self.logger.info("Auth version: %s" % self.auth_version)
|
||||
if self.use_proxy:
|
||||
url, token = client.get_auth(self.auth_url, self.user, self.key)
|
||||
url, token = client.get_auth(self.auth_url, self.user, self.key,
|
||||
auth_version=self.auth_version)
|
||||
self.token = token
|
||||
self.account = url.split('/')[-1]
|
||||
if conf.url == '':
|
||||
|
Loading…
Reference in New Issue
Block a user