From 0cf65827ad3f56abd9b3fe34ec0ac410abbbd50f Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 20 Feb 2018 11:23:00 -0500 Subject: [PATCH] qa/rgw: allow rgw client config to override port Signed-off-by: Casey Bodley (cherry picked from commit 921faebb723c11686bf790ca424c952a786f358a) --- qa/tasks/rgw.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qa/tasks/rgw.py b/qa/tasks/rgw.py index f861b58d70e93..d5b9603d69120 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 -- 2.39.5