Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
ӍEYc@sÓddlZddlZddlZddlZddlmZddlmZddlZddlm	Z	ddl
mZddlmZej
eƒZd„Zejejƒdejfd	„ƒYƒZdS(
iÿÿÿÿN(tcfg(t
positional(t	_discover(tbase(t
exceptionscCstjdddƒgS(Nsauth-urlthelpsAuthentication URL(RtStrOpt(((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pytget_optionsstBaseIdentityPlugincBs1eZdZddddded„Zed„ƒZejd„ƒZed„ƒZ	e	jd„ƒZ	ed„ƒZ
e
jd„ƒZ
ed„ƒZejd	„ƒZej
d
„ƒZd„Zd„Zd
„Zd„Zdddddd„Zd„Zd„Zeƒdd„ƒZed„ƒZRS(ixcCs~tt|ƒjƒtjdtƒ||_d|_||_	i|_
tjƒ|_
||_||_||_||_dS(NsŽkeystoneclient auth plugins are deprecated as of the 2.1.0 release in favor of keystoneauth1 plugins. They will be removed in future releases.(tsuperRt__init__twarningstwarntDeprecationWarningtauth_urltNonetauth_reftreauthenticatet_endpoint_cachet	threadingtLockt_lockt	_usernamet	_passwordt_tokent	_trust_id(tselfRtusernametpasswordttokenttrust_idR((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyR
*s							cCstjdtƒ|jS(s]Deprecated as of the 1.7.0 release.

        It may be removed in the 2.0.0 release.
        sWusername is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.(RRR
R(R((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyREscCstjdtƒ||_dS(s]Deprecated as of the 1.7.0 release.

        It may be removed in the 2.0.0 release.
        sWusername is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.N(RRR
R(Rtvalue((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyRQscCstjdtƒ|jS(s]Deprecated as of the 1.7.0 release.

        It may be removed in the 2.0.0 release.
        sWpassword is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.(RRR
R(R((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyR]scCstjdtƒ||_dS(s]Deprecated as of the 1.7.0 release.

        It may be removed in the 2.0.0 release.
        sWpassword is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.N(RRR
R(RR((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyRiscCstjdtƒ|jS(s]Deprecated as of the 1.7.0 release.

        It may be removed in the 2.0.0 release.
        sTtoken is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.(RRR
R(R((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyRuscCstjdtƒ||_dS(s]Deprecated as of the 1.7.0 release.

        It may be removed in the 2.0.0 release.
        sTtoken is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.N(RRR
R(RR((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyRscCstjdtƒ|jS(s]Deprecated as of the 1.7.0 release.

        It may be removed in the 2.0.0 release.
        sWtrust_id is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.(RRR
R(R((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyRscCstjdtƒ||_dS(s]Deprecated as of the 1.7.0 release.

        It may be removed in the 2.0.0 release.
        sWtrust_id is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.N(RRR
R(RR((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyR™scKsdS(suObtain a token from an OpenStack Identity Service.

        This method is overridden by the various token version plugins.

        This method should not be called independently and is expected to be
        invoked via the do_authenticate() method.

        This method will be invoked if the AccessInfo 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: keystoneclient.session.Session

        :raises keystoneclient.exceptions.InvalidResponse: The response
                                                           returned wasn't
                                                           appropriate.
        :raises keystoneclient.exceptions.HttpError: An error from an invalid
                                                     HTTP response.

        :returns: Token access information.
        :rtype: :py:class:`keystoneclient.access.AccessInfo`
        N((Rtsessiontkwargs((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pytget_auth_ref¥scKs|j|ƒjS(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: keystoneclient.session.Session

        :raises keystoneclient.exceptions.HttpError: An error from an invalid
                                                     HTTP response.

        :return: A valid token.
        :rtype: string
        (t
get_accesst
auth_token(RR R!((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyt	get_tokenÁscCs7|js
tS|jstS|jj|jƒr3tStS(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.
        (RtTrueRtFalsetwill_expire_soontMIN_TOKEN_LIFE_SECONDS(R((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyt_needs_reauthenticateÑs		cKs8|j&|jƒr+|j|ƒ|_nWdQX|jS(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: keystoneclient.session.Session

        :raises keystoneclient.exceptions.HttpError: An error from an invalid
                                                     HTTP response.

        :returns: Valid AccessInfo
        :rtype: :py:class:`keystoneclient.access.AccessInfo`
        N(RR*R"R(RR R!((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyR#çs
cCs|jrd|_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(RRR&R'(R((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyt
invalidates		c	Ks|tjkr'|j}|p!d}n\|s>tjdƒd
S|sMd}n|j|ƒj}	|	jd|d|d|d|ƒ}|s|St	j
||ƒ}
y|j||
dtƒ}Wn3t
jt
jt
jfk
rðtjd	|ƒnX|j|ƒ}|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: keystoneclient.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 keystoneclient.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
endpoint_typetregion_nametservice_namet
authenticatedsdFailed to contact the endpoint at %s for discovery. Fallback to using that endpoint as the base url.N(RtAUTH_INTERFACERtLOGtwarningRR#tservice_catalogturl_forRtget_catalog_discover_hackt
get_discoveryR'RtDiscoveryFailuret	HTTPErrortConnectionError(RR R.t	interfaceR0R1tversionR!turlR6t
hacked_urltdisc((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pytget_endpoints6$			cKs|j|ƒjS(N(R#tuser_id(RR R!((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pytget_user_idkscKs|j|ƒjS(N(R#t
project_id(RR R!((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pytget_project_idnscCs”y
|j}Wntk
r-i}|_nXx_|j|fD]}|j|ƒ}|r>Pq>q>Wtj||d|ƒ}||j|<|||<|S(sUReturn 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: keystoneclient.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 keystoneclient.exceptions.DiscoveryFailure: if for some reason
                                                            the lookup fails.
        :raises keystoneclient.exceptions.HttpError: An error from an invalid
                                                     HTTP response.

        :returns: A discovery object with the results of looking up that URL.
        R2(t_identity_endpoint_cachetAttributeErrorRtgetRtDiscover(RR R?R2tsession_endpoint_cachetcacheRA((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyR9qs

	

cCs)tt|ƒjƒ}|jtƒƒ|S(N(R	RRtextend(tclstoptions((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyR¢sN(t__name__t
__module__R)RR&R
tpropertyRtsetterRRRtabctabstractmethodR"R%R*R#R+RBRDRFRR9tclassmethodR(((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyR#s6				U		0(RTtloggingRRtoslo_configRRtsixtkeystoneclientRtkeystoneclient.authRRt	getLoggerRPR4Rt
add_metaclasstABCMetatBaseAuthPluginR(((sV/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/base.pyt<module>
s