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ŸddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZddlmZddlZddlZdd	lmZdd
lmZddlmZejdƒZd
ZedgƒZej e!ƒZ"d„Z#dd„Z$d„Z%de&fd„ƒYZ'dej(j)fd„ƒYZ*dS(iÿÿÿÿN(tremovals(tcfg(t	jsonutils(tencodeutils(timportutils(tstrutils(t
positional(turllib(t
exceptions(t_sosprofiler.webspython-keystoneclientsapplication/jsoncCs…|dkrdSyt|ƒ}Wn0tk
rRtdƒ|}tj|ƒ‚nX|dkrtdƒ|}tj|ƒ‚n|S(Ns%s must be a floatis%s must be greater than 0(tNonetfloatt
ValueErrorR	targparsetArgumentTypeError(targument_valuetvaluetmsg((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt_positive_non_zero_float0s
tGETcKstƒj|d||S(Ntmethod(tSessiontrequest(turlRtkwargs((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyR>scCsyutj|ƒ}d|krId|dkrId|dd<tj|ƒSd|dkrtd|dd<tj|ƒSWntk
rˆnX|S(Nttokentcatalogs	<removed>tserviceCatalogtaccess(Rtloadstdumpst	Exception(tbodytdata((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt_remove_service_catalogBs

RcBs3eZdZd-Zd.ZeZdZeZe	dde	j
ƒd-d-d-ed-d-d-ed	„ƒZe
d
„ƒZe	ƒd-d-d-ed„ƒZd„Ze	de	j
ƒd-d-d-d-d-d-d-d-eeed-d
ed„ƒZdd„Zd„Zd„Zd„Zd„Zd„Zd„Zed„ƒZed„ƒZeed-d-d-d-d„ƒZd„Zd-d„Z e!j"ddddd d!ƒd-d"„ƒZ#d-d#„Z$d-d$„Z%d-d%„Z&d-d&„Z'd-d'„Z(e	jƒd-d(„ƒZ)e	jƒd-d)„ƒZ*ed*„ƒZ+e
d+„ƒZ,ed,„ƒZ-RS(/sÀMaintains client communication state and common functionality.

    As much as possible the parameters to this class reflect and are passed
    directly to the requests library.

    :param auth: An authentication plugin to authenticate the session with.
                 (optional, defaults to None)
    :type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`
    :param requests.Session session: A requests session object that can be used
                                     for issuing requests. (optional)
    :param string original_ip: The original IP of the requesting user which
                               will be sent to identity service in a
                               'Forwarded' header. (optional)
    :param verify: The verification arguments to pass to requests. These are of
                   the same form as requests expects, so True or False to
                   verify (or not) against system certificates or a path to a
                   bundle or CA certs to check against or None for requests to
                   attempt to locate and use certificates. (optional, defaults
                   to True)
    :param cert: A client certificate to pass to requests. These are of the
                 same form as requests expects. Either a single filename
                 containing both the certificate and key or a tuple containing
                 the path to the certificate then a path to the key. (optional)
    :param float timeout: A timeout to pass to requests. This should be a
                          numerical value indicating some amount (or fraction)
                          of seconds or 0 for no timeout. (optional, defaults
                          to 0)
    :param string user_agent: A User-Agent header string to use for the
                              request. If not provided a default is used.
                              (optional, defaults to 'python-keystoneclient')
    :param int/bool redirect: Controls the maximum number of redirections that
                              can be followed by a request. Either an integer
                              for a specific count or True/False for
                              forever/never. (optional, default to 30)
    i-i.i/i1i3iitenforcementc	
CsËtjdtƒ|sRtjƒ}x-t|jƒD]}	|j|	tƒƒq2Wn||_	||_
||_||_||_
d|_||_|dk	r¯t|ƒ|_n|dk	rÇ||_ndS(Ns–keystoneclient.session.Session is deprecated as of the 2.1.0 release in favor of keystoneauth1.session.Session. It will be removed in future releases.(twarningstwarntDeprecationWarningtrequestsRtlisttadapterstmounttTCPKeepAliveAdaptertauthtsessiontoriginal_iptverifytcertR
ttimeouttredirectRt
user_agent(
tselfR,R-R.R/R0R1R3R2tscheme((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt__init__‰s$							cCsdd	}|djƒ|kr`tjƒ}|j|djdƒƒ|jƒ}|dd|fS|S(
s'Redact the secure headers to be logged.t
authorizationsx-auth-tokensx-subject-tokensx-service-tokeniisutf-8s{SHA1}%s(s
authorizationsx-auth-tokensx-subject-tokensx-service-token(tlowerthashlibtsha1tupdatetencodet	hexdigest(theadertsecure_headersttoken_hashert
token_hash((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt_process_header¨sc	Cs©|jtjƒsdSdg}|jtkr>|jdƒn,t|jtjƒrj|jd|jƒn|r†|j	d|gƒn|j|ƒ|rÐx4tj
|ƒD] }|jd|j|ƒƒq©Wn|r,t|tjƒry|j
dƒ}Wqtk
rd}qXn|jd|ƒny|jd	j|ƒƒWn\tk
r¤|jd
ƒg|D]}tj|ddƒ^qj}|jd	j|ƒƒnXdS(
NsREQ: curl -g -is
--insecures
--cacert "%s"s-Xs-H "%s: %s"tasciis
<binary_data>s-d '%s't s_Replaced characters that could not be decoded in log output, original caused UnicodeDecodeErrorterrorstreplace(tisEnabledFortloggingtDEBUGR/tFalsetappendt
isinstancetsixtstring_typestextendt	iteritemsRBtbinary_typetdecodetUnicodeDecodeErrortdebugtjoinRtsafe_decode(	R4RRR!theaderstloggertstring_partsR>tpart((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt_http_log_request´s8	
	



%cCs|jtjƒsdS|jjddƒ}x[tD]4}|dk	r2|j|ƒr2t|j	ƒ}Pq2q2Wd}||dj
tƒf}dd|jg}x4tj
|jƒD] }|jd|j|ƒƒq¯W|jdtj|ƒƒ|jdj
|ƒƒdS(	Nscontent-typesOOmitted, Content-Type is set to %s. Only %s responses have their bodies logged.s, sRESP:s[%s]s%s: %ss
RESP BODY: %s
RD(RGRHRIRWtgetR
t_LOG_CONTENT_TYPESt
startswithR"ttextRUtstatus_codeRMRPRKRBRt
mask_passwordRT(R4tresponseRXtcontent_typetlog_typeR_RYR>((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt_http_log_responseás
icKsÊ|jdtƒƒ}|dkr9t|	p0|jƒ}n|rˆ|j|	ƒ}|dkrxtdƒ}tj|ƒ‚n|j	|ƒnt
r¤|j	t
jƒƒntj
j|ƒjsNd}|rÎ|}n|ré|j|	|}n|s)|pøijddƒ}tdƒ|}tj|ƒ‚nd|jdƒ|jdƒf}n|jrm|jd|jƒn|jdk	r’|jd	|jƒn|r¥||d
<n3|jrÆ|jd
|jƒ}n|jd
tƒ}|jr|jdd|j|fƒn|dk	r-d
|d<tj|ƒ|d<n|jd|jƒ|
rS|
|d<n|
rŠ|j|d|d|jdƒd|d|ƒnt|d<|dkr¬|j}nt j!|j"||||
||ƒ}y|j#d|	ƒ}Wntj$k
rünX|r|j	|ƒn||}|j%dkr†|r†|r†|j&|	ƒr†|j|	ƒ}|dk	rƒ|j	|ƒ||}qƒq†n|rÆ|j%dkrÆ|j'd|j%ƒtj(|||ƒ‚n|S(sCSend an HTTP request with the specified characteristics.

        Wrapper around `requests.Session.request` to handle tasks such as
        setting headers, JSON encoding/decoding, and error handling.

        Arguments that are not handled are passed through to the requests
        library.

        :param string url: Path or fully qualified URL of HTTP request. If only
                           a path is provided then endpoint_filter must also be
                           provided such that the base URL can be determined.
                           If a fully qualified URL is provided then
                           endpoint_filter will be ignored.
        :param string method: The http method to use. (e.g. 'GET', 'POST')
        :param string original_ip: Mark this request as forwarded for this ip.
                                   (optional)
        :param dict headers: Headers to be included in the request. (optional)
        :param json: Some data to be represented as JSON. (optional)
        :param string user_agent: A user_agent to use for the request. If
                                  present will override one present in headers.
                                  (optional)
        :param int/bool redirect: the maximum number of redirections that
                                  can be followed by a request. Either an
                                  integer for a specific count or True/False
                                  for forever/never. (optional)
        :param int connect_retries: the maximum number of retries that should
                                    be attempted for connection errors.
                                    (optional, defaults to 0 - never retry).
        :param bool authenticated: True if a token should be attached to this
                                   request, False if not or None for attach if
                                   an auth_plugin is available.
                                   (optional, defaults to None)
        :param dict endpoint_filter: Data to be provided to an auth plugin with
                                     which it should be able to determine an
                                     endpoint to use for this request. If not
                                     provided then URL is expected to be a
                                     fully qualified URL. (optional)
        :param str endpoint_override: The URL to use instead of looking up the
                                      endpoint in the auth plugin. This will be
                                      ignored if a fully qualified URL is
                                      provided but take priority over an
                                      endpoint_filter. (optional)
        :param auth: The auth plugin to use when authenticating this request.
                     This will override the plugin that is attached to the
                     session (if any). (optional)
        :type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`
        :param requests_auth: A requests library auth plugin that cannot be
                              passed via kwarg because the `auth` kwarg
                              collides with our own auth plugins. (optional)
        :type requests_auth: :py:class:`requests.auth.AuthBase`
        :param bool raise_exc: If True then raise an appropriate exception for
                               failed HTTP requests. If False then return the
                               request object. (optional, default True)
        :param bool allow_reauth: Allow fetching a new token and retrying the
                                  request on receiving a 401 Unauthorized
                                  response. (optional, default True)
        :param bool log: If True then log the request and response data to the
                         debug log. (optional, default True)
        :param logger: The logger object to use to log request and responses.
                       If not provided the keystoneclient.session default
                       logger will be used.
        :type logger: logging.Logger
        :param kwargs: any other parameter that can be passed to
                       requests.Session.request (such as `headers`). Except:
                       'data' will be overwritten by the data in 'json' param.
                       'allow_redirects' is ignored as redirects are handled
                       by the session.

        :raises keystoneclient.exceptions.ClientException: For connection
            failure, or to indicate an error response code.

        :returns: The response to the request.
        RWs$No valid authentication is availabletservice_typetunknownsEndpoint for %s services%s/%st/R0R1s
User-Agentt	Forwardedsfor=%s;by=%ssapplication/jsonsContent-TypeR!R/R,RRXtallow_redirectsi‘is#Request returned failure status: %sN()t
setdefaulttdictR
tboolR,tget_auth_headersR	RtAuthorizationFailureR;tosprofiler_webtget_trace_id_headersRtparseturlparsetnetloctget_endpointR\tEndpointNotFoundtrstriptlstripR0R1R3t
USER_AGENTR.RRR/R[RJR2t	functoolstpartialt
_send_requesttget_auth_connection_paramstMissingAuthPluginR`t
invalidateRTt
from_response(R4RRtjsonR.R3R2t
authenticatedtendpoint_filterR,t
requests_autht	raise_exctallow_reauthtlogtendpoint_overridetconnect_retriesRXRRWtauth_headersRtbase_urlRftsendtconnection_paramstresp((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyRsŒP		%	
			



	
	
gà?cKseyÓy|jj|||}	Wn°tjjk
rg}
tdƒi|d6|
d6}tj|ƒ‚nktjjk
rœtdƒ|}tj|ƒ‚n6tjjk
rÑtdƒ|}tj	|ƒ‚nXWn‰tjtj	fk
r^}
|dkr‚n|j
di|
d6|d	6ƒtj|ƒ|j
|||||d
|dd|d
|SX|rx|j|	|ƒn|	j|jkrat|tƒr¢|}n|d8}|dk}|sÂ|	Sy|	jd}
Wn$tk
rù|jd|	jƒqaX|j
|
||||d
||}t|jtƒsEt|jƒ|_n|jjd|	ƒ|}	n|	S(Ns.SSL exception connecting to %(url)s: %(error)sRterrorsRequest to %s timed outs$Unable to establish connection to %sis)Failure: %(e)s. Retrying in %(delay).1fs.tetdelayR‰itconnect_retry_delayitlocationsBFailed to redirect request to %s as new location was not provided.(R-RR'RtSSLErrorR	tTimeouttRequestTimeouttConnectionErrortConnectionRefusedtinfottimetsleepR|ReR`t_REDIRECT_STATUSESRLRmRWtKeyErrortwarningRthistoryR(tinsert(R4RRR2R‡RXR‰R’RRŽRRtredirect_allowedR“tnew_resp((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyR|Ás^
		

	

			cKs|j|d|S(slPerform a HEAD request.

        This calls :py:meth:`.request()` with ``method`` set to ``HEAD``.

        tHEAD(R(R4RR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytheadscKs|j|d|S(sjPerform a GET request.

        This calls :py:meth:`.request()` with ``method`` set to ``GET``.

        R(R(R4RR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyR\scKs|j|d|S(slPerform a POST request.

        This calls :py:meth:`.request()` with ``method`` set to ``POST``.

        tPOST(R(R4RR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytpostscKs|j|d|S(sjPerform a PUT request.

        This calls :py:meth:`.request()` with ``method`` set to ``PUT``.

        tPUT(R(R4RR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytput#scKs|j|d|S(spPerform a DELETE request.

        This calls :py:meth:`.request()` with ``method`` set to ``DELETE``.

        tDELETE(R(R4RR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytdelete+scKs|j|d|S(snPerform a PATCH request.

        This calls :py:meth:`.request()` with ``method`` set to ``PATCH``.

        tPATCH(R(R4RR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytpatch3scCstjdtƒ|j|ƒS(sHandle constructing a session from both old and new arguments.

        Support constructing a session from the old
        :py:class:`~keystoneclient.httpclient.HTTPClient` args as well as the
        new request-style arguments.

        .. warning::

            *DEPRECATED as of 1.7.0*: This function is purely for bridging the
            gap between older client arguments and the session arguments that
            they relate to. It is not intended to be used as a generic Session
            Factory. This function may be removed in the 2.0.0 release.

        This function purposefully modifies the input kwargs dictionary so that
        the remaining kwargs dict can be reused and passed on to other
        functions without session arguments.

        s‰Session.construct() is deprecated as of the 1.7.0 release  in favor of using session constructor and may be removed in the 2.0.0 release.(R$R%R&t
_construct(tclsR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt	construct;sc	CsOi}x9d
D]1}y|j|ƒ||<Wq
tk
r=q
Xq
W|j|S(NR/tcacertR0tkeytinsecureR1R-R.R3(	sverifyscacertscertskeysinsecurestimeoutssessionsoriginal_ips
user_agent(tpopRt_make(R®Rtparamstattr((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyR­Us

cKsk|dkr*|rt}q*|p$t}n|rU|rUtjdtƒ||f}n|d|d||S(s
Create a session with individual certificate parameters.

        Some parameters used to create a session don't lend themselves to be
        loaded from config/CLI etc. Create a session by converting those
        parameters into session __init__ parameters.
        s¸Passing cert and key together is deprecated as of the 1.7.0 release in favor of the requests library form of having the cert and key as a tuple and may be removed in the 2.0.0 release.R/R0N(R
RJtTrueR$R%R&(R®R²R/R°R0R±R((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyR´cs		cCs.|s|j}n|s*tj|ƒ‚n|S(N(R,RR~(R4R,R((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt_auth_required|s
cKs.tdƒ}|j||ƒ}|j||S(sŠReturn auth headers as provided by the auth plugin.

        :param auth: The auth plugin to use for token. Overrides the plugin
                     on the session. (optional)
        :type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`

        :raises keystoneclient.exceptions.AuthorizationFailure: if a new token
                                                                fetch fails.
        :raises keystoneclient.exceptions.MissingAuthPlugin: if a plugin is not
                                                             available.

        :returns: Authentication headers or None for failure.
        :rtype: dict
        s+An auth plugin is required to fetch a token(R	R¸tget_headers(R4R,RR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyRn…stmessagesUse get_auth_headers instead.tversions1.7.0tremoval_versions2.0.0cCs|j|ƒpijdƒS(s±Return a token as provided by the auth plugin.

        :param auth: The auth plugin to use for token. Overrides the plugin
                     on the session. (optional)
        :type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`

        :raises keystoneclient.exceptions.AuthorizationFailure: if a new token
                                                                fetch fails.
        :raises keystoneclient.exceptions.MissingAuthPlugin: if a plugin is not
                                                             available.

        .. warning::

             This method is deprecated as of the 1.7.0 release in favor of
             :meth:`get_auth_headers` and may be removed in the 2.0.0 release.
             This method assumes that the only header that is used to
             authenticate a message is 'X-Auth-Token' which may not be correct.

        :returns: A valid token.
        :rtype: string
        sX-Auth-Token(RnR\(R4R,((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt	get_token˜scKs.tdƒ}|j||ƒ}|j||S(sâGet an endpoint as provided by the auth plugin.

        :param auth: The auth plugin to use for token. Overrides the plugin on
                     the session. (optional)
        :type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`

        :raises keystoneclient.exceptions.MissingAuthPlugin: if a plugin is not
                                                             available.

        :returns: An endpoint if available or None.
        :rtype: string
        s4An auth plugin is required to determine endpoint URL(R	R¸Ru(R4R,RR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyRu²s
cKsštdƒ}|j||ƒ}|j||}|jƒ}x9dD]1}y|j|ƒ||<WqCtk
rsqCXqCW|r–tjt|ƒƒ‚n|S(sReturn auth connection params as provided by the auth plugin.

        An auth plugin may specify connection parameters to the request like
        providing a client certificate for communication.

        We restrict the values that may be returned from this function to
        prevent an auth plugin overriding values unrelated to connection
        parameters. The values that are currently accepted are:

        - `cert`: a path to a client certificate, or tuple of client
          certificate and key pair that are used with this request.
        - `verify`: a boolean value to indicate verifying SSL certificates
          against the system CAs or a path to a CA file to verify with.

        These values are passed to the requests library and further information
        on accepted values may be found there.

        :param auth: The auth plugin to use for tokens. Overrides the plugin
                     on the session. (optional)
        :type auth: keystoneclient.auth.base.BaseAuthPlugin

        :raises keystoneclient.exceptions.AuthorizationFailure: if a new token
                                                                fetch fails.
        :raises keystoneclient.exceptions.MissingAuthPlugin: if a plugin is not
                                                             available.
        :raises keystoneclient.exceptions.UnsupportedParameters: if the plugin
            returns a parameter that is not supported by this session.

        :returns: Authentication headers or None for failure.
        :rtype: dict
        s5An auth plugin is required to fetch connection paramsR0R/(scertsverify(	R	R¸tget_connection_paramstcopyR³RRtUnsupportedParametersR((R4R,RRRµtparams_copytarg((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyR}Ãs 

cCs(tdƒ}|j||ƒ}|jƒS(sðInvalidate an authentication plugin.

        :param auth: The auth plugin to invalidate. Overrides the plugin on the
                     session. (optional)
        :type auth: :py:class:`keystoneclient.auth.base.BaseAuthPlugin`

        s&An auth plugin is required to validate(R	R¸R(R4R,R((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyRùscCs+tdƒ}|j||ƒ}|j|ƒS(s Return the authenticated user_id as provided by the auth plugin.

        :param auth: The auth plugin to use for token. Overrides the plugin
                     on the session. (optional)
        :type auth: keystoneclient.auth.base.BaseAuthPlugin

        :raises keystoneclient.exceptions.AuthorizationFailure:
            if a new token fetch fails.
        :raises keystoneclient.exceptions.MissingAuthPlugin:
            if a plugin is not available.

        :returns string: Current user_id or None if not supported by plugin.
        s)An auth plugin is required to get user_id(R	R¸tget_user_id(R4R,R((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyRÃscCs+tdƒ}|j||ƒ}|j|ƒS(s&Return the authenticated project_id as provided by the auth plugin.

        :param auth: The auth plugin to use for token. Overrides the plugin
                     on the session. (optional)
        :type auth: keystoneclient.auth.base.BaseAuthPlugin

        :raises keystoneclient.exceptions.AuthorizationFailure:
            if a new token fetch fails.
        :raises keystoneclient.exceptions.MissingAuthPlugin:
            if a plugin is not available.

        :returns string: Current project_id or None if not supported by plugin.
        s,An auth plugin is required to get project_id(R	R¸tget_project_id(R4R,R((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyRÄscCsÄ|dkri}ntjdd|jdƒddƒtjdd|jdƒddƒtjdd|jdƒddƒtjd	d
td|jd	ƒddƒtjdd|jdƒdd
ƒgS(sƒGet oslo_config options that are needed for a :py:class:`.Session`.

        These may be useful without being registered for config file generation
        or to manipulate the options before registering them yourself.

        The options that are set are:
            :cafile: The certificate authority filename.
            :certfile: The client certificate file to present.
            :keyfile: The key for the client certificate.
            :insecure: Whether to ignore SSL verification.
            :timeout: The max time to wait for HTTP connections.

        :param dict deprecated_opts: Deprecated options that should be included
             in the definition of new options. This should be a dict from the
             name of the new option to a list of oslo.DeprecatedOpts that
             correspond to the new option. (optional)

             For example, to support the ``ca_file`` option pointing to the new
             ``cafile`` option name::

                 old_opt = oslo_cfg.DeprecatedOpt('ca_file', 'old_group')
                 deprecated_opts={'cafile': [old_opt]}

        :returns: A list of oslo_config options.
        tcafiletdeprecated_optsthelpsJPEM encoded Certificate Authority to use when verifying HTTPs connections.tcertfiles(PEM encoded client certificate cert filetkeyfiles'PEM encoded client certificate key fileR²tdefaultsVerify HTTPS connections.R1sTimeout value for http requestsN(R
RtStrOptR\tBoolOptRJtIntOpt(R®RÆ((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytget_conf_options)s$	cCs?|jd|ƒ}|jtj|ƒƒ|j|d|ƒ|S(syRegister the oslo_config options that are needed for a session.

        The options that are set are:
            :cafile: The certificate authority filename.
            :certfile: The client certificate file to present.
            :keyfile: The key for the client certificate.
            :insecure: Whether to ignore SSL verification.
            :timeout: The max time to wait for HTTP connections.

        :param oslo_config.Cfg conf: config object to register with.
        :param string group: The ini group to register options in.
        :param dict deprecated_opts: Deprecated options that should be included
             in the definition of new options. This should be a dict from the
             name of the new option to a list of oslo.DeprecatedOpts that
             correspond to the new option. (optional)

             For example, to support the ``ca_file`` option pointing to the new
             ``cafile`` option name::

                 old_opt = oslo_cfg.DeprecatedOpt('ca_file', 'old_group')
                 deprecated_opts={'cafile': [old_opt]}

        :returns: The list of options that was registered.
        RÆtgroup(RÎtregister_groupRtOptGroupt
register_opts(R®tconfRÏRÆtopts((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytregister_conf_optionsZscKsi||}|j|d<|j|d<|jrO|jrO|j|jf|d<n|j|d<|j|S(sßCreate a session object from an oslo_config object.

        The options must have been previously registered with
        register_conf_options.

        :param oslo_config.Cfg conf: config object to register with.
        :param string group: The ini group to register options in.
        :param dict kwargs: Additional parameters to pass to session
                            construction.
        :returns: A new session object.
        :rtype: :py:class:`.Session`
        R²R°R0R1(R²RÅRÈRÉR1R´(R®RÓRÏRtc((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytload_from_conf_optionsys



c
CsÉ|jddtddddƒ|jddd	dtjjd
ƒddƒ|jddd
dtjjdƒddƒ|jddddtjjdƒddƒ|jddddtddddƒdS(s‰Register the argparse arguments that are needed for a session.

        :param argparse.ArgumentParser parser: parser to add to.
        s
--insecureRÊtactiont
store_trueRÇs¿Explicitly allow client to perform "insecure" TLS (https) requests. The server's certificate will not be verified against any certificate authorities. This option should be used with caution.s--os-cacerttmetavars<ca-certificate>t	OS_CACERTsjSpecify a CA bundle file to use in verifying a TLS (https) server certificate. Defaults to env[OS_CACERT].s	--os-certs
<certificate>tOS_CERTsDefaults to env[OS_CERT].s--os-keys<key>tOS_KEYsDefaults to env[OS_KEY].s	--timeoutiXttypes	<seconds>s!Set request timeout (in seconds).N(tadd_argumentRJtostenvironR\R(tparser((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytregister_cli_options‘s*cKs_|j|d<|j|d<|jrE|jrE|j|jf|d<n|j|d<|j|S(s/Create a :py:class:`.Session` object from CLI arguments.

        The CLI arguments must have been registered with
        :py:meth:`.register_cli_options`.

        :param Namespace args: result of parsed arguments.

        :returns: A new session object.
        :rtype: :py:class:`.Session`
        R²R°R0R1(R²t	os_cacerttos_certtos_keyR1R´(R®targsR((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pytload_from_cli_options·s


N(i-i.i/i1i3(.t__name__t
__module__t__doc__R
R3RœtREDIRECT_STATUSESt_DEFAULT_REDIRECT_LIMITtDEFAULT_REDIRECT_LIMITRtWARNR·R6tstaticmethodRBt_loggerR[ReRR|R¤R\R¦R¨RªR¬tclassmethodR¯R­RJR´R¸RnRtremoveR½RuR}RRÃRÄRÎRÕR×RãRè(((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyRVsd#	+	"			ºI								6	0	&R+cBseZdZd„ZRS(s:The custom adapter used to set TCP Keep-Alive on all connections.

    This Adapter also preserves the default behaviour of Requests which
    disables Nagle's Algorithm. See also:
    http://blogs.msdn.com/b/windowsazurestorage/archive/2010/06/25/nagle-s-algorithm-is-not-friendly-towards-small-requests.aspx
    cOsêd|krÍtjtjdftjtjdfg}ttdƒrd|tjtjdfg7}nttdƒr’|tjtjdfg7}nttdƒrÀ|tjtjdfg7}n||d<nt	t
|ƒj||ŽdS(	Ntsocket_optionsitTCP_KEEPIDLEi<tTCP_KEEPCNTit
TCP_KEEPINTVLi(tsockettIPPROTO_TCPtTCP_NODELAYt
SOL_SOCKETtSO_KEEPALIVEthasattrRõRöR÷tsuperR+tinit_poolmanager(R4RçRRô((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyRÿÔs
(RéRêRëRÿ(((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyR+Ìs(+R
RzR9RHRàRøRšR$t
debtcollectorRtoslo_configRtoslo_serializationRt
oslo_utilsRRRRR'RMt	six.movesRtkeystoneclientRtkeystoneclient.i18nR	t
try_importRpRytsetR]t	getLoggerRéRñRRR"tobjectRR)tHTTPAdapterR+(((sK/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/session.pyt<module>
s>		ÿÿÿy