Deprecate client_parameters from ServiceClients
client_parameters was been designed as a way to pass parameters for service clients to the ServiceClients class. After the initial implementation, the client registry was added, which allows for automatic registration of all clients and their parameters. If configuration is available, parameters will be pushed into the registry automatically. When the registry part was implemented, the client_parameters logic has been broken. Parameters are loaded and prepared correctly, but ultimately they are not used for registration, they are basically ignored. So this commit simply deprecates client_parameters, so that once it's not used in tempest/clients.py anymore and the deprecation periodic is over it can be removed. closes-bug: #1680915 Change-Id: Ib37bde098d15ce440297728f0d0e1087b8693b6c
This commit is contained in:
parent
d649055e46
commit
3b6d599c9b
@ -0,0 +1,6 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
Deprecate the client_parameters argument in
|
||||
`tempest.lib.services.clients.ServiceClients`. The parameter is actually
|
||||
not honoured already - see https://bugs.launchpad.net/tempest/+bug/1680915
|
@ -17,7 +17,9 @@
|
||||
import copy
|
||||
import importlib
|
||||
import inspect
|
||||
import warnings
|
||||
|
||||
from debtcollector import removals
|
||||
from oslo_log import log as logging
|
||||
|
||||
from tempest.lib import auth
|
||||
@ -29,7 +31,7 @@ from tempest.lib.services import image
|
||||
from tempest.lib.services import network
|
||||
from tempest.lib.services import volume
|
||||
|
||||
|
||||
warnings.simplefilter("once")
|
||||
LOG = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@ -257,6 +259,7 @@ class ServiceClients(object):
|
||||
# initialises this class using values from tempest CONF object. The wrapper
|
||||
# class should only be used by tests hosted in Tempest.
|
||||
|
||||
@removals.removed_kwarg('client_parameters')
|
||||
def __init__(self, credentials, identity_uri, region=None, scope='project',
|
||||
disable_ssl_certificate_validation=True, ca_certs=None,
|
||||
trace_requests='', client_parameters=None):
|
||||
@ -272,7 +275,12 @@ class ServiceClients(object):
|
||||
Parameters dscv, ca_certs and trace_requests all apply to the auth
|
||||
provider as well as any service clients provided by this manager.
|
||||
|
||||
Any other client parameter must be set via client_parameters.
|
||||
Any other client parameter should be set via ClientsRegistry.
|
||||
|
||||
Client parameter used to be set via client_parameters, but this is
|
||||
deprecated, and it is actually already not honoured
|
||||
anymore: https://launchpad.net/bugs/1680915.
|
||||
|
||||
The list of available parameters is defined in the service clients
|
||||
interfaces. For reference, most clients will accept 'region',
|
||||
'service', 'endpoint_type', 'build_timeout' and 'build_interval', which
|
||||
@ -287,6 +295,10 @@ class ServiceClients(object):
|
||||
- Volume client for 'volume' accepts 'default_volume_size'
|
||||
- Servers client from 'compute' accepts 'enable_instance_password'
|
||||
|
||||
If Tempest configuration is used, parameters will be loaded in the
|
||||
Registry automatically for all service client (Tempest stable ones
|
||||
and plugins).
|
||||
|
||||
Examples:
|
||||
|
||||
>>> identity_params = config.service_client_config('identity')
|
||||
@ -311,14 +323,6 @@ class ServiceClients(object):
|
||||
for the version. Values are dictionaries of parameters that are
|
||||
going to be passed to all clients in the service client module.
|
||||
|
||||
Examples:
|
||||
|
||||
>>> params_service_x = {'param_name': 'param_value'}
|
||||
>>> client_parameters = { 'service_x': params_service_x }
|
||||
|
||||
>>> params_service_y = config.service_client_config('service_y')
|
||||
>>> client_parameters['service_y'] = params_service_y
|
||||
|
||||
"""
|
||||
self._registered_services = set([])
|
||||
self.credentials = credentials
|
||||
|
Loading…
Reference in New Issue
Block a user