/usr/lib/python2.6/site-packages/glanceclient/openstack/common/apiclient
NameSizeModeActions
auth.py74710644editdlrm
auth.pyc87230644editdlrm
base.py174500644editdlrm
base.pyc211630644editdlrm
client.py138890644editdlrm
client.pyc139090644editdlrm
exceptions.py129930644editdlrm
exceptions.pyc207640644editdlrm
fake_client.py64540644editdlrm
fake_client.pyc62710644editdlrm
utils.py34180644editdlrm
utils.pyc21550644editdlrm
__init__.py00644editdlrm
__init__.pyc1800644editdlrm
Edit: /usr/lib/python2.6/site-packages/glanceclient/openstack/common/apiclient/base.pyc (21163B)
Ñò s (titemsR?tallR R(RRtfoundtsearches((RsY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyRAþs   (RRRtabctabstractmethodR?RHRA(((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyR>ãs t CrudManagercBs€eZdZd Zd Zd d„Zd„Zd„Zd„Z d„Z d d„Z d d„Z d„Z d „Zd d „ZRS( sBase manager class for manipulating entities. Children of this class are expected to define a `collection_key` and `key`. - `collection_key`: Usually a plural noun by convention (e.g. `entities`); used to refer collections in both URL's (e.g. `/v3/entities`) and JSON objects containing a list of member resources (e.g. `{'entities': [{}, {}, {}]}`). - `key`: Usually a singular noun by convention (e.g. `entity`); used to refer to an individual member of the collection. cKsd|dj o|nd}|d|i7}|id|iƒ}|dj o|d|7}n|S(sBuilds a resource URL for the given kwargs. Given an example collection where `collection_key = 'entities'` and `key = 'entity'`, the following URL's could be generated. By default, the URL will represent a collection of entities, e.g.:: /entities If kwargs contains an `entity_id`, then the URL will represent a specific member, e.g.:: /entities/{entity_id} :param base_url: if provided, the generated URL will be appended to it ts/%ss%s_idN(R"tcollection_keyRtkey(Rtbase_urlRR't entity_id((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyt build_url"s  cCs}xvti|iƒƒD]_\}}|djo|i|ƒqt|tƒo%|i|ƒt|ƒ|d|s   cKs8|i|ƒ}|i|i|h||i6|iƒS(N(RaR5RYRV(RR((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pytcreateIs   cKs+|i|ƒ}|i|i||iƒS(N(RaR/RYRV(RR((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyRPs cKs%|i|ƒ}|i|i|ƒS(N(RaR3RY(RR((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyR0VscKs^|i|ƒ}|idh|id||d6|odti|ƒndd6|iƒS(smList the collection. :param base_url: if provided, the generated URL will be appended to it s%(base_url)s%(query)sRWs?%sRTtquery(RaR.RYRt urlencodeRU(RRWR((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyR?Zs #cKs+|i|ƒ}|i|id||ƒS(skUpdate an element. :param base_url: if provided, the generated URL will be appended to it RW(RaR8RY(RRWR((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyR6hscKsX|i|ƒ}|iƒ}|id|iƒ|i|i|h||i6|iƒS(Ns%s_id(RaR\R]RVR:RY(RRtparams((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pytupdateqs   cKs%|i|ƒ}|i|i|ƒS(N(RaR<RY(RR((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyR;{scKsÖ|i|ƒ}|idh|id||d6|odti|ƒndd6|iƒ}t|ƒ}|djo7tdƒh|ii d6|d 6}t i |ƒ‚n#|d jo t i ‚n |dSd S( s’Find a single item with attributes matching ``**kwargs``. :param base_url: if provided, the generated URL will be appended to it s%(base_url)s%(query)sRWs?%sRTRcisNo %(name)s matching %(args)s.R@RiN( RaR.RYRRdRURBRR#RRRCRD(RRWRtrltnumRG((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyRHs#        N(RRRR"RURVRYRaRbRR0R?R6RfR;RH(((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyRSs       t ExtensioncBs5eZdZdZdZd„Zd„Zd„ZRS(sExtension descriptor.t__pre_parse_args__t__post_parse_args__cCs3tt|ƒiƒ||_||_|iƒdS(N(RRiRR@tmodulet_parse_extension_module(RR@Rl((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyR¢s  cCs‹d|_x{|iiiƒD]g\}}||ijo|i||ƒqy!t|tƒo ||_nWqt j oqXqWdS(N( R"t manager_classRlt__dict__RMtSUPPORTED_HOOKSRt issubclassRR%(Rt attr_namet attr_value((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyRm¨s  cCs d|iS(Ns(R@(R((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyt__repr__´s(RjRkN( RRRRpR"RnRRmRt(((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyRiœs   R_cBs}eZdZeZdZed„Zd„Zed„ƒZ d„Z d„Z d„Z d„Z d „Zd „Zd „ZRS( sqBase class for OpenStack resources (tenant, user, etc.). This is pretty much just a bag for attributes. R@cCs,||_||_|i|ƒ||_dS(sÐPopulate and bind to a manager. :param manager: BaseManager object :param info: dictionary representing resource attributes :param loaded: prevent lazy-loading if set to True N(tmanagert_infot _add_detailst_loaded(RRutinfoR ((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyRÁs   csRtd„ˆiiƒDƒƒ}di‡fd†|Dƒƒ}dˆii|fS(Ncss;x4|]-}|ddjo|djo |VqqWdS(iRRuN((RJtk((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pys Îs s, c3s,x%|]}d|tˆ|ƒfVqWdS(s%s=%sN(RI(RJRz(R(sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pys Ñs s<%s %s>(tsortedRotkeystjoint __class__R(RtreprkeysRy((RsY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyRtÍs cCsB|io4t||idƒ}|dj oti|ƒSndS(s8Human-readable ID which can be used for bash completion.N(tHUMAN_IDRIt NAME_ATTRR"Rtto_slug(RR@((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pythuman_idÔs   cCs[xTti|ƒD]C\}}y!t|||ƒ||i|RSRiR_(((sY/tmp/pip-build-cD3xZi/python-glanceclient/glanceclient/openstack/common/apiclient/base.pyts    .Š