Repository URL to install this package:
|
Version:
4.2.50-4.2 ▾
|
python3-dmapi
/
usr
/
lib
/
python3.6
/
site-packages
/
dmapi
/
conf
/
__pycache__
/
utils.cpython-36.pyc
|
|---|
3
M¹Øan
ã @ sH d Z ddlmZ ddlmZ dZddd Zd
d Zdd
dZ dd Z
dS )z\Common utilities for conf providers.
This module does not provide any actual conf options.
é )Úloading)ÚcfgÚversionÚmin_versionÚmax_versionNc C sP t jd|d}x(|dd
D ]}|jtkr|j| qW tj|ddg| d |S )aú Get auth, Session, and Adapter conf options from keystonauth1.loading.
:param default_service_type: Default for the service_type conf option on
the Adapter.
:param deprecated_opts: dict of deprecated opts to register with the ksa
Adapter opts. Works the same as the
deprecated_opts kwarg to:
keystoneauth1.loading.session.Session.register_conf_options
:return: List of cfg.Opts.
F)Zinclude_deprecatedÚdeprecated_optsNZinternalZpublic)Zvalid_interfacesZservice_type)Ú
ks_loadingZget_adapter_conf_optionsÚdestÚ_ADAPTER_VERSION_OPTSÚremover Zset_defaults)Údefault_service_typer ZoptsÚopt© r ú/usr/lib/python3.6/utils.pyÚget_ksa_adapter_opts s
r c C s t j| dd dS )Nc S s d S )Nr )Úxr r r Ú<lambda>- s z_dummy_opt.<locals>.<lambda>)Útype)r ZOpt)Únamer r r Ú
_dummy_opt* s r Tc C sf t |d|}tj| ||d |r,tj| | | jt||d|d xtD ]}| jt||d qHW dS )a Register keystoneauth auth, Session, and Adapter opts.
:param conf: oslo_config.cfg.CONF in which to register the options
:param group: Conf group, or string name thereof, in which to register the
options.
:param default_service_type: Default for the service_type conf option on
the Adapter.
:param include_auth: For service types where Nova is acting on behalf of
the user, auth should come from the user context.
In those cases, set this arg to False to avoid
registering ksa auth options.
:param deprecated_opts: dict of deprecated opts to register with the ksa
Session or Adapter opts. See docstring for
the deprecated_opts param of:
keystoneauth1.loading.session.Session.register_conf_options
r )r )ÚgroupN) Úgetattrr Zregister_session_conf_optionsZregister_auth_conf_optionsZ
register_optsr r
Zregister_optr )Zconfr r Zinclude_authr r r r r Úregister_ksa_opts0 s
r c C s i S )Nr r r r r Ú list_optsP s r )r r r )N)TN)Ú__doc__Z
keystoneauth1r r Zoslo_configr r
r r r r r r r r Ú<module> s