Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/keystoneauth1/fixture/__pycache__/v2.cpython-39.pyc
Ðазад
a s�h� � @ sh d dl Z d dlZd dlZd dlmZ d dlmZ G dd� dee ej f �ZG dd� dee ej f �ZdS )� N)�_utils)� exceptionc @ s e Zd Zddd�ZdS )�_ServiceNc C sD |pt �� j||p||p|||p(t �� jd�}| �dg ��|� |S )N)ZtenantIdZ publicURLZadminURLZinternalURL�region�idZ endpoints)�uuid�uuid4�hex� setdefault�append)�self�publicZadminZinternal� tenant_idr r �data� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/keystoneauth1/fixture/v2.py�add_endpoint s � z_Service.add_endpoint)NNNNN)�__name__� __module__�__qualname__r r r r r r s �r c s� e Zd ZdZdB� fdd� Zedd� �Zedd� �Zed d � �Zej dd � �Zedd � �Z e j dd � �Z edd� �Zej dd� �Zedd� �Zej dd� �Zedd� �Z e j dd� �Z edd� �Zedd� �Zej dd� �Zedd� �Zej dd� �Zed d!� �Zej d"d!� �Zed#d$� �Zej d%d$� �Zed&d'� �Zed(d)� �Zej d*d)� �Zed+d,� �Zej d-d,� �Zed.d/� �Zej d0d/� �Zed1d2� �Zej d3d2� �Zd4d5� ZdCd6d7�ZdDd8d9�Zd:d;� ZdEd<d=�ZdFd>d?�Zd@dA� Z� ZS )G�Tokena[ A V2 Keystone token that can be used for testing. This object is designed to allow clients to generate a correct V2 token for use in there test code. It should prevent clients from having to know the correct token format and allow them to test the portions of token handling that matter to them and not copy and paste sample. Nc s� t � �� |pt�� j| _|p&t�� j| _|p6t�� j| _| pFt�� j| _|sZt j dd�}|sn|tjdd� }z || _ W n ttfy� || _Y n0 z || _W n ttfy� || _Y n0 |s�|r�| �||� |s�| r�| j|| p�|d� |r�|| _d S )N� )�minutes� )�hours)r �trustee_user_id)�super�__init__r r r �token_id�user_id� user_name�audit_idr Z before_utcnow�datetime� timedelta�issued� TypeError�AttributeError� issued_str�expires�expires_str� set_scope� set_trust�audit_chain_id)r r r( r$ r �tenant_namer r �trust_idr r! r, �� __class__r r r 5 s2 �zToken.__init__c C s | � di �S )N�access)r �r r r r �rooth s z Token.rootc C s | j �di �S )N�token�r3 r r2 r r r �_tokenl s zToken._tokenc C s | j d S �Nr �r6 r2 r r r r p s zToken.token_idc C s || j d<