From: Casey Bodley Date: Tue, 20 Feb 2018 16:23:00 +0000 (-0500) Subject: qa/rgw: allow rgw client config to override port X-Git-Tag: v13.2.7~68^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0cf65827ad3f56abd9b3fe34ec0ac410abbbd50f;p=ceph.git qa/rgw: allow rgw client config to override port Signed-off-by: Casey Bodley (cherry picked from commit 921faebb723c11686bf790ca424c952a786f358a) --- diff --git a/qa/tasks/rgw.py b/qa/tasks/rgw.py index f861b58d70e..d5b9603d691 100644 --- a/qa/tasks/rgw.py +++ b/qa/tasks/rgw.py @@ -164,9 +164,8 @@ def assign_endpoints(ctx, config, default_cert): """ Assign port numbers starting with port 7280. """ - port = 7280 + next_port = 7280 role_endpoints = {} - for role, client_config in config.iteritems(): client_config = client_config or {} remote = get_remote_for_role(ctx, role) @@ -182,8 +181,12 @@ def assign_endpoints(ctx, config, default_cert): else: ssl_certificate = None + port = client_config.get('port') + if not port: + port = next_port + next_port += 1 + role_endpoints[role] = RGWEndpoint(remote.hostname, port, ssl_certificate) - port += 1 return role_endpoints