Refactoring to a more clearly config file.

This commit is contained in:
Fabien Boucher 2013-04-11 15:21:17 +02:00
parent 85490fbbe5
commit 048d7e659b
3 changed files with 7 additions and 9 deletions

View File

@ -73,9 +73,9 @@ def main():
sys.exit(1)
sw_c_concu = int(utils.get_config('filler',
'swift_client_concurrency'))
'filler_swift_client_concurrency'))
ks_c_concu = int(utils.get_config('filler',
'keystone_client_concurrency'))
'filler_keystone_client_concurrency'))
pile = eventlet.GreenPile(sw_c_concu)
pool = eventlet.GreenPool(ks_c_concu)

View File

@ -7,8 +7,6 @@ keystone_dest = http://vm2:5000/v2.0
keystone_origin_demo_credentials = demo:demo:ADMIN
keystone_dest_credentials = demo:demo:ADMIN
[sync]
[filler]
swift_operator_role = Member
@ -19,7 +17,7 @@ index_path = /tmp/swift_filler_index.pkl
index_containers_path = /tmp/swift_filler_containers_index.pkl
[concurrency]
keystone_client_concurrency = 5
swift_client_concurrency = 10
filler_keystone_client_concurrency = 5
filler_swift_client_concurrency = 10
# This is usually bound to the max open files.
sync_swift_client_concurrency = 10

View File

@ -139,7 +139,7 @@ class TestFiller(base.TestCase):
self.stubs.Set(filler, 'create_containers', create_containers)
concurrency = int(utils.get_config('concurrency',
'swift_client_concurrency'))
'filler_swift_client_concurrency'))
pool = eventlet.GreenPool(concurrency)
created = {('account1', 'account1_id'): ['test', 'test_id', 'role_id'],
@ -204,7 +204,7 @@ class TestFiller(base.TestCase):
self.stubs.Set(filler, 'create_swift_user', create_swift_user)
concurrency = int(utils.get_config('concurrency',
'keystone_client_concurrency'))
'filler_keystone_client_concurrency'))
pile = eventlet.GreenPile(concurrency)
client = FakeKSClient()
filler.create_swift_account(client, pile, 1, 1, self.ret_index)
@ -233,7 +233,7 @@ class TestFiller(base.TestCase):
self.stubs.Set(filler, 'create_swift_user', create_swift_user)
concurrency = int(utils.get_config('concurrency',
'keystone_client_concurrency'))
'filler_keystone_client_concurrency'))
pile = eventlet.GreenPile(concurrency)
filler.create_swift_account(client, pile, 3, 1, self.ret_index)