]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/rgw: allow rgw client config to override port
authorCasey Bodley <cbodley@redhat.com>
Tue, 20 Feb 2018 16:23:00 +0000 (11:23 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 3 Jun 2019 17:07:41 +0000 (13:07 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
qa/tasks/rgw.py

index babfa5d5bc97432080a63d750086f3322e7e6a2e..16e97a0d339c7dafef95d1d99ab8f345da9c0306 100644 (file)
@@ -163,9 +163,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)
@@ -181,8 +180,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