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õddlZddlZddlmZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	lmZej
eƒZd
ZdZdZd
ejfd„ƒYZdefd„ƒYZd„ZdS(iÿÿÿÿN(tadapter(tsession(tacls(tcas(t
containers(t
exceptions(torders(tsecretsskey-managertpublictv1t_HTTPClientcBsSeZdd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
RS(	cKs«|jdtƒ|jdtƒ|jdtƒ|jddƒ}tt|ƒj|||r|dj	||j
ƒ|_n|dkr—tƒ|_
ni|d6|_
dS(Nt	interfacetservice_typetversiontendpoints{0}/{1}sX-Project-Id(t
setdefaultt_DEFAULT_SERVICE_INTERFACEt_DEFAULT_SERVICE_TYPEt_DEFAULT_API_VERSIONtpoptNonetsuperR
t__init__tformatR
tendpoint_overridetdictt_default_headers(tselfRt
project_idtkwargsR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR&scOs^|jdiƒ}|j|jƒ|jdtƒtt|ƒj||Ž}|j|ƒ|S(Ntheaderst	raise_exc(RtupdateRtFalseRR
trequestt_check_status_code(RtargsRRtresp((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR"7s
cOsA|jdiƒ}|jddƒtt|ƒj||ŽjƒS(NRtAcceptsapplication/json(RRR
tgettjson(RR$RR((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR'BscOs1|j|ƒ}tt|ƒj|||ŽjƒS(N(t	_fix_pathRR
tpostR((RtpathR$R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR*HscCs!|ddks|d7}n|S(Niÿÿÿÿt/((RR+((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR)Ms
cOs|j|d||ŽjS(NtGET(R"tcontent(RR+R$R((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyt_get_rawRscCs|j}tjdj|ƒƒ|dkrntjdj|j|ƒƒƒtjdj|j|ƒƒƒ‚n|s|dkrÇtjdj|j|ƒƒƒtjdj|j|ƒƒ|ƒ‚n|dkrtjdj|j|ƒƒƒtj	dj|j|ƒƒ|ƒ‚ndS(	NsResponse status {0}i‘sAuth error: {0}s{0}iôs5xx Server error: {0}is4xx Client error: {0}(
tstatus_codetLOGtdebugRterrort_get_error_messageRt
HTTPAuthErrortHTTPServerErrortHTTPClientError(RR%tstatus((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR#Us$	cCseyD|jƒ}|d}|jdƒ}|rCdj||ƒ}nWntk
r`|j}nX|S(Nttitletdescriptions{0}: {1}(R(R'Rt
ValueErrorR.(RR%t
response_datatmessageR:((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR4ns


N(t__name__t
__module__RRR"R'R*R)R/R#R4(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR
$s						tClientcBseZdd„ZRS(cOstjdƒ|s4tjd|jdtƒƒ}n|jd	kr|jdƒd	kr|jdƒsvt	dƒ‚n|jdƒd	krt	dƒ‚qnt
d|||Ž}tj|ƒ|_t
j|ƒ|_
tj|ƒ|_tj|ƒ|_tj|ƒ|_d	S(
sBarbican client object used to interact with barbican service.

        :param session: An instance of keystoneclient.session.Session that
            can be either authenticated, or not authenticated.  When using
            a non-authenticated Session, you must provide some additional
            parameters.  When no session is provided it will default to a
            non-authenticated Session.
        :param endpoint: Barbican endpoint url. Required when a session is not
            given, or when using a non-authenticated session.
            When using an authenticated session, the client will attempt
            to get an endpoint from the session.
        :param project_id: The project ID used for context in Barbican.
            Required when a session is not given, or when using a
            non-authenticated session.
            When using an authenticated session, the project ID will be
            provided by the authentication mechanism.
        :param verify: When a session is not given, the client will create
            a non-authenticated session.  This parameter is passed to the
            session that is created.  If set to False, it allows
            barbicanclient to perform "insecure" TLS (https) requests.
            The server's certificate will not be verified against any
            certificate authorities.
            WARNING: This option should be used with caution.
        :param service_type: Used as an endpoint filter when using an
            authenticated keystone session. Defaults to 'key-management'.
        :param service_name: Used as an endpoint filter when using an
            authenticated keystone session.
        :param interface: Used as an endpoint filter when using an
            authenticated keystone session. Defaults to 'public'.
        :param region_name: Used as an endpoint filter when using an
            authenticated keystone session.
        sCreating Client objecttverifytauthRsSBarbican endpoint url must be provided when not using auth in the Keystone Session.RsGProject ID must be provided when not using auth in the Keystone SessionRN(R1R2t
ks_sessiontSessionRtTrueRBRR'R;R
Rt
SecretManagerRtOrderManagerRtContainerManagerRt	CAManagerRt
ACLManager(RRR$Rt
httpclient((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR|s!
!$N(R>R?RR(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyR@zscOs@x-|D]%}tjj|dƒ}|r|SqW|jddƒS(sÇSearch for the first defined of possibly many env vars

    Returns the first environment variable defined in vars, or
    returns the default defined in kwargs.

    Source: Keystone's shell.py
    tdefaulttN(tostenvironR'R(tvarsRtvtvalue((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pytenv´s

(tloggingRNt
keystoneauth1RRRCtbarbicanclientRRRRRRt	getLoggerR>R1RRRtAdapterR
tobjectR@RS(((sJ/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/client.pyt<module>s V: