Repository URL to install this package:
|
Version:
5.0.6.dev24-5.0 ▾
|
python3-dmapi
/
usr
/
lib
/
python3.6
/
site-packages
/
dmapi
/
__pycache__
/
context.cpython-36.pyc
|
|---|
3
kÉÛc 9 ã @ s. d Z ddlZddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ ddl
mZ dd lmZ ddlZdd
lmZ ddlmZ ddlmZ dd
lmZ ejeZe Ze ZG dd dejZ ej!G dd de
j"Z"dd Z#d%ddZ$dd Z%dd Z&dd Z'dd Z(dd Z)i a*d!d" Z+ed#d$ Z,dS )&zGRequestContext: context for requests that persist through all of dmapi.é N)Úcontextmanager)Úservice_catalog)Úplugin)Úcontext)Úenginefacade)Úlog)Ú timeutils)Ú exception)Ú_)Úpolicy)Ú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
dddZdddZ fddZdd Z ZS )ÚRequestContextzpSecurity context and request information.
Represents the user taking a given action within the system.
NÚnoFc sº |r||d<