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ñddlZddlmZddlmZddlmZejeƒZdZ	ddddgZ
d	ejfd
„ƒYZdefd„ƒYZ
d
efd„ƒYZdefd„ƒYZdefd„ƒYZdejfd„ƒYZdS(iÿÿÿÿN(t
parse_isotime(tbase(t	formattertreadtwritetdeletetlisttACLFormattercBseZdZd„ZRS(sOperation TypesProject AccesstUserstCreatedtUpdatedcCsd|jr|jjƒnd}|jr6|jjƒnd}|j|j|j|||jf}|S(N(tcreatedt	isoformattNonetupdatedtoperation_typetproject_accesstuserstacl_ref(tselfRRtdata((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyt_get_formatted_data(s(sOperation TypesProject AccessRsCreatedR
(t__name__t
__module__tcolumnsR(((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRst_PerOperationACLcBsÔeZd
d
d
d
d
d
d„Zed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZ	ed„ƒZ
ed„ƒZe	jd„ƒZ	ejd	„ƒZejd
„ƒZd„Z
d„ZRS(cCsv||_||_|r|ntƒ|_||_||_|rNt|ƒnd|_|rit|ƒnd|_	dS(sáPer Operation ACL data instance for secret or container.

        This class not to be instantiated outside of this module.

        :param parent_acl: acl entity to this per operation data belongs to
        :param str entity_ref: Full HATEOAS reference to a secret or container
        :param users: List of Keystone userid(s) to be used for ACL.
        :type users: List or None
        :param bool project_access: Flag indicating project access behavior
        :param str operation_type: Type indicating which class of Barbican
            operations this ACL is defined for e.g. 'read' operations
        :param str created: Time string indicating ACL create timestamp. This
            is populated only when populating data from api response. Not
            needed in client input.
        :param str updated: Time string indicating ACL last update timestamp.
            This is populated only when populating data from api response. Not
            needed in client input.
        N(
t_parent_aclt_entity_refRt_userst_project_accesst_operation_typeRR
t_createdt_updated(Rt
parent_aclt
entity_refRRRRR((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyt__init__7s				cCstj|jƒS(N(tACLtget_acl_ref_from_entity_refR"(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRTscCs|jS(N(R(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR"XscCs|jS(s9Flag indicating project access behavior is enabled or not(R(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR\scCs|jS(s"List of users for this ACL setting(R(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRascCs|jS(s9Type indicating class of Barbican operations for this ACL(R(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRfscCs|jS(N(R(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRkscCs|jS(N(R (R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRoscCs
||_dS(N(R(Rtvalue((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRsscCs
||_dS(N(R(RR&((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRwscCs
||_dS(N(R(RR&((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR{scCs„tjdj|j|jƒƒ|jjƒ|j}|j|jƒ}|r€|jj	|ƒ|jrs|j
ƒq€|j	ƒndS(sÝRemove operation specific setting defined for a secret or container

        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        s1Removing {0} operation specific ACL for href: {1}N(tLOGtdebugtformatRRRtload_acls_datatgettoperation_aclstremovetsubmit(Rt
acl_entityt
per_op_acl((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR-s
		
cCsG|jrCt|jƒtkp0t|jƒtkrCtdƒ‚ndS(Ns3Users value is expected to be provided as list/set.(RttypeRtsett
ValueError(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyt_validate_users_type˜sN(RRR
R#tpropertyRR"RRRRRtsetterR-R4(((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR5s	R$cBsÈeZdZddeddd„Zed„ƒZed„ƒZed„ƒZ	dddddd„Z
d„Zd„Zd„Z
d	„Zd
„Zd„Zd„Zed
„ƒZed„ƒZRS(taclc	Cs}||_||_g|_|dk	s3|dk	rytd|d|d|d|d|d|d|ƒ}|jj|ƒndS(	s-Base ACL entity instance for secret or container.

        Provide ACL data arguments to set ACL setting for given operation_type.

        To add ACL setting for other operation types, use `add_operation_acl`
        method.

        :param api: client instance reference
        :param str entity_ref: Full HATEOAS reference to a secret or container
        :param users: List of Keystone userid(s) to be used for ACL.
        :type users: str List or None
        :param bool project_access: Flag indicating project access behavior
        :param str operation_type: Type indicating which class of Barbican
            operations this ACL is defined for e.g. 'read' operations
        :param str created: Time string indicating ACL create timestamp. This
            is populated only when populating data from api response. Not
            needed in client input.
        :param str updated: Time string indicating ACL last update timestamp.
            This is populated only when populating data from api response. Not
            needed in client input.
        R!R"RRRRRN(t_apiRt_operation_aclsR
Rtappend(	RtapiR"RRRRRR7((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR#£s			cCs|jS(sEntity URI reference.(R(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR"ÉscCs|jS(s(List of operation specific ACL settings.(R9(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR,ÎscCstj|jƒS(N(R$R%R"(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRÓsc	CsŠtd|d|jd|d|d|d|d|ƒ}xMt|jƒD],\}}|j|krF||j|<PqFqFW|jj|ƒdS(	sJAdd ACL settings to entity for specific operation type.

        If matching operation_type ACL already exists, then it replaces it with
        new PerOperationACL object using provided inputs. Otherwise it appends
        new PerOperationACL object to existing per operation ACL list.

        This just adds to local entity and have not yet applied these changes
        to server.

        :param users: List of Keystone userid(s) to be used in ACL.
        :type users: List or None
        :param bool project_access: Flag indicating project access behavior
        :param str operation_type: Type indicating which class of Barbican
            operations this ACL is defined for e.g. 'read' operations
        :param str created: Time string indicating ACL create timestamp. This
            is populated only when populating data from api response. Not
            needed in client input.
        :param str updated: Time string indicating ACL last update timestamp.
            This is populated only when populating data from api response. Not
            needed in client input.
        R!R"RRRRRN(RR"t	enumerateR9RR:(	RRRRRRtnew_acltiR7((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pytadd_operation_acl×s
cs t‡fd†|jDƒdƒS(Nc3s$|]}|jˆkr|VqdS(N(R(t.0R7(R(sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pys	<genexpr>ýs(tnextR9R
(RR((RsH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyt_get_operation_aclüscCs
|j|ƒS(s’Get operation specific ACL instance.

        :param str operation_type: Type indicating which operation's ACL
        setting is needed.
        (RB(RR((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR+scCs)|tkr|j|ƒSt|ƒ‚dS(N(tVALID_ACL_OPERATIONSRBtAttributeError(Rtname((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyt__getattr__s
cCsötjdj|j|jƒƒ|jsCtdj|jƒƒ‚n|jƒi}xr|jD]g}|j	ƒ|j
}i}|jdk	r›|j|d<n|j
dk	rº|j
|d<n|||<q]W|jj|jd|ƒ}|jƒjdƒS(sŸSubmits ACLs for a secret or a container defined in server

        In existing ACL case, this overwrites the existing ACL setting with
        provided inputs. If input users are None or empty list, this will
        remove existing ACL users if there. If input project_access flag is
        None, then default project access behavior is enabled.

        :returns: str acl_ref: Full HATEOAS reference to a secret or container
            ACL.
        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses
        s)Submitting complete {0} ACL for href: {1}s!ACL data for {0} is not provided.sproject-accessRtjsonRN(R'R(R)tacl_typeR"R,R3t	_acl_typetvalidate_input_refR4RRR
RR8tputRRGR+(Rtacl_dictR0top_typetacl_datatresponse((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR.s$		

	cCs@|jƒtjdj|j|jƒƒ|jj|jƒdS(sØRemove Barbican ACLs setting defined for a secret or container

        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        s"Removing ACL for {0} for href: {1}N(	RJR'R(R)RHR"R8RR(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR-4s
cCs¤|jj|jƒ}|j2x|D]y}|j|ƒ}|jdƒ}|jdƒ}|jdƒ}|jdƒ}|jd|d|d|d|d|ƒq#WdS(sÂLoads ACL entity from Barbican server using its acl_ref

        Clears the existing list of per operation ACL settings if there.
        Populates current ACL entity with ACL settings received from Barbican
        server.

        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        :raises barbicanclient.exceptions.HTTPServerError: 5xx Responses
        sproject-accessRRRRRN(R8R+RR,R?(RRORMRLtproj_accessRRR((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR*?s
cCs¡|jjƒ}|js0tdj|ƒƒ‚n|j|jkrud|jkritdj|ƒƒ‚n|j}ntdj|ƒƒ‚tj|j|ƒ|S(Ns{0} href is required.s/acls({0} ACL URI provided. Expecting {0} URI.s{0} URI is not specified.(RIttitleR"R3R)t_parent_entity_pathRtvalidate_ref(Rt	res_titletref_type((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRJYs		cCs,|r(|jdƒ}dj|tjƒSdS(Nt/s{0}/{1}(trstripR)R$t_resource_name(R"((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR%hscCsO|stdƒ‚nd|kr*d}n!d|kr?d}ntdƒ‚|S(Ns%Secret or container href is required.s/secretstsecrets/containerst	containers)Secret or container URI is not specified.(R3(R"RU((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pytidentify_ref_typeos		N(RRRXR
tDEFAULT_OPERATION_TYPER#R5R"R,RR?RBR+RFR.R-R*RJtstaticmethodR%R[(((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR$Ÿs&$#				&			t	SecretACLcBs6eZdZejdZdZdZed„ƒZRS(sACL entity for a secretsSecret ACL RefRYs/secretscCs|jS(N(RI(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRH…s(sSecret ACL Ref(	RRt__doc__RRRIRRR5RH(((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR^~s

tContainerACLcBs6eZdZejdZdZdZed„ƒZRS(sACL entity for a containersContainer ACL RefRZs/containerscCs|jS(N(RI(R((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRH‘s(sContainer ACL Ref(	RRR_RRRIRRR5RH(((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR`Šs

t
ACLManagercBsReZdZied6ed6Zd„Zddded„Z	d„Z
d„ZRS(s3Entity Manager for Secret or Container ACL entitiesRYRZcCs tt|ƒj|tjƒdS(N(tsuperRaR#R$RX(RR;((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR#žscCsItj|ƒ}tjj|ƒ}|d|jd|d|d|d|ƒS(spFactory method for creating `ACL` entity.

        `ACL` object returned by this method have not yet been
        stored in Barbican.

        Input entity_ref is used to determine whether
        ACL object type needs to be :class:`barbicanclient.acls.SecretACL`
        or  :class:`barbicanclient.acls.ContainerACL`.

        :param str entity_ref: Full HATEOAS reference to a secret or container
        :param users: List of Keystone userid(s) to be used in ACL.
        :type users: List or None
        :param bool project_access: Flag indicating project access behavior
        :param str operation_type: Type indicating which class of Barbican
            operations this ACL is defined for e.g. 'read' operations
        :returns: ACL object instance
        :rtype: :class:`barbicanclient.acls.SecretACL` or
            :class:`barbicanclient.acls.ContainerACL`
        R;R"RRR(R$R[Rat
acl_class_mapR+R8(RR"RRRtentity_typetentity_class((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pytcreate¡s
cCs<|j|ƒ}tjdj|j|jƒƒ|jƒ|S(sÉRetrieve existing ACLs for a secret or container found in Barbican

        :param str entity_ref: Full HATEOAS reference to a secret or container.
        :returns: ACL entity object instance
        :rtype: :class:`barbicanclient.acls.SecretACL` or
            :class:`barbicanclient.acls.ContainerACL`
        :raises barbicanclient.exceptions.HTTPAuthError: 401 Responses
        :raises barbicanclient.exceptions.HTTPClientError: 4xx Responses
        sGetting ACL for {0} href: {1}(t_validate_acl_refR'R(R)RHRR*(RR"tentity((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyR+¾s


cCsq|dkrtdƒ‚n|jdƒ}tj|ƒ}tjj|ƒ}|d|jd|ƒ}|j	ƒ|S(Ns2Expected secret or container URI is not specified.RVR;R"(
R
R3RWR$R[RaRcR+R8RJ(RR"RdReR/((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRgÎs
N(RRR_R^R`RcR#R
R\RfR+Rg(((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyRa–s
			(tloggingtoslo_utils.timeutilsRtbarbicanclientRRt	getLoggerRR'R\RCtEntityFormatterRRtobjectR$R^R`tBaseEntityManagerRa(((sH/home/tvault/.virtenv/lib/python2.7/site-packages/barbicanclient/acls.pyt<module>sjß