+
    9!jX                        ^ RI t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	t	^ RI
Ht ^ RIHt ^ RI
Ht ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH t  ^ RIH!t! ^ RIH"t" ^ RIH#t# ^ RIH$t$ ^ RIH%t% ]PL                  ! ]'4      t(R t)R t*]PV                   ! R R ],4      4       t- ! R! R"],4      t. ! R# R$],4      t/R# )%    N)removals)log)auth)misc)
exceptions)compute)identity)image)network)object_storage)	placement)volume)loadbalancer)vpc)faas)kaas)egress_proxy)container_registry)flava_pulsar)dns)gslb)langfuse)
servicemap)redis)api_gateway)rollouts)cloud_blueprintc                    / R\         bR\        bR\        P                  bR\        P                  bR\
        P                  bR\        bR\        bR\        P                  bR	\        bR
\        bR\        bR\        bR\        bR\        bR\        bR\         bR\"        bR\$        R\&        R\(        R\*        R\,        R\.        /C# )zDict of service client modules available in Tempest.

Provides a dict of stable service modules available in Tempest, with
``service_version`` as key, and the module object as value.
r   r   zidentity.v2zidentity.v3zimage.v2r   zobject-storagez	volume.v3r   r   r   r   egressproxyr   r   r   r   r   r   r   r   r   r   )r   r   r	   v2v3r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r        `/Users/user/workspace/sujinbaek/cqa-test-app/flava-qa/cqa-cloud-api-test/lib/services/clients.pytempest_modulesr%   8   s
   7Y 	x{{ 	x{{	
 	EHH 	7 	. 	VYY 	 	s 	 	 	| 	0  	!" 	s#$ 	%& 	Hj{H?1 r#   c                    \        . 4      p \        \        4       4      p\        4       P                  4       p. pV F  p\        W$,           Uu. uF  qUR,          NK  	  up4      pV'       dP   VP	                  V 4      '       g9   RV: RV V,          : R2pVP                  \        P                  ! WGR7      4       W,          p K  	  V'       d+   \        P                  RV4       \        P                  ! V!  hW,          # u upi )a  Set of service client modules available in Tempest and plugins

Set of stable service clients from Tempest and service clients exposed
by plugins. This set of available modules can be used for automatic
configuration.

:raise PluginRegistrationException: if a plugin exposes a service_version
    already defined by Tempest or another plugin.

Examples::

    from tempest import config
    params = {}
    for service_version in available_modules():
        service = service_version.split('.')[0]
        params[service] = config.service_client_config(service)
    service_clients = ServiceClients(creds, identity_uri,
                                     client_parameters=params)
service_versionzPlugin z! is trying to register a service z already claimed by another onenamedetailed_errorz:Failed to list available modules due to name conflicts: %s)setr%   ClientsRegistryget_service_clients
isdisjointappendr   PluginRegistrationExceptionLOGerror	testtoolsMultipleExceptions)extra_service_versions_tempest_modulesplugin_servicesname_conflictsplugin_namexplug_service_versionsr*   s           r$   available_modulesr<   Z   s   ( !W?,-%';;=ON& #%4%A%C%A ?@'8%9%9%A%C !D !(334JKK 1<0F0E1F 1FG 
 %%j&L&L$'E F7 ' 		H	 **N;;44%%Cs   D
c                   6   a  ] tR t^t o RtR tR tR tRtV t	R# )r,   z6Registry of all service clients available from pluginsc                    / V n         R # N_service_clientsselfs   &r$   __init__ClientsRegistry.__init__   s
     "r#   c                    WP                   9   d!   R p\        P                  ! VW1,          R7      hW P                   V&   \        P	                  RVV4       R# )z(Clients for plugin %s already registeredr(   zWSuccessfully registered plugin %s in the service client registry with configuration: %sN)rA   r   r0   r1   debug)rC   r9   service_client_datar*   s   &&& r$   register_service_client'ClientsRegistry.register_service_client   sW    ///GN88 -;= = .Ak*		 45@%	'r#   c                    V P                   # r?   r@   rB   s   &r$   r-   #ClientsRegistry.get_service_clients   s    $$$r#   r@   N)
__name__
__module____qualname____firstlineno____doc__rD   rI   r-   __static_attributes____classdictcell____classdict__s   @r$   r,   r,      s     @#	'% %r#   r,   c                   @   a  ] tR t^t o RtR tR t]R 4       tRt	V t
R# )ClientsFactorya  Builds service clients for a service client module

This class implements the logic of feeding service client parameters
to service clients from a specific module. It allows setting the
parameters once and obtaining new instances of the clients without the
need of passing any parameter.

ClientsFactory can be used directly, or consumed via the `ServiceClients`
class, which manages the authorization part.
c           
         \         P                  ! V4      pV FF  pV P                  WV4      p\        P                  ! V4      p\	        WV P                  WsV4      4       KH  	  R# )aM  Initialises the client factory

:param module_path: Path to module that includes all service clients.
    All service client classes must be exposed by a single module.
    If they are separated in different modules, defining __all__
    in the root module can help, similar to what is done by service
    clients in tempest.
:param client_names: List or set of names of the service client
    classes.
:param auth_provider: The auth provider used to initialise client.
:param kwargs: Parameters to be passed to all clients. Parameters
    values can be overwritten when clients are initialised, but
    parameters cannot be deleted.
:raise ImportError: if the specified module_path cannot be imported

Example::

    # Get credentials and an auth_provider
    clients = ClientsFactory(
        module_path='my_service.my_service_clients',
        client_names=['ServiceClient1', 'ServiceClient2'],
        auth_provider=auth_provider,
        service='my_service',
        region='region1')
    my_api_client = clients.MyApiClient()
    my_api_client_region2 = clients.MyApiClient(region='region2')

N)	importlibimport_module
_get_classcopysetattr_get_partial_class)	rC   module_pathclient_namesauth_providerkwargs_module
class_nameklassfinal_kwargss	   &&&&,    r$   rD   ClientsFactory.__init__   sZ    > ))+6&J OOG8E99V,L Dd&=&=l'4 5 'r#   c                $   a aaa RVVVV 3R llpV# )Nc                f   < SP                  V4       S! RRS/SB pV '       d   \        SW4       V# )a=  Returns a callable the initialises a service client

Builds a callable that accepts kwargs, which are passed through
to the __init__ of the service client, along with a set of defaults
set in factory at factory __init__ time.
Original args in the service client can only be passed as kwargs.

It accepts one extra parameter 'alias' compared to the original
service client. When alias is provided, the returned callable will
also set an attribute called with a name defined in 'alias', which
contains the instance of the service client.

:param alias: str Name of the attribute set on the factory once
    the callable is invoked which contains the initialised
    service client. If None, no attribute is set.
:param later_kwargs: kwargs passed through to the service client
    __init__ on top of defaults set at factory level.
ra   r"   )updater]   )aliaslater_kwargs_clientra   re   rb   rC   s   &, r$   partial_class8ClientsFactory._get_partial_class.<locals>.partial_class   s5    & MM,'B-B6BGe-Nr#   r?   r"   )rC   re   ra   rb   rn   s   ffff r$   r^   !ClientsFactory._get_partial_class   s    	 	2 r#   c                    \        WR 4      pV'       g   Rp\        WBV3,          4      h\        P                  ! V4      '       g   Rp\	        WC\        V4      3,          4      hV# )Nz)Invalid class name, %s is not found in %sz+Expected a class, got %s of type %s instead)getattrAttributeErrorinspectisclass	TypeErrortype)clsmodulerd   re   msgs   &&&  r$   r[   ClientsFactory._get_class   sY    D1=C F';!;<<u%%?CC$u+"6677r#   r"   N)rM   rN   rO   rP   rQ   rD   r^   classmethodr[   rR   rS   rT   s   @r$   rW   rW      s)     	,5\>  r#   rW   c                   t   a  ] tR tRt o Rt]P                  ! R4      R
R l4       tR t]	R 4       t
R tR	tV tR# )ServiceClientsi  a  Service client provider class

The ServiceClients object provides a useful means for tests to access
service clients configured for a specified set of credentials.
It hides some of the complexity from the authorization and configuration
layers.

Examples::

    # johndoe is a tempest.lib.auth.Credentials type instance
    johndoe_clients = clients.ServiceClients(johndoe, identity_uri)

    # List servers in default region
    johndoe_servers_client = johndoe_clients.compute.ServersClient()
    johndoe_servers = johndoe_servers_client.list_servers()

    # List servers in Region B
    johndoe_servers_client_B = johndoe_clients.compute.ServersClient(
        region='B')
    johndoe_servers = johndoe_servers_client_B.list_servers()

client_parametersNc
           
     j   \        . 4      V n        Wn        W n        V'       g   \        P
                  ! R4      hW0n        V P                  P                  4       '       g   \        P
                  ! V4      h\        P                  P                  4        U
u. uF]  p
\        V P                  \        P                  V
,          ^ ,          4      '       g   K=  V
\        P                  V
,          ^,          3NK_  	  pp
\        V4      ^8w  d+   R\        V4      W3,          p\        P
                  ! V4      hV^ ,          w  V n        pWPn        W`n        Wpn        Wn        V P                  P$                  '       g   V P                  P&                  '       d   RpM\V P                  P(                  '       d   RpM=V P                  P*                  '       g   V P                  P,                  '       d   RpMRpV! V P                  V P                  VV P                  V P                  V P                   V	R7      V n        T;'       g    / p/ V n        \3        4       p\        V Uu. uF  qP5                  R4      ^ ,          NK  	  up4      pV F1  pV P7                  VP9                  V/ 4      4      V P0                  V&   K3  	  V'       d/   \        P:                  ! \=        VP                  4       4      R7      h\?        4       pVPA                  4       p. pV F(  pVV,          pV F  p V PB                  ! R/ VB  K  	  K*  	  V'       d   \P        PR                  ! V!  hR
# u up
i u upi   \D         d@    TPG                  \H        PJ                  ! 4       4       \L        PO                  R	TT4        K  i ; i)a
  Service Clients provider

Instantiate a `ServiceClients` object, from a set of credentials and an
identity URI. The identity version is inferred from the credentials
object. Optionally auth scope can be provided.

A few parameters can be given a value which is applied as default
for all service clients: region, dscv, ca_certs, trace_requests.

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 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
are all inherited from RestClient.

The `config` module in Tempest exposes an helper function
`service_client_config` that can be used to extract from configuration
a dictionary ready to be injected in kwargs.

Exceptions are:
- Token clients for 'identity' must be given an 'auth_url' parameter
- 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')
    params = {
        'identity': identity_params,
        'compute': {'region': 'region2'}}
    manager = lib_manager.Manager(
        my_creds, identity_uri, client_parameters=params)

:param credentials: An instance of `auth.Credentials`
:param identity_uri: URI of the identity API. This should be a
                     mandatory parameter, and it will so soon.
:param region: Default value of region for service clients.
:param scope: default scope for tokens produced by the auth provider
:param disable_ssl_certificate_validation: Applies to auth and to all
                                          service clients.
:param ca_certs: Applies to auth and to all service clients.
:param trace_requests: Applies to auth and to all service clients.
:param client_parameters: Dictionary with parameters for service
    clients. Keys of the dictionary are the service client service
    name, as declared in `service_clients.available_modules()` except
    for the version. Values are dictionaries of parameters that are
    going to be passed to all clients in the service client module.
:param proxy_url: Applies to auth and to all service clients, set a
    proxy url for the clients to use.
z1ServiceClients requires a non-empty identity_uri.zGZero or %d ambiguous auth provider found. identity: %s, credentials: %sprojectsystemdomain)scope"disable_ssl_certificate_validationca_certstrace_requests	proxy_url.)serviceszCFailed to register service client from plugin %s with parameters %sNr"   )*r+   _registered_servicescredentialsidentity_urir   InvalidCredentialsregionis_validr   IDENTITY_VERSIONkeys
isinstancelenauth_versiondscvr   r   r   
project_idproject_namer   	domain_iddomain_namera   
parametersr<   split_setup_parameterspopUnknownServiceClientlistr,   r-   register_service_client_module	Exceptionr/   sysexc_infor1   	exceptionr3   r4   )rC   r   r   r   r   r   r   r   r   r   kr	   rz   auth_provider_classall_modulesr:   unversioned_servicesserviceclients_registryplugin_service_clientsregistration_errorspluginservice_clientsservice_clients   &&&&&&&&&&              r$   rD   ServiceClients.__init__   s7   D %(G!&(//CE E((**//<<
 ))..0O0 :;t//1F1Fq1I!1LM 5Q--a0340 	 O x=A"%(]H$JKC//4419!..6	 ,"&&&$*:*:*G*G*GE$$$E'''4+;+;+G+G+GEE0d//u/3yy]]43F3F	! .33 ()"&12kWWS\!__k2 4+G'+'='=!%%gr2(4DOOG$ , 11/44679 9 +,!1!E!E!G ,F4V<O"1F77I.I #2 - ..0CDD }OF 3, ! F'..s||~>MM-.4nFFs%   :M$M" M#&M((AN21N2c           	        \        W4      '       d.   \        W4      pRV,          p\        P                  ! WW4VR7      hW P                  9   d#   RV,          p\        P                  ! WW4VR7      h\        V P                  V P                  V P                  V P                  V P                  R7      pVP                  V4       \        R	RVRVRV P                  /VB p	\        WV	4       V P                  P!                  V4       R# )
a{  Register a service client module

Initiates a client factory for the specified module, using this
class auth_provider, and accessible via a `name` attribute in the
service client.

:param name: Name used to access the client
:param service_version: Name of the service complete with version.
    Used to track registered services. When a plugin implements it,
    it can be used by other plugins to obtain their configuration.
:param module_path: Path to module that includes all service clients.
    All service client classes must be exposed by a single module.
    If they are separated in different modules, defining __all__
    in the root module can help, similar to what is done by service
    clients in tempest.
:param client_names: List or set of names of service client classes.
:param kwargs: Extra optional parameters to be passed to all clients.
    ServiceClient provides defaults for region, dscv, ca_certs, http
    proxies and trace_requests.
:raise ServiceClientRegistrationException: if the provided name is
    already in use or if service_version is already registered.
:raise ImportError: if module_path cannot be imported.
zModule name already in use: %s)r)   r'   r_   r`   r*   zService %s already registered.)r   r   r   r   r   r_   r`   ra   Nr"   )hasattrrr   r   "ServiceClientRegistrationExceptionregistered_servicesdictr   r   r   r   r   rj   rW   ra   r]   r   add)
rC   r)   r'   r_   r`   rb   
using_namer*   params_factorys
   &&&&&,    r$   r   -ServiceClients.register_service_client_module  s   2 4 ,J=
JN??'-/ / 666=ON??'-/ / T[[9=#}}%)%8%8 $	0
 	f! ,k ,/;,040B0B, %+,
 	H%!!%%o6r#   c                    V P                   # r?   )r   rB   s   &r$   r   "ServiceClients.registered_services  s    (((r#   c                n    / pV P                   '       d   V P                   VR&   VP                  V4       V# )zSetup default values for client parameters

Region by default is the region passed as an __init__ parameter.
Checks that no parameter for an unknown service is provided.
r   )r   rj   )rC   r   _parameterss   && r$   r    ServiceClients._setup_parameters  s6     ;;;$(KKK!:& r#   )r   ra   r   r   r   r   r   r   r   r   r   )NNTN NN)rM   rN   rO   rP   rQ   r   removed_kwargrD   r   propertyr   r   rR   rS   rT   s   @r$   r~   r~     sS     8 /0ME 1ME^47l ) ) r#   r~   )0r\   rY   rt   r   debtcollectorr   oslo_logr   loggingr3   libr   lib.common.utilsr   r   lib.servicesr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   	getLoggerrM   r1   r%   r<   	singletonobjectr,   rW   r~   r"   r#   r$   <module>r      s   "    
 " #   !    !    ' "  %    % + %   ! #  $ ! ( !D+5\ %f % %*bV bJuV ur#   