def _prepare_configuration(self): """Map values from CONF into Manager parameters This uses `config.service_client_config` for all services to collect most configuration items needed to init the clients. """ # NOTE(andreaf) Once all service clients in Tempest are migrated # to tempest.lib, their configuration will be picked up from the # registry, and this method will become redundant. configuration = {} # Setup the parameters for all Tempest services which are not in lib. # NOTE(andreaf) Since client.py is an internal module of Tempest, # it doesn't have to consider plugin configuration. for service in clients._tempest_internal_modules(): try: # NOTE(andreaf) Use the unversioned service name to fetch # the configuration since configuration is not versioned. service_for_config = service.split('.')[0] if service_for_config not in configuration: configuration[service_for_config] = ( config.service_client_config(service_for_config)) except lib_exc.UnknownServiceClient: LOG.warn( 'Could not load configuration for service %s' % service) return configuration
def _prepare_configuration(self): """Map values from CONF into Manager parameters This uses `config.service_client_config` for all services to collect most configuration items needed to init the clients. """ # NOTE(andreaf) Once all service clients in Tempest are migrated # to tempest.lib, their configuration will be picked up from the # registry, and this method will become redundant. configuration = {} # Setup the parameters for all Tempest services which are not in lib. # NOTE(andreaf) Since client.py is an internal module of Tempest, # it doesn't have to consider plugin configuration. for service in clients._tempest_internal_modules(): try: # NOTE(andreaf) Use the unversioned service name to fetch # the configuration since configuration is not versioned. service_for_config = service.split(".")[0] if service_for_config not in configuration: configuration[service_for_config] = config.service_client_config(service_for_config) except lib_exc.UnknownServiceClient: LOG.warn("Could not load configuration for service %s" % service) return configuration
def _prepare_configuration(self): """Map values from CONF into Manager parameters This uses `config.service_client_config` for all services to collect most configuration items needed to init the clients. """ # NOTE(andreaf) Configuration items will be passed in future patches # into ClientFactory objects, but for now we update all the # _set_*_client methods to consume them so we can verify that the # configuration collected is correct configuration = {} # Setup the parameters for all Tempest services. # NOTE(andreaf) Since client.py is an internal module of Tempest, # it doesn't have to consider plugin configuration. all_tempest_modules = (set(clients.tempest_modules()) | clients._tempest_internal_modules()) for service in all_tempest_modules: try: # NOTE(andreaf) Use the unversioned service name to fetch # the configuration since configuration is not versioned. service_for_config = service.split('.')[0] if service_for_config not in configuration: configuration[service_for_config] = ( config.service_client_config(service_for_config)) except lib_exc.UnknownServiceClient: LOG.warn( 'Could not load configuration for service %s' % service) return configuration