Allow to specify auth_version in swift-dispersion tools

Change-Id: I080d531471d8ea57c69a918d4f6930441f1e69f6
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
This commit is contained in:
Julien Danjou 2012-04-02 16:41:16 +02:00
parent 7a39fea989
commit 9a423d0b78
3 changed files with 7 additions and 2 deletions

View File

@ -96,7 +96,7 @@ if __name__ == '__main__':
retries_done = 0
url, token = get_auth(conf['auth_url'], conf['auth_user'],
conf['auth_key'])
conf['auth_key'], auth_version=conf.get('auth_version', '1.0'))
account = url.rsplit('/', 1)[1]
connpool = Pool(max_size=concurrency)
connpool.create = lambda: Connection(conf['auth_url'],

View File

@ -281,7 +281,7 @@ Usage: %prog [options] [conf_file]
coropool = GreenPool(size=concurrency)
url, token = get_auth(conf['auth_url'], conf['auth_user'],
conf['auth_key'])
conf['auth_key'], auth_version=conf.get('auth_version', '1.0'))
account = url.rsplit('/', 1)[1]
connpool = Pool(max_size=concurrency)
connpool.create = lambda: Connection(conf['auth_url'],

View File

@ -2,6 +2,11 @@
auth_url = http://saio:8080/auth/v1.0
auth_user = test:tester
auth_key = testing
# auth_url = http://saio:5000/v2.0/
# auth_user = test:tester
# auth_key = testing
# auth_version = 2.0
#
# swift_dir = /etc/swift
# dispersion_coverage = 1
# retries = 5