Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/keystoneauth1/loading/__pycache__/adapter.cpython-39.pyc
Ðазад
a s�h�B � @ s. d dl Z d dlZd dlmZ d dlmZ d dlmZ ejrRd dl m Z d dlmZ dZG dd � d ej ej �Zd eeejf dd�dd �Zd e jeje dd�dd�Ze jedd�dd�Zd!deeejeeed f ed d�dd�Zdeejejd�dd�Zd"eejeeed f ed d�dd�ZdS )#� N)�adapter)�_utils)�base)�cfg)�opts)�register_argparse_arguments�#register_service_argparse_arguments�register_conf_options�load_from_conf_options�get_conf_optionsc @ s� e Zd Zeejej d�dd��Ze d d�dd�Z edeej eee d f e d d�dd ��Zddeeej eee d f e d d�dd�Zdeejejd�dd�ZdS )�Adapter)�returnc C s t jS �N)r r ��self� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/keystoneauth1/loading/adapter.py�plugin_class$ s zAdapter.plugin_classzopts.Optc C s g S r r r r r r �get_options( s zAdapter.get_optionsTN�cfg.DeprecatedOpt�cfg.Opt��include_deprecated�deprecated_optsr c C sX t �� }|du ri }dd� |�� D �}|jd|�d�dd�|jd|�d�dd�|jd |�d �d d�|jd|�d�dd�|jd |�d �dd�|jd|�d�dd�|jd|�d�dd�|jd|�d�dd�|jd|�d�dd�|jd|�d�dd�|jd|�d�dd�|jd|�d�dd�|jd|�d�|j� � dd�g }| �rT||jd d!d"d#d$�g7 }|S )%a� Get oslo_config options that are needed for a :py:class:`.Adapter`. These may be useful without being registered for config file generation or to manipulate the options before registering them yourself. The options that are set are: :service_type: The default service_type for URL discovery. :service_name: The default service_name for URL discovery. :interface: The default interface for URL discovery. (deprecated) :valid_interfaces: List of acceptable interfaces for URL discovery. Can be a list of any of 'public', 'internal' or 'admin'. :region_name: The default region_name for URL discovery. :endpoint_override: Always use this endpoint URL for requests for this client. :version: The minimum version restricted to a given Major API. Mutually exclusive with min_version and max_version. :min_version: The minimum major version of a given API, intended to be used as the lower bound of a range with max_version. Mutually exclusive with version. If min_version is given with no max_version it is as if max version is 'latest'. :max_version: The maximum major version of a given API, intended to be used as the upper bound of a range with min_version. Mutually exclusive with version. :param include_deprecated: If True (the default, for backward compatibility), deprecated options are included in the result. If False, they are excluded. :param dict deprecated_opts: Deprecated options that should be included in the definition of new options. This should be a dict from the name of the new option to a list of oslo.DeprecatedOpts that correspond to the new option. (optional) For example, to support the ``api_endpoint`` option pointing to the new ``endpoint_override`` option name:: old_opt = oslo_cfg.DeprecatedOpt('api_endpoint', 'old_group') deprecated_opts = {'endpoint_override': [old_opt]} :returns: A list of oslo_config options. Nc S s i | ]\}}|� d d�|�qS )�_�-)�replace)�.0�name�optr r r � <dictcomp>g s �z,Adapter.get_conf_options.<locals>.<dictcomp>zservice-typez4The default service_type for endpoint URL discovery.)r �helpzservice-namez4The default service_name for endpoint URL discovery.zvalid-interfacesz=List of interfaces, in order of preference, for endpoint URL.zregion-namez3The default region_name for endpoint URL discovery.zendpoint-overridez�Always use this endpoint URL for requests for this client. NOTE: The unversioned endpoint should be specified here; to request a particular API version, use the `version`, `min-version`, and/or `max-version` options.�versionz�Minimum Major API version within a given Major API version for endpoint URL discovery. Mutually exclusive with min_version and max_versionzmin-versionz�The minimum major version of a given API, intended to be used as the lower bound of a range with max_version. Mutually exclusive with version. If min_version is given with no max_version it is as if max version is "latest".zmax-versionz�The maximum major version of a given API, intended to be used as the upper bound of a range with min_version. Mutually exclusive with version.zconnect-retrieszMThe maximum number of retries that should be attempted for connection errors.zconnect-retry-delayz�Delay (in seconds) between two retries for connection errors. If not set, exponential retry starting with 0.5 seconds up to a maximum of 60 seconds is used.zstatus-code-retrieszWThe maximum number of retries that should be attempted for retriable HTTP status codes.zstatus-code-retry-delayz�Delay (in seconds) between two retries for retriable status codes. If not set, exponential retry starting with 0.5 seconds up to a maximum of 60 seconds is used.zretriable-status-codeszXList of retriable HTTP status codes that should be retried. If not set default to [503])r Z item_typer! � interfacez1The default interface for endpoint URL discovery.TzgUsing valid-interfaces is preferrable because it is capable of accepting a list of possible interfaces.)r! Zdeprecated_for_removalZdeprecated_reason) r �get_oslo_config�itemsZStrOpt�getZListOptZIntOptZFloatOpt�types�Integer)r r r r r r r r + s� 6������ �� ��� �� ��b��zAdapter.get_conf_options�cfg.ConfigOpts��conf�groupr r r c C s4 | j ||d�}|�t�� �|�� |j||d� |S )a� Register the oslo_config options that are needed for an Adapter. The options that are set are: :service_type: The default service_type for URL discovery. :service_name: The default service_name for URL discovery. :interface: The default interface for URL discovery. (deprecated) :valid_interfaces: List of acceptable interfaces for URL discovery. Can be a list of any of 'public', 'internal' or 'admin'. :region_name: The default region_name for URL discovery. :endpoint_override: Always use this endpoint URL for requests for this client. :version: The minimum version restricted to a given Major API. Mutually exclusive with min_version and max_version. :min_version: The minimum major version of a given API, intended to be used as the lower bound of a range with max_version. Mutually exclusive with version. If min_version is given with no max_version it is as if max version is 'latest'. :max_version: The maximum major version of a given API, intended to be used as the upper bound of a range with min_version. Mutually exclusive with version. :connect_retries: The maximum number of retries that should be attempted for connection errors. :status_code_retries: The maximum number of retries that should be attempted for retriable HTTP status codes. :param oslo_config.Cfg conf: config object to register with. :param string group: The ini group to register options in. :param include_deprecated: If True (the default, for backward compatibility), deprecated options are registered. If False, they are excluded. :param dict deprecated_opts: Deprecated options that should be included in the definition of new options. This should be a dict from the name of the new option to a list of oslo.DeprecatedOpts that correspond to the new option. (optional) For example, to support the ``api_endpoint`` option pointing to the new ``endpoint_override`` option name:: old_opt = oslo_cfg.DeprecatedOpt('api_endpoint', 'old_group') deprecated_opts = {'endpoint_override': [old_opt]} :returns: The list of options that was registered. �r r )r, )r Zregister_groupr r$ ZOptGroupZ register_opts)r r+ r, r r r r r r r � s :�zAdapter.register_conf_options�r+ r, �kwargsr c K s"