"""
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)
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