diff options
author | François Charlier <francois.charlier@enovance.com> | 2012-06-11 19:29:32 +0200 |
---|---|---|
committer | François Charlier <francois.charlier@enovance.com> | 2012-06-11 19:29:32 +0200 |
commit | aafb98212a0ee01601d223038cb2193208681236 (patch) | |
tree | a87c866f61640ee903ee17eb544ea7b91a67b5d7 | |
parent | 4dbcdf247d8a0409da328af34281e5fbaa3b45c3 (diff) | |
download | swift-bench-aafb98212a0ee01601d223038cb2193208681236.tar.gz |
swift-bench should be able to use auth version 2.0
Fixes Bug #1011727
Change-Id: I6681bd85a5ddb82a1059913ae90696e5994aa906
-rwxr-xr-x | bin/swift-bench | 4 | ||||
-rw-r--r-- | swift/common/bench.py | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bin/swift-bench b/bin/swift-bench index e5b6bb4..3a1e1fe 100755 --- a/bin/swift-bench +++ b/bin/swift-bench @@ -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() diff --git a/swift/common/bench.py b/swift/common/bench.py index 703881d..097b6fd 100644 --- a/swift/common/bench.py +++ b/swift/common/bench.py @@ -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 == '': |