Exemplo n.º 1
0
    def _set_object_storage_clients(self):
        # Mandatory parameters (always defined)
        params = self.parameters['object-storage']

        self.account_client = object_storage.AccountClient(
            self.auth_provider, **params)
        self.capabilities_client = object_storage.CapabilitiesClient(
            self.auth_provider, **params)
        self.container_client = object_storage.ContainerClient(
            self.auth_provider, **params)
        self.object_client = object_storage.ObjectClient(
            self.auth_provider, **params)
Exemplo n.º 2
0
def get_extension_client(os, service):
    params = config.service_client_config('object-storage')
    extensions_client = {
        'nova': os.compute.ExtensionsClient(),
        'neutron': os.network.ExtensionsClient(),
        'swift': object_storage.CapabilitiesClient(os.auth_provider, **params),
        # NOTE: Cinder v3 API is current and v2 and v1 are deprecated.
        # V3 extension API is the same as v2, so we reuse the v2 client
        # for v3 API also.
        'cinder': os.volume_v2.ExtensionsClient(),
    }

    if service not in extensions_client:
        print('No tempest extensions client for %s' % service)
        sys.exit(1)
    return extensions_client[service]
Exemplo n.º 3
0
    def _set_object_storage_clients(self):
        # NOTE(andreaf) Load configuration from config. Once object storage
        # is in lib, configuration will be pulled directly from the registry
        # and this will not be required anymore.
        params = config.service_client_config('object-storage')

        self.account_client = object_storage.AccountClient(
            self.auth_provider, **params)
        self.bulk_client = object_storage.BulkMiddlewareClient(
            self.auth_provider, **params)
        self.capabilities_client = object_storage.CapabilitiesClient(
            self.auth_provider, **params)
        self.container_client = object_storage.ContainerClient(
            self.auth_provider, **params)
        self.object_client = object_storage.ObjectClient(
            self.auth_provider, **params)