log.info('client={c}'.format(c=client))
log.info('config={c}'.format(c=config))
testswift_conf = config['testswift_conf'][client]
- if properties is not None and 'rgw_server' in properties:
- host = None
- for target, roles in zip(ctx.config['targets'].iterkeys(), ctx.config['roles']):
- log.info('roles: ' + str(roles))
- log.info('target: ' + str(target))
- if properties['rgw_server'] in roles:
- _, host = split_user(target)
- assert host is not None, "Invalid client specified as the rgw_server"
- testswift_conf['func_test']['auth_host'] = host
- else:
- testswift_conf['func_test']['auth_host'] = 'localhost'
-
- log.info(client)
(remote,) = ctx.cluster.only(client).remotes.keys()
remote.run(
args=[
testswift_conf = {}
clients = []
- for client in config.keys():
- endpoint = ctx.rgw.role_endpoints.get(client)
- assert endpoint, 'swift: no rgw endpoint for {}'.format(client)
-
+ for client, client_config in config.iteritems():
# http://tracker.ceph.com/issues/40304 can't bootstrap on rhel 7.6+
(remote,) = ctx.cluster.only(client).remotes.keys()
if remote.os.name == 'rhel' and LooseVersion(remote.os.version) >= LooseVersion('7.6'):
clients.append(client)
+ server = client_config.get('rgw_server', client)
+ endpoint = ctx.rgw.role_endpoints.get(server)
+ assert endpoint, 'swift: no rgw endpoint for {}'.format(server)
+
testswift_conf[client] = ConfigObj(
indent_type='',
infile={
'func_test':
{
- 'auth_port' : endpoint.port,
+ 'auth_host' : endpoint.hostname,
+ 'auth_port' : endpoint.port,
'auth_ssl' : 'yes' if endpoint.cert else 'no',
'auth_prefix' : '/auth/',
},