Repository URL to install this package:
Version:
5.2.8-5.2 ▾
|
python3-dmapi-el9
/
usr
/
lib
/
python3.9
/
site-packages
/
dmapi
/
__pycache__
/
context.cpython-39.pyc
|
---|
a [r`e 9 ã @ s. d Z ddlZddlmZ ddlmZ ddlmZ ddl m Z ddlmZ ddl mZ dd lmZ ddlZdd lmZ ddlmZ ddlmZ dd lmZ e e¡Ze 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| ¡ || _t |¡| _d S ©N)Úsuperr Ú__init__Ú auth_tokenÚksa_service_catalogZServiceCatalogV2r )Úselfr Zsc©Ú __class__© ú1/usr/lib/python3.9/site-packages/dmapi/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 dddZdddZ fddZdd Z ZS )ÚRequestContextzpSecurity context and request information. Represents the user taking a given action within the system. NÚnoFc sº |r||d<