Best Python code snippet using tempest_python
clients.py
Source:clients.py
...42 self._set_identity_clients()43 self._set_volume_clients()44 self._set_object_storage_clients()45 self._set_image_clients()46 self._set_network_clients()47 self.orchestration_client = orchestration.OrchestrationClient(48 self.auth_provider,49 CONF.orchestration.catalog_type,50 CONF.orchestration.region or CONF.identity.region,51 endpoint_type=CONF.orchestration.endpoint_type,52 build_interval=CONF.orchestration.build_interval,53 build_timeout=CONF.orchestration.build_timeout,54 **self.default_params)55 def _prepare_configuration(self):56 """Map values from CONF into Manager parameters57 This uses `config.service_client_config` for all services to collect58 most configuration items needed to init the clients.59 """60 # NOTE(andreaf) Once all service clients in Tempest are migrated61 # to tempest.lib, their configuration will be picked up from the62 # registry, and this method will become redundant.63 configuration = {}64 # Setup the parameters for all Tempest services which are not in lib.65 # NOTE(andreaf) Since client.py is an internal module of Tempest,66 # it doesn't have to consider plugin configuration.67 for service in clients._tempest_internal_modules():68 try:69 # NOTE(andreaf) Use the unversioned service name to fetch70 # the configuration since configuration is not versioned.71 service_for_config = service.split('.')[0]72 if service_for_config not in configuration:73 configuration[service_for_config] = (74 config.service_client_config(service_for_config))75 except lib_exc.UnknownServiceClient:76 LOG.warning(77 'Could not load configuration for service %s', service)78 return configuration79 def _set_network_clients(self):80 self.network_agents_client = self.network.AgentsClient()81 self.network_extensions_client = self.network.ExtensionsClient()82 self.networks_client = self.network.NetworksClient()83 self.subnetpools_client = self.network.SubnetpoolsClient()84 self.subnets_client = self.network.SubnetsClient()85 self.ports_client = self.network.PortsClient()86 self.network_quotas_client = self.network.QuotasClient()87 self.floating_ips_client = self.network.FloatingIPsClient()88 self.metering_labels_client = self.network.MeteringLabelsClient()89 self.metering_label_rules_client = (90 self.network.MeteringLabelRulesClient())91 self.routers_client = self.network.RoutersClient()92 self.security_group_rules_client = (93 self.network.SecurityGroupRulesClient())...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!