Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/openstack/__pycache__/service_description.cpython-39.pyc
Ðазад
a t�hq5 � @ sl d dl Z d dlZd dlmZ d dlmZ d dlmZ dgZe�d�Z e� � ZG dd� d�ZG d d� d�Z dS ) � N)�_log)� exceptions)�proxy�ServiceDescription� openstackc @ s e Zd Zdd� Zdd� ZdS )�_ServiceDisabledProxyShimc C s || _ || _d S �N��service_type�reason)�selfr r � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/openstack/service_description.py�__init__ s z"_ServiceDisabledProxyShim.__init__c C s t �dj| j| jpdd���d S )Nz\Service '{service_type}' is disabled because its configuration could not be loaded. {reason}� r )r ZServiceDisabledException�formatr r )r �itemr r r �__getattr__# s ��z%_ServiceDisabledProxyShim.__getattr__N)�__name__� __module__�__qualname__r r r r r r r s r c @ sR e Zd ZdZdZg Zddd�Zdd� Zdd� Zdd � Z d d� Z dd � Zdd� ZdS )r Nc C s: |p| j | _ |p| jpi | _|p$| j| _|g| j | _dS )a� Class describing how to interact with a REST service. Each service in an OpenStack cloud needs to be found by looking for it in the catalog. Once the endpoint is found, REST calls can be made, but a Proxy class and some Resource objects are needed to provide an object interface. Instances of ServiceDescription can be passed to `openstack.connection.Connection.add_service`, or a list can be passed to the `openstack.connection.Connection` constructor in the ``extra_services`` argument. All three parameters can be provided at instantation time, or a service-specific subclass can be used that sets the attributes directly. :param string service_type: service_type to look for in the keystone catalog :param list aliases: Optional list of aliases, if there is more than one name that might be used to register the service in the catalog. N)r �supported_versions�aliases� all_types)r r r r r r r r 3 s ��zServiceDescription.__init__c C s� |d u r| S | j |jvr�| �|�}t|t�s�ztj�|�}W n4 typ | � |j � | �|�}tj�|�}Y n0 |jr�| �||� ||_ ||j| j <