/usr/lib/python2.6/site-packages/glanceclient/v2
NameSizeModeActions
client.py25250644editdlrm
client.pyc20220644editdlrm
images.py145030644editdlrm
images.pyc130050644editdlrm
image_members.py20060644editdlrm
image_members.pyc25590644editdlrm
image_schema.py71970644editdlrm
image_schema.pyc36430644editdlrm
image_tags.py17060644editdlrm
image_tags.pyc19890644editdlrm
metadefs.py179570644editdlrm
metadefs.pyc197790644editdlrm
schemas.py42390644editdlrm
schemas.pyc55140644editdlrm
shell.py388400644editdlrm
shell.pyc393420644editdlrm
tasks.py41900644editdlrm
tasks.pyc39060644editdlrm
versions.py9450644editdlrm
versions.pyc9030644editdlrm
__init__.py6330644editdlrm
__init__.pyc2250644editdlrm
Edit: /usr/lib/python2.6/site-packages/glanceclient/v2/metadefs.pyc (19779B)
Ñò msc3s¨ˆii|ƒ\}}x<|dD]0}|iddƒˆi|Vˆˆi_q#Wˆˆi_y|d}Wntj odSXxˆ|ƒD] }|Vq•WdS(Nt namespacesR tnext(R R RRRtvalidatetKeyError(RRR Rtnext_url(tpaginatetori_validate_funt empty_funR (sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR7os   tfilterst page_sizetlimittmarkertsort_keys*sort_key must be one of the following: %s.s, tsort_dirs*sort_dir must be one of the following: %s.t,s/v2/metadefs/namespaces?%sN(RR4R RtDEFAULT_PAGE_SIZEtSORT_KEY_VALUESRtjointSORT_DIR_VALUESR#R$t isinstancetlistRt safe_encodet string_typesRR.( R RR:R>R?tparamR*RR((R7R8R R9sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRF[s@          cCs#di|ƒ}|ii|ƒdS(sDelete a namespace.s/v2/metadefs/namespaces/{0}N(R&R tdelete(R RR((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRJ®s( t__name__t __module__R Rtmemoized_propertyRR!R-R RFRJ(((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRs    StResourceTypeControllercBsGeZd„Zeid„ƒZd„Zd„Zd„Zd„Z RS(cCs||_||_dS(N(R R (R R R ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR µs cCs+|iidƒ}ti|iƒtiƒS(Nsmetadefs/resource_type(R R RRRRR(R R((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR¹scKs–y|i|ƒ}Wn3titfj o}tti|ƒƒ‚nXdi||ƒ}|ii |d|ƒ\}}|i ddƒ|i|S(s+Associate a resource type with a namespace.s*/v2/metadefs/namespaces/{0}/resource_typesRR N( RRRRRRRR&R RRR(R RRtres_typeRRRR ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyt associate¾s  cCs&di||ƒ}|ii|ƒdS(s,Deasociate a resource type with a namespace.s./v2/metadefs/namespaces/{0}/resource_types/{1}N(R&R RJ(R RtresourceR((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyt deassociateËs ccsEd}|ii|ƒ\}}x |dD]}|i|Vq)WdS(spRetrieve a listing of available resource types. :returns generator over list of resource_types s/v2/metadefs/resource_typestresource_typesN(R R R(R RRR t resource_type((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRFÑs  ccs^di|ƒ}|ii|ƒ\}}|iddƒx |dD]}|i|VqBWdS(Ns*/v2/metadefs/namespaces/{0}/resource_typesR tresource_type_associations(R&R R RRR(R RRRR RT((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR Üs  ( RKRLR RRMRRPRRRFR (((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRN´s    tPropertyControllercBsYeZd„Zeid„ƒZd„Zd„Zd„Zd„Z d„Z d„Z RS(cCs||_||_dS(N(R R (R R R ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR ås cCs+|iidƒ}ti|iƒtiƒS(Nsmetadefs/property(R R RRRRR(R R((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRéscKs“y|i|ƒ}Wn3titfj o}tti|ƒƒ‚nXdi|ƒ}|ii |d|ƒ\}}|i ddƒ|i|S(s•Create a property. :param namespace: Name of a namespace the property will belong. :param kwargs: Unpacked property object. s&/v2/metadefs/namespaces/{0}/propertiesRR N( RRRRRRRR&R RRR(R RRtpropRRRR ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR!îsc Ks®|i||ƒ}x^|iƒD]P\}}yt|||ƒWqtij o}tti|ƒƒ‚qXqWdi||ƒ}|i i |d|ƒ|i||i ƒS(sÉUpdate a property. :param namespace: Name of a namespace the property belongs. :param prop_name: Name of a property (old one). :param kwargs: Unpacked property object. s*/v2/metadefs/namespaces/{0}/properties/{1}R( R titemsR%RRRRRR&R R'tname( R Rt prop_nameRRWR)R*RR((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR-ÿs   cCsQdi||ƒ}|ii|ƒ\}}|iddƒ||d<|i|S(Ns*/v2/metadefs/namespaces/{0}/properties/{1}R RY(R&R R RRR(R RRZRRR ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR s    cksddi|ƒ}|ii|ƒ\}}x6|diƒD]$\}}||d<|i|ƒVq8WdS(sdRetrieve a listing of metadata properties. :returns generator over list of objects s&/v2/metadefs/namespaces/{0}/propertiest propertiesRYN(R&R R RXR(R RRRRR R)R*((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRFs   cCs&di||ƒ}|ii|ƒdS(sDelete a property.s*/v2/metadefs/namespaces/{0}/properties/{1}N(R&R RJ(R RRZR((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRJ(s  cCs#di|ƒ}|ii|ƒdS(s%Delete all properties in a namespace.s&/v2/metadefs/namespaces/{0}/propertiesN(R&R RJ(R RR((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyt delete_all.s( RKRLR RRMRR!R-R RFRJR\(((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRVäs     tObjectControllercBsYeZd„Zeid„ƒZd„Zd„Zd„Zd„Z d„Z d„Z RS(cCs||_||_dS(N(R R (R R R ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR 5s cCs+|iidƒ}ti|iƒtiƒS(Nsmetadefs/object(R R RRRRR(R R((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR9scKs“y|i|ƒ}Wn3titfj o}tti|ƒƒ‚nXdi|ƒ}|ii |d|ƒ\}}|i ddƒ|i|S(s…Create an object. :param namespace: Name of a namespace the object belongs. :param kwargs: Unpacked object. s#/v2/metadefs/namespaces/{0}/objectsRR N( RRRRRRRR&R RRR(R RRtobjRRRR ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR!>sc Ksæ|i||ƒ}x^|iƒD]P\}}yt|||ƒWqtij o}tti|ƒƒ‚qXqWdddg}x&|D]} | |jo || =q‰q‰Wdi||ƒ} |i i | d|ƒ|i||i ƒS(s¼Update an object. :param namespace: Name of a namespace the object belongs. :param prop_name: Name of an object (old one). :param kwargs: Unpacked object. RR"Rs'/v2/metadefs/namespaces/{0}/objects/{1}R( R RXR%RRRRRR&R R'RY( R Rt object_nameRR^R)R*RR+R,R((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR-Os     cCsGdi||ƒ}|ii|ƒ\}}|iddƒ|i|S(Ns'/v2/metadefs/namespaces/{0}/objects/{1}R (R&R R RRR(R RR_RRR ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR is   cksNdi|ƒ}|ii|ƒ\}}x |dD]}|i|ƒVq2WdS(saRetrieve a listing of metadata objects. :returns generator over list of objects s#/v2/metadefs/namespaces/{0}/objectstobjectsN(R&R R R(R RRRRR R^((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRFps  cCs&di||ƒ}|ii|ƒdS(sDelete an object.s'/v2/metadefs/namespaces/{0}/objects/{1}N(R&R RJ(R RR_R((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRJ{s  cCs#di|ƒ}|ii|ƒdS(s"Delete all objects in a namespace.s#/v2/metadefs/namespaces/{0}/objectsN(R&R RJ(R RR((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR\s( RKRLR RRMRR!R-R RFRJR\(((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR]4s     t TagControllercBsbeZd„Zeid„ƒZd„Zd„Zd„Zd„Z d„Z d„Z d„Z RS( cCs||_||_dS(N(R R (R R R ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR ˆs cCs+|iidƒ}ti|iƒtiƒS(Ns metadefs/tag(R R RRRRR(R R((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRŒscCsGdi||ƒ}|ii|ƒ\}}|iddƒ|i|S(s’Create a tag. :param namespace: Name of a namespace the Tag belongs. :param tag_name: The name of the new tag to create. s$/v2/metadefs/namespaces/{0}/tags/{1}R N(R&R RRRR(R Rttag_nameRRR ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR!‘s   c ksç|idgƒ}g}x[|D]S}y|i|id|ƒƒWqtij o}tti|ƒƒ‚qXqWh|d6}di|ƒ}|i i |d|ƒ\} } | iddƒx | dD]} |i| ƒVqËWdS(sCreate the list of tags. :param namespace: Name of a namespace to which the Tags belong. :param kwargs: list of tags. ttagsRYs /v2/metadefs/namespaces/{0}/tagsRR N( RtappendRRRRRRR&R RR( R RRt tag_namest md_tag_listRbRRcRRR ttag((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pytcreate_multipleŸs  c Ksã|i||ƒ}x^|iƒD]P\}}yt|||ƒWqtij o}tti|ƒƒ‚qXqWddg}x&|D]} | |jo || =q†q†Wdi||ƒ} |i i | d|ƒ|i||i ƒS(s°Update a tag. :param namespace: Name of a namespace the Tag belongs. :param prop_name: Name of the Tag (old one). :param kwargs: Unpacked tag. R"Rs$/v2/metadefs/namespaces/{0}/tags/{1}R( R RXR%RRRRRR&R R'RY( R RRbRRgR)R*RR+R,R((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR-·s      cCsGdi||ƒ}|ii|ƒ\}}|iddƒ|i|S(Ns$/v2/metadefs/namespaces/{0}/tags/{1}R (R&R R RRR(R RRbRRR ((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR Ñs   cksNdi|ƒ}|ii|ƒ\}}x |dD]}|i|ƒVq2WdS(s\Retrieve a listing of metadata tags. :returns generator over list of tags. s /v2/metadefs/namespaces/{0}/tagsRcN(R&R R R(R RRRRR Rg((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRFØs  cCs&di||ƒ}|ii|ƒdS(s Delete a tag.s$/v2/metadefs/namespaces/{0}/tags/{1}N(R&R RJ(R RRbR((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRJãs  cCs#di|ƒ}|ii|ƒdS(sDelete all tags in a namespace.s /v2/metadefs/namespaces/{0}/tagsN(R&R RJ(R RR((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyR\és( RKRLR RRMRR!RhR-R RFRJR\(((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyRa‡s      (Rsdesc(s created_ats namespace(t oslo_utilsRR#tsix.moves.urllibRRtglanceclient.commonRtglanceclient.v2RRARDRBtobjectRRNRVR]Ra(((sE/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/v2/metadefs.pyts  —0PS