Example #1
0
    def _set_compute_client(self):
        params = {
            'service': CONF.compute.catalog_type,
            'region': CONF.compute.region or CONF.identity.region,
            'endpoint_type': CONF.compute.endpoint_type,
            'build_interval': CONF.compute.build_interval,
            'build_timeout': CONF.compute.build_timeout
        }
        params.update(self.default_params)
        self.servers_client = ServersClient(
            self.auth_provider,
            enable_instance_password=CONF.compute_feature_enabled.
            enable_instance_password,
            **params)

        self.keypairs_client = KeyPairsClient(self.auth_provider, **params)
        self.flavors_client = FlavorsClient(self.auth_provider, **params)
        self.availability_zone_client = AvailabilityZoneClient(
            self.auth_provider, **params)
Example #2
0
    def _set_compute_clients(self):
        params = {
            'service': CONF.compute.catalog_type,
            'region': CONF.compute.region or CONF.identity.region,
            'endpoint_type': CONF.compute.endpoint_type,
            'build_interval': CONF.compute.build_interval,
            'build_timeout': CONF.compute.build_timeout
        }
        params.update(self.default_params)

        self.agents_client = AgentsClient(self.auth_provider, **params)
        self.compute_networks_client = ComputeNetworksClient(
            self.auth_provider, **params)
        self.migrations_client = MigrationsClient(self.auth_provider, **params)
        self.security_group_default_rules_client = (
            SecurityGroupDefaultRulesClient(self.auth_provider, **params))
        self.certificates_client = CertificatesClient(self.auth_provider,
                                                      **params)
        self.servers_client = ServersClient(
            self.auth_provider,
            enable_instance_password=CONF.compute_feature_enabled.
            enable_instance_password,
            **params)
        self.server_groups_client = ServerGroupsClient(self.auth_provider,
                                                       **params)
        self.limits_client = LimitsClient(self.auth_provider, **params)
        self.compute_images_client = ComputeImagesClient(
            self.auth_provider, **params)
        self.keypairs_client = KeyPairsClient(self.auth_provider, **params)
        self.quotas_client = QuotasClient(self.auth_provider, **params)
        self.quota_classes_client = QuotaClassesClient(self.auth_provider,
                                                       **params)
        self.flavors_client = FlavorsClient(self.auth_provider, **params)
        self.extensions_client = ExtensionsClient(self.auth_provider, **params)
        self.floating_ip_pools_client = FloatingIPPoolsClient(
            self.auth_provider, **params)
        self.floating_ips_bulk_client = FloatingIPsBulkClient(
            self.auth_provider, **params)
        self.compute_floating_ips_client = ComputeFloatingIPsClient(
            self.auth_provider, **params)
        self.compute_security_group_rules_client = \
            ComputeSecurityGroupRulesClient(self.auth_provider, **params)
        self.compute_security_groups_client = ComputeSecurityGroupsClient(
            self.auth_provider, **params)
        self.interfaces_client = InterfacesClient(self.auth_provider, **params)
        self.fixed_ips_client = FixedIPsClient(self.auth_provider, **params)
        self.availability_zone_client = AvailabilityZoneClient(
            self.auth_provider, **params)
        self.aggregates_client = AggregatesClient(self.auth_provider, **params)
        self.services_client = ServicesClient(self.auth_provider, **params)
        self.tenant_usages_client = TenantUsagesClient(self.auth_provider,
                                                       **params)
        self.hosts_client = HostsClient(self.auth_provider, **params)
        self.hypervisor_client = HypervisorClient(self.auth_provider, **params)
        self.instance_usages_audit_log_client = \
            InstanceUsagesAuditLogClient(self.auth_provider, **params)
        self.tenant_networks_client = \
            TenantNetworksClient(self.auth_provider, **params)
        self.baremetal_nodes_client = BaremetalNodesClient(
            self.auth_provider, **params)

        # NOTE: The following client needs special timeout values because
        # the API is a proxy for the other component.
        params_volume = copy.deepcopy(params)
        params_volume.update({
            'build_interval': CONF.volume.build_interval,
            'build_timeout': CONF.volume.build_timeout
        })
        self.volumes_extensions_client = ComputeVolumesClient(
            self.auth_provider, **params_volume)
        self.compute_versions_client = VersionsClient(self.auth_provider,
                                                      **params_volume)
        self.snapshots_extensions_client = ComputeSnapshotsClient(
            self.auth_provider, **params_volume)
Example #3
0
 def set_servers_client(self):
     self.servers_client = ServersClient(self.auth_provider,
                                         **self.compute_params)