/usr/lib/python2.6/site-packages/keystoneauth1/identity/generic
Edit: /usr/lib/python2.6/site-packages/keystoneauth1/identity/generic/base.pyc (5512B)
Ñò
DVc @ s« d d k Z d d k Z d d k i i i Z d d k l Z d d k l
Z
d d k l Z d d k l
Z
e i e ƒ Z e i e i ƒ d e
i f d „ ƒ Yƒ Z d S( iÿÿÿÿN( t _utils( t discover( t
exceptions( t baset BaseGenericPluginc
B s† e Z d Z d d d d d d d d d d „ Z e i d d „ ƒ Z e d „ ƒ Z e d „ ƒ Z
e d „ ƒ Z d „ Z d „ Z
RS( sÑ An identity plugin that is not version dependant.
Internally we will construct a version dependant plugin with the resolved
URL and then proxy all calls from the base plugin to the versioned one.
c C ss t t | ƒ i d | ƒ | p | | _ | p | | _ | | _ | | _ | | _ | | _ |
| _ d | _ d S( Nt auth_url( t superR t __init__t _project_idt
_project_namet _project_domain_idt _project_domain_namet
_domain_idt _domain_namet _trust_idt Nonet _plugin( t selfR t tenant_idt tenant_namet
project_idt project_namet project_domain_idt project_domain_namet domain_idt domain_namet trust_id( ( sJ /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/generic/base.pyR # s
c C s d S( sÉ Create a plugin from the given paramters.
This function will be called multiple times with the version and url
of a potential endpoint. If a plugin can be constructed that fits the
params then it should return it. If not return None and then another
call will be made with other available URLs.
:param session: A session object.
:type session: keystonauth.session.Session
:param tuple version: A tuple of the API version at the URL.
:param string url: The base URL for this version.
:param string raw_status: The status that was in the discovery field.
:returns: A plugin that can match the parameters or None if nothing.
N( R ( R t sessiont versiont urlt
raw_status( ( sJ /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/generic/base.pyt
create_plugin9 s c C s" t | i | i | i | i g ƒ S( s® Are there domain parameters.
Domain parameters are v3 only so returns if any are set.
:returns: True if a domain parameter is set, false otherwise.
( t anyR R
R
R ( R ( ( sJ /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/generic/base.pyt _has_domain_scopeL s c C s" h | i d 6| i d 6| i d 6S( s) Parameters that are common to v2 plugins.R R R ( R R R ( R ( ( sJ /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/generic/base.pyt
_v2_paramsW s
c C sJ h | i d 6| i d 6| i d 6| i d 6| i d 6| i d 6| i d 6S( s) Parameters that are common to v3 plugins.R R R R R R R ( R R R R
R R R
( R ( ( sJ /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/generic/base.pyt
_v3_params^ s
c
C s· d } y | i | | i d t ƒ} WnÈ t i t i t i f j
oª t i d ƒ t
i
| i ƒ } | i i ƒ } | i
d ƒ o9 | i o t i d ƒ ‚ n | i | d
| i ƒ } q˜| i
d ƒ o | i | d | i ƒ } q˜nª X| i ƒ } t } xq | D]i } | d } t i d | ƒ o | i o
t } q n | i | | | d
d | d ƒ} | o Pq q W| o | o t i d ƒ ‚ n | o | St i d ƒ ‚ d S( Nt
authenticateds‚ Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL.s /v2.0s. Cannot use v2 authentication with domain scopei i s /v3i R R R s1 Could not determine a suitable URL for the plugin( i i ( i i ( i ( R t
get_discoveryR t FalseR t DiscoveryFailuret HttpErrort ConnectionErrort LOGt warningt urlparset patht lowert
startswithR! R t version_dataR t
version_matcht True(
R R t plugint disct url_partsR- t disc_datat v2_with_domain_scopet dataR ( ( sJ /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/generic/base.pyt _do_create_plugini sN
!
c K s3 | i p | i | ƒ | _ n | i i | | S( N( R R9 t get_auth_ref( R R t kwargs( ( sJ /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/generic/base.pyR: ¢ s
N( t __name__t
__module__t __doc__R R t abct abstractmethodR t propertyR! R" R# R9 R: ( ( ( sJ /tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/generic/base.pyR s"
9( R? t sixt six.moves.urllib.parset movest urllibt parseR, t
keystoneauth1R t utilsR R t keystoneauth1.identityR t
get_loggerR<