/usr/lib/python2.6/site-packages/novaclient
NameSizeModeActions
openstack/-0755rm
tests/-0755rm
v1_1/-0755rm
v2/-0755rm
api_versions.py135520644editdlrm
api_versions.pyc137060644editdlrm
auth_plugin.py49460644editdlrm
auth_plugin.pyc57840644editdlrm
base.py108690644editdlrm
base.pyc99830644editdlrm
client.py315860644editdlrm
client.pyc259010644editdlrm
crypto.py12930644editdlrm
crypto.pyc11230644editdlrm
exceptions.py72270644editdlrm
exceptions.pyc118160644editdlrm
extension.py14710644editdlrm
extension.pyc15690644editdlrm
i18n.py11440644editdlrm
i18n.pyc5610644editdlrm
service_catalog.py35210644editdlrm
service_catalog.pyc26970644editdlrm
shell.py360070644editdlrm
shell.pyc259140644editdlrm
utils.py122050644editdlrm
utils.pyc125050644editdlrm
__init__.py8390644editdlrm
__init__.pyc4670644editdlrm
Edit: /usr/lib/python2.6/site-packages/novaclient/base.pyc (9983B)
Ñò =vVc@s÷dZddkZddkZddkZddkZddkZddkZddkZddkl Z ddk l Z ddk l Z e iZd„Zde ifd„ƒYZeieiƒd efd „ƒYƒZd efd „ƒYZdS( sG Base utilities to build API operation managers and objects on top of. iÿÿÿÿN(t exceptions(tbase(tcliutilscCs&y |iSWntj o|SXdS(s‡ Abstracts the common pattern of allowing both an object or an object's ID as a parameter when dealing with relationships. N(tidtAttributeError(tobj((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pytgetid&s tManagercBs°eZdZd ZeiƒZd„Ze d„ƒZ e d„ƒZ d d d„Z e id d„ƒZe id„ƒZd„Zd„Zed „Zd „Zd d „ZRS(s„ Managers interact with a particular type of API (servers, flavors, images, etc.) and provide CRUD operations for them. cCs ||_dS(N(tapi(tselfR((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyt__init__9scCs |iiS(N(Rtclient(R ((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyR <scCs |iiS(N(Rt api_version(R ((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyR @sc Cs4|o%|iii|d|ƒ\}}n|iii|ƒ\}}|djo |i}n||}t|tƒo(y|d}Wq£tj oq£Xn|i d|ddƒi i ƒzg|i d|ddƒi i ƒz=g}|D]'}|o||||dt ƒqöqö~SWdQXWdQXdS(Ntbodytvaluesthuman_idtmodetwtuuidtloaded( RR tposttgettNonetresource_classt isinstancetdicttKeyErrortcompletion_cachet__exit__t __enter__tTrue( R turlt response_keyt obj_classR t_resptdatat_[1]tres((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyt_listDs%    $$ccsT|iii}||jo dVn,||ii_z dVWd||ii_XdS(N(RR t service_type(R tdefaultt allowed_typestoriginal_service_type((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pytalternate_service_type[s   ccsŒ|iiiƒzqtidddƒ}tiddƒ}tiddƒ}ti|idƒ|idƒƒiƒ}t i i t i i ||ƒƒ}yt i |d ƒWntj onX|iiƒ} d | |id d ƒf} t i i || ƒ} d |} yt|| t| |ƒƒWntj onXz dVWdt|| dƒ} | o| iƒt|| ƒnXWdQXdS(s† The completion cache store items that can be used for bash autocompletion, like UUIDs or human-friendly IDs. A resource listing will clear and repopulate the cache. A resource create will append to the cache. Delete is not handled because listings are assumed to be performed often enough to keep the cache reasonably up-to-date. tNOVACLIENT_UUID_CACHE_DIRR(s ~/.novaclientt OS_USERNAMEt NOVA_USERNAMEtOS_URLtNOVA_URLsutf-8iís %s-%s-cachet_t-s _%s_cacheN(t cache_lockRRRtenvthashlibtmd5tencodet hexdigesttostpatht expandusertjointmakedirstOSErrort__name__tlowertreplacetsetattrtopentIOErrortgetattrRtclosetdelattr(R t cache_typeR!Rtbase_dirtusernameRt uniqifiert cache_dirtresourcetfilenameR:t cache_attrtcache((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyRgs4  !   cCs6t|d|dƒ}|o|id|ƒndS(Ns _%s_caches%s (RERtwrite(R RHtvalRP((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pytwrite_to_completion_cache¡scCs5|iii|ƒ\}}|i|||dtƒS(NR(RR RRR(R RR R"R ((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyt_get¦sc Ks¶|id|||iii|d|ƒ\}}|o ||S|id|iddƒiiƒzE|id|iddƒiiƒz|i|||ƒSWdQXWdQXdS(Ntmodify_body_for_createR RRtaR(t run_hooksRR RRRRR(R RR R t return_rawtkwargsR"((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyt_createªs! ''cCs|iii|ƒ\}}dS(N(RR tdelete(R RR"t_body((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyt_delete´scKso|id|||iii|d|ƒ\}}|o0|o|i|||ƒS|i||ƒSndS(Ntmodify_body_for_updateR (RWRR tputR(R RR R RYR"((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyt_update·s !N((R?t __module__t__doc__RRt threadingtRLockR3R tpropertyR R R&t contextlibtcontextmanagerR+RRSRTtFalseRZR]R`(((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyR1s   :   tManagerWithFindcBs2eZdZeid„ƒZd„Zd„ZRS(sM Like a `Manager`, but with additional `find()`/`findall()` methods. cCsdS(N((R ((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pytlistÇscKsz|i|}t|ƒ}|djo,d|ii|f}tid|ƒ‚n#|djo ti‚n |dSdS(sK Find a single item with attributes matching ``**kwargs``. isNo %s matching %s.i”iN(tfindalltlenRR?RtNotFoundt NoUniqueMatch(R RYtmatchest num_matchestmsg((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pytfindËs    c sYg}|iƒ}t}h}ti|iƒ}d|ijo4d|jod|jo d|j}||ds N( titemsRtinspectt getargspecRjtargsRtcopytalltappendRRR(R RYtfoundtsearchesRst list_kwargst list_argspecRvt tmp_kwargsRxR$tktvtlisting((Rs:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyRkÙsP             F! (R?RaRbtabctabstractmethodRjRrRk(((s:/tmp/pip-build-cD3xZi/python-novaclient/novaclient/base.pyRiÁs tBootingManagerWithFindcBseZdZd„ZRS(s>Like a `ManagerWithFind`, but has the ability to boot servers.c Cs(g}xti|ƒD] \}}h|d6}|idƒ}|d}t|ƒdjo||ds          R