/usr/lib/python2.6/site-packages/keystoneauth1/identity
NameSizeModeActions
generic/-0755rm
v3/-0755rm
access.py19160644editdlrm
access.pyc19680644editdlrm
base.py127190644editdlrm
base.pyc106140644editdlrm
v2.py57550644editdlrm
v2.pyc64420644editdlrm
__init__.py10650644editdlrm
__init__.pyc5990644editdlrm
Edit: /usr/lib/python2.6/site-packages/keystoneauth1/identity/base.pyc (10614B)
Ñò DVc @s¢ddkZddkZddkZddklZddklZddklZddklZei e ƒZ ei ei ƒdeifd„ƒYƒZdS(iÿÿÿÿN(t_utils(tdiscover(t exceptions(tplugintBaseIdentityPlugincBs§eZdZd ed„Zeid„ƒZd„Z d„Z d„Z d„Z d d d d d d„Z d„Zd „Zd „Zd „Zeiƒd d „ƒZRS(ixcCsJtt|ƒiƒ||_d|_||_h|_ti ƒ|_ dS(N( tsuperRt__init__tauth_urltNonetauth_reftreauthenticatet_endpoint_cachet threadingtLockt_lock(tselfRR ((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyR!s     cKsdS(sjObtain a token from an OpenStack Identity Service. This method is overridden by the various token version plugins. This function should not be called independently and is expected to be invoked via the do_authenticate function. This function will be invoked if the AcessInfo object cached by the plugin is not valid. Thus plugins should always fetch a new AccessInfo when invoked. If you are looking to just retrieve the current auth data then you should use get_access. :param session: A session object that can be used for communication. :type session: keystonauth.session.Session :raises keystonauth.exceptions.InvalidResponse: The response returned wasn't appropriate. :raises keystonauth.exceptions.HttpError: An error from an invalid HTTP response. :returns: Token access information. :rtype: :py:class:`keystonauth.access.AccessInfo` N((Rtsessiontkwargs((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyt get_auth_ref,scKs|i|ƒiS(sµReturn a valid auth token. If a valid token is not present then a new one will be fetched. :param session: A session object that can be used for communication. :type session: keystonauth.session.Session :raises keystonauth.exceptions.HttpError: An error from an invalid HTTP response. :return: A valid token. :rtype: string (t get_accesst auth_token(RRR((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyt get_tokenGscCs=|iptS|iptS|ii|iƒotStS(sÕReturn if the existing token needs to be re-authenticated. The token should be refreshed if it is about to expire. :returns: True if the plugin should fetch a new token. False otherwise. (R tTrueR tFalsetwill_expire_soontMIN_TOKEN_LIFE_SECONDS(R((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyt_needs_reauthenticateWs  cKsE|iiiƒz'|iƒo|i|ƒ|_nWdQX|iS(sFetch or return a current AccessInfo object. If a valid AccessInfo is present then it is returned otherwise a new one will be fetched. :param session: A session object that can be used for communication. :type session: keystonauth.session.Session :raises keystonauth.exceptions.HttpError: An error from an invalid HTTP response. :returns: Valid AccessInfo :rtype: :py:class:`keystonauth.access.AccessInfo` N(Rt__exit__t __enter__RRR (RRR((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyRms cCs|iod|_tStS(sInvalidate the current authentication data. This should result in fetching a new token on next call. A plugin may be invalidated if an Unauthorized HTTP response is returned to indicate that the token may have been revoked or is otherwise now invalid. :returns: True if there was something that the plugin did to invalidate. This means that it makes sense to try again. If nothing happens returns False to indicate give up. :rtype: bool N(R RRR(R((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyt invalidate‡s  c Ks|tijo|i}|pd}na|ptidƒd S|p d}n|i|ƒi} | id|d|d|d|ƒ}|p|St i ||ƒ} y|i || dt ƒ} Wn5t it it ifj otid |ƒnX| i|ƒ}|S( sÔReturn a valid endpoint for a service. If a valid token is not present then a new one will be fetched using the session and kwargs. :param session: A session object that can be used for communication. :type session: keystonauth.session.Session :param string service_type: The type of service to lookup the endpoint for. This plugin will return None (failure) if service_type is not provided. :param string interface: The exposure of the endpoint. Should be `public`, `internal`, `admin`, or `auth`. `auth` is special here to use the `auth_url` rather than a URL extracted from the service catalog. Defaults to `public`. :param string region_name: The region the endpoint should exist in. (optional) :param string service_name: The name of the service in the catalog. (optional) :param tuple version: The minimum version number required for this endpoint. (optional) :raises keystonauth.exceptions.HttpError: An error from an invalid HTTP response. :return: A valid endpoint URL or None if not available. :rtype: string or None tidentitys€Plugin cannot return an endpoint without knowing the service type that is required. Add service_type to endpoint filtering data.tpublict service_typet interfacet region_namet service_namet authenticatedsdFailed to contact the endpoint at %s for discovery. Fallback to using that endpoint as the base url.N(RtAUTH_INTERFACERtLOGtwarnRRtservice_catalogturl_forRt_get_catalog_discover_hackt get_discoveryRRtDiscoveryFailuret HttpErrortConnectionErrortwarning( RRR R!R"R#tversionRturlR(t hacked_urltdisc((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyt get_endpoint›s2$      cKs|i|ƒiS(N(Rtuser_id(RRR((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyt get_user_idðscKs|i|ƒiS(N(Rt project_id(RRR((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pytget_project_idóscKs;y|i|ƒii|ƒSWntij odSXdS(N(Rtservice_providerst get_auth_urlRtServiceProviderNotFoundR(RRtsp_idR((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pytget_sp_auth_urlös cKs;y|i|ƒii|ƒSWntij odSXdS(N(RR9t get_sp_urlRR;R(RRR<R((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyR>ýs c Cs˜y |i}Wn tj oh}|_nXxa|i|fD]!}|i|ƒ}|oPq@q@Wti||d|ƒ}||i|<|||<|S(sLReturn the discovery object for a URL. Check the session and the plugin cache to see if we have already performed discovery on the URL and if so return it, otherwise create a new discovery object, cache it and return it. This function is expected to be used by subclasses and should not be needed by users. :param session: A session object to discover with. :type session: keystonauth.session.Session :param str url: The url to lookup. :param bool authenticated: Include a token in the discovery call. (optional) Defaults to None (use a token if a plugin is installed). :raises keystonauth.exceptions.DiscoveryFailure: if for some reason the lookup fails. :raises keystonauth.exceptions.HttpError: An error from an invalid HTTP response. :returns: A discovery object with the results of looking up that URL. R$(t_identity_endpoint_cachetAttributeErrorR tgetRtDiscover(RRR1R$tsession_endpoint_cachetcacheR3((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyR+s     N(t__name__t __module__RRRRtabctabstractmethodRRRRRR4R6R8R=R>tutilst positionalR+(((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyRs     T     (RGR tsixt keystoneauth1RRIRRRt get_loggerRER&t add_metaclasstABCMetatBaseAuthPluginR(((sB/tmp/pip-build-lt8jXN/keystoneauth1/keystoneauth1/identity/base.pyt s