Repository URL to install this package:
|
Version:
4.1.94.1.dev12-4.1 ▾
|
python3-tvault-contego
/
usr
/
lib
/
python3.6
/
site-packages
/
contego
/
__pycache__
/
context.cpython-36.opt-1.pyc
|
|---|
3
h§`". ã @ s
d Z ddlZddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ dd lmZ ddlZdd
lmZ ddlmZ ddlmZ ejeZe 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| j || _tj|| _d S )N)Úsuperr Ú__init__Ú
auth_tokenÚksa_service_catalogZServiceCatalogV2r )Úselfr Zsc)Ú __class__© ú/usr/lib/python3.6/context.pyr ) s z_ContextAuthPlugin.__init__c O s | j S )N)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<