/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/utils.pyc (12505B)
Ñò =vVc@s¤ddkZddkZddkZddkZddkZddkZddklZddkl Z ddk Z ddk Z ddk Z ddk lZddklZddklZeideiƒZd„Zed „Zd „Zhdd „Zdd „Zd „Zdddd„Zd„Zd„Z d„Z!d„Z"dd„Z#d„Z$d„Z%dd„Z&d„Z'd„Z(ei)d„ƒZ*d„Z+dS(iÿÿÿÿN(t jsonutils(t encodeutils(t exceptions(t_(tcliutilss [\w\.\- :]+$cCslt|dƒp g|_ng}|iD]}||iq+~}|i|jo|ii|ƒndS(s{Add hook to bind CLI arguments to ResourceManager calls. The `do_foo` calls in shell.py will receive CLI args and then in turn pass them through to the ResourceManager. Before passing through the args, the hooks registered here will be called, giving us a chance to add extra kwargs (taken from the command-line) to what's passed to the ResourceManager. tresource_manager_kwargs_hooksN(thasattrRt__name__tappend(tfthookt_[1]thtnames((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyt&add_resource_manager_extra_kwargs_hook#s  'c Cs±t|dgƒ}h}x’|D]Š}||ƒ}|i}t|iƒƒt|iƒƒ@}|o9| o1tdƒh|d6|d6} ti| ƒ‚n|i|ƒqW|S(s=Return extra_kwargs by calling resource manager kwargs hooks.RsPHook '%(hook_name)s' is attempting to redefine attributes '%(conflicting_keys)s't hook_nametconflicting_keys(tgetattrRtsettkeysRRt NoUniqueMatchtupdate( R targstallow_conflictsthookst extra_kwargsR t hook_kwargsRRtmsg((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyt!get_resource_manager_extra_kwargs4s  "   cCsBtig}t|iƒƒD]}|d|||fq~ƒS(s(Returns a formatted dict as 'key=value'.s%s=%s(Rtpretty_choice_listtsortedR(tdR tk((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pytpretty_choice_dictHscCs­|djo d}n ||}dg}tig}|D] }||q;~dtƒ}d|_xã|D]Û} g} x¿|D]·} | |jo| i|| | ƒƒq}| |jo| iddƒ} n| iƒiddƒ} t| | dƒ} | djo d} nt | ƒiddƒ} | i| ƒq}W|i | ƒqjW|dj ot i |i d |ƒƒ}nt i |i ƒƒ}tio|iƒ}n|GHdS( NtserverIdtcachingtlt Rtt-s tsortby(tNonet prettytablet PrettyTabletFalsetalignRtreplacetlowerRtstrtadd_rowRt safe_encodet get_stringtsixtPY3tdecode(tobjstfieldst formatterst sortby_indexR(tmixed_case_fieldsR R tpttotrowtfieldt field_nametdatatresult((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyt print_listNs8    0       ccs¥t|tƒo†xŽti|ƒD]n\}}|od||fn|}t|ttfƒo#x+t||ƒD] }|VqpWq ||fVq Wn ||fVdS(s•Flatten a dict, using name as a prefix for the keys of dict. >>> _flatten('cpu_info', {'arch':'x86_64'}) [('cpu_info_arch': 'x86_64')] s%s_%sN(t isinstancetdictR4t iteritemstlistt_flatten(RAtprefixtkeytvaluetnew_keytitem((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyRHts  cCs€|iƒ}xati|ƒD]P\}}t|tiƒo1yti|ƒ||>> flatten_dict({'service': {'host':'cloud9@compute-068', 'id': 143}}) {'service_host': colud9@compute-068', 'service_id': 143} ( tcopyR4RFRDt string_typestjsontloadst ValueErrorRERH(RARJRK((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyt flatten_dict‡s   tPropertytValueic Cs›ti||gdtƒ}d|_x<t|iƒƒD](\}}t|ttfƒot i |ƒ}n|djot i t |ƒ|ƒ}n|o™t|tiƒo†d|jp d|jold|jo|iddƒ}n|iƒidƒ}|}xU|D]} |i|| gƒd}qWq7|djo d}n|i||gƒq7Wti|iƒƒ} tio| iƒ} n| GHdS(NR#R$is\ns R&R'(R*R+R,R-RtitemsRDRERGRtdumpsttextwraptfillR0R4ROR.tstriptsplitR1R)RR2R3R5R6( Rt dict_propertyt dict_valuetwrapR<R tvtlinestcol1tlineRB((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyt print_dicts0   4    cKst|dtƒo.y|i|ƒSWqAtij oqAXny|it|ƒƒSWntttifj onXyGti |ƒ}t i o|i ƒ}nt i|ƒ|i|ƒSWntttifj onXyÚyTt|ddƒ}|o |ind}h||6}|i|ƒ|i|SWntij onXy|id||SWnOtij o@tdƒh|iiiƒd6|d6}ti|ƒ‚nXWnOtij o@tdƒh|iiiƒd6|d6}ti|ƒ‚nXdS( sHelper for the _find_* methods.tis_alphanum_id_allowedtresource_classtnamethuman_ids4No %(class)s with a name or ID of '%(name)s' exists.tclasssOMultiple %(class)s matches found for '%(name)s', use an ID to be more specific.N(RR,tgetRtNotFoundtintt TypeErrorRRRR2R4R5R6tuuidtUUIDR)t NAME_ATTRRtfindRReRR/t CommandErrorR(tmanagert name_or_idt find_argsttmp_idtresourcet name_attrtkwargsR((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyt find_resource¾sL         cCsyg}xc|iiƒD]R\}}t|ƒdjoqndi|ƒ}d||f}|i|ƒqWdi|ƒS(Nis, s%s=%ss; (tnetworksRVtlentjoinR(tservertoutputtnetworkt addressest addresses_csvtgroup((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyt_format_servers_list_networksôs cCsdid„|DƒƒS(Ns, cssx|]}|dVqWdS(RfN((t.0R‚((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pys s (R|(tgroups((s;/tmp/pip-build-cD3xZi/python-novaclient/novaclient/utils.pyt_format_security_groupsscCsi|iddƒ}|diddƒ}|iƒp |iƒo|iƒ}n||dsB            &  ! 6