

def _get_clients(self):
    cli_dir = os.path.join(os.path.abspath('.'), '.tox/functional/bin')
    config = self._get_config()
    if config.get('os_auth_url'):
        client = base.CLIClient(cli_dir=cli_dir, username=config['os_username'], password=config['os_password'], tenant_name=config['os_tenant_name'], uri=config['os_auth_url'])
        for keystone_object in ('user', 'project'):
            domain_attr = ('os_%s_domain_id' % keystone_object)
            if config.get(domain_attr):
                setattr(self, domain_attr, config[domain_attr])
    else:
        self.ironic_url = config['ironic_url']
        self.os_auth_token = config['os_auth_token']
        client = base.CLIClient(cli_dir=cli_dir, ironic_url=self.ironic_url, os_auth_token=self.os_auth_token)
    return client

dataset/ETHPy150Open openstack/python-ironicclient/ironicclient/tests/functional/base.py FunctionalTestBase._get_clients/original