Repository URL to install this package:
|
Version:
6.0.24-6.0 ▾
|
python3-tvault-contego-el9
/
usr
/
lib
/
python3.9
/
site-packages
/
contego
/
__pycache__
/
context.cpython-39.pyc
|
|---|
a
JrgI. ã @ s
d Z ddlZddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ dd lmZ ddlZdd
lmZ ddlmZ ddlmZ e e¡Ze Ze ZG d
d dejZej G dd de
j!Z!dd Z"d ddZ#dd Z$dd Z%dd Z&dd Z'dd Z(dS )!zGRequestContext: context for requests that persist through all of dmapi.é N)Úcontextmanager)Úservice_catalog)Úplugin©Úcontext)Úenginefacade)Úlog)Ú timeutils)Ú exception)Ú_)Úutilsc s2 e Zd ZdZ fddZdd Zd ddZ ZS )
Ú_ContextAuthPluginzñA keystoneauth auth plugin that uses the values from the Context.
Ideally we would use the plugin provided by auth_token middleware however
this plugin isn't serialized yet so we construct one from the serialized
auth data.
c s$ t t| ¡ || _t |¡| _d S ©N)Úsuperr
Ú__init__Ú
auth_tokenÚksa_service_catalogZServiceCatalogV2r )Úselfr Zsc©Ú __class__© ú3/usr/lib/python3.9/site-packages/contego/context.pyr ) s z_ContextAuthPlugin.__init__c O s | j S r )r )r ÚargsÚkwargsr r r Ú get_token/ s z_ContextAuthPlugin.get_tokenNc K s | j j||||dS )N)Úservice_typeÚservice_nameÚ interfaceÚregion_name)r Zurl_for)r Zsessionr r r r r r r r Úget_endpoint2 s
ýz_ContextAuthPlugin.get_endpoint)NNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r r r Ú
__classcell__r r r r r
! s ÿr
c
s e Zd ZdZd fdd Zdd Zd d
Zdd Zd
d Ze eeeZ
fddZe fddZ
dddZdddZdd Z ZS )ÚRequestContextzpSecurity context and request information.
Represents the user taking a given action within the system.
NÚnoFc s¤ |r||d<