示例#1
0
    def __init__(self, credentials=None, service=None):
        super(Manager, self).__init__(credentials=credentials)

        self._set_identity_clients()

        self.network_client = network_client.NetworkClientJSON(
            self.auth_provider,
            CONF.network.catalog_type,
            CONF.network.region or CONF.identity.region,
            endpoint_type=CONF.network.endpoint_type,
            build_interval=CONF.network.build_interval,
            build_timeout=CONF.network.build_timeout,
            **self.default_params)

        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 = servers_client.ServersClient(
            self.auth_provider,
            enable_instance_password=CONF.compute_feature_enabled.
            enable_instance_password,
            **params)
        self.keypairs_client = keypairs_client.KeyPairsClient(
            self.auth_provider, **params)
示例#2
0
    def __init__(self, credentials=None, service=None):
        super(Manager, self).__init__(credentials=credentials)

        params = {
            'service': CONF.container_management.catalog_type,
            'region': CONF.identity.region
        }
        self.keypairs_client = keypairs_client.KeyPairsClient(
            self.auth_provider, **params)
        self.container_client = ZunClient(self.auth_provider)
示例#3
0
    def __init__(self, credentials=None, service=None):
        dscv = CONF.identity.disable_ssl_certificate_validation
        _, uri = tempest_clients.get_auth_provider_class(credentials)
        super(Manager,
              self).__init__(credentials=credentials,
                             identity_uri=uri,
                             scope='project',
                             disable_ssl_certificate_validation=dscv,
                             ca_certs=CONF.identity.ca_certificates_file,
                             trace_requests=CONF.debug.trace_requests)

        self._set_identity_clients()

        self.network_client = network_client.NetworkClientJSON(
            self.auth_provider,
            CONF.network.catalog_type,
            CONF.network.region or CONF.identity.region,
            endpoint_type=CONF.network.endpoint_type,
            build_interval=CONF.network.build_interval,
            build_timeout=CONF.network.build_timeout,
            **self.default_params)

        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 = servers_client.ServersClient(
            self.auth_provider,
            enable_instance_password=CONF.compute_feature_enabled.
            enable_instance_password,
            **params)
        self.interfaces_client = interfaces_client.InterfacesClient(
            self.auth_provider, **params)
        self.keypairs_client = keypairs_client.KeyPairsClient(
            self.auth_provider,
            ssh_key_type=CONF.validation.ssh_key_type,
            **params)
        self.hv_client = hypervisor_client.HypervisorClient(
            self.auth_provider, **params)
        self.az_client = availability_zone_client.AvailabilityZoneClient(
            self.auth_provider, **params)

        self.qos_limit_bandwidth_rules_client = \
            qos_limit_bandwidth_rules_client.QosLimitBandwidthRulesClient(
                self.auth_provider,
                CONF.network.catalog_type,
                CONF.network.region or CONF.identity.region,
                endpoint_type=CONF.network.endpoint_type,
                build_interval=CONF.network.build_interval,
                build_timeout=CONF.network.build_timeout,
                **self.default_params)

        self.qos_minimum_bandwidth_rules_client = \
            qos_minimum_bandwidth_rules_client.QosMinimumBandwidthRulesClient(
                self.auth_provider,
                CONF.network.catalog_type,
                CONF.network.region or CONF.identity.region,
                endpoint_type=CONF.network.endpoint_type,
                build_interval=CONF.network.build_interval,
                build_timeout=CONF.network.build_timeout,
                **self.default_params)

        self.qos_minimum_packet_rate_rules_client = \
            qos_minimum_packet_rate_rules_client.\
            QosMinimumPacketRateRulesClient(
                self.auth_provider,
                CONF.network.catalog_type,
                CONF.network.region or CONF.identity.region,
                endpoint_type=CONF.network.endpoint_type,
                build_interval=CONF.network.build_interval,
                build_timeout=CONF.network.build_timeout,
                **self.default_params)
示例#4
0
 def setUp(self):
     super(TestKeyPairsClient, self).setUp()
     fake_auth = fake_auth_provider.FakeAuthProvider()
     self.client = keypairs_client.KeyPairsClient(fake_auth, 'compute',
                                                  'regionOne')