/usr/lib/python2.6/site-packages/cinderclient
NameSizeModeActions
openstack/-0755rm
tests/-0755rm
v1/-0755rm
v2/-0755rm
auth_plugin.py45680644editdlrm
auth_plugin.pyc57410644editdlrm
base.py91040644editdlrm
base.pyc81320644editdlrm
client.py207000644editdlrm
client.pyc173680644editdlrm
exceptions.py50490644editdlrm
exceptions.pyc76630644editdlrm
extension.py14090644editdlrm
extension.pyc15300644editdlrm
service_catalog.py35020644editdlrm
service_catalog.pyc25820644editdlrm
shell.py373030644editdlrm
shell.pyc261080644editdlrm
utils.py82250644editdlrm
utils.pyc95060644editdlrm
version.py7260644editdlrm
version.pyc3310644editdlrm
__init__.py9360644editdlrm
__init__.pyc4260644editdlrm
Edit: /usr/lib/python2.6/site-packages/cinderclient/utils.pyc (9506B)
Ñò =vVc @s(ddklZddkZddkZddkZddkZddkZddkZddkl Z ddk l Z d„Z d„Z d„Zd„Zd „Zd „Zd „Zd „Zedd d„Zdd„Zd„Zd„Zd„Zdefd„ƒYZd„Zdd„ZdS(iÿÿÿÿ(tprint_functionN(t exceptions(tstrutilscs‡‡fd†}|S(sDecorator for CLI args.cst|ˆˆŽ|S(N(tadd_arg(tfunc(tkwargstargs(s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pyt _decorator s((RRR((RRs?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pytargscOsBx/|D]'}tii|dƒ}|o|SqW|iddƒS(su returns the first environment variable set if none are non-empty, defaults to '' or keyword arg default tdefaulttN(tostenvirontgettNone(tvarsRtvtvalue((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pytenv&s  cOsTt|dƒp g|_n||f|ijo|iid||fƒndS(s3Bind CLI arguments to a shell.py `do_foo` function.t argumentsiN(thasattrRtinsert(tfRR((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pyR2s cCs t|_|S(sŽ Adds 'unauthenticated' attribute to decorated function. Usage: @unauthenticated def mymethod(f): ... (tTruetunauthenticated(R((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pyR@s cCst|dtƒS(s¹ Checks to see if the function is marked as not requiring authentication with the @unauthenticated decorator. Returns True if decorator is set to True, False otherwise. R(tgetattrtFalse(R((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pytisunauthenticatedLscs‡fd†}|S(s’ Adds 'service_type' attribute to decorated function. Usage: @service_type('volume') def mymethod(f): ... cs ˆ|_|S(N(t service_type(R(tstype(s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pytinner]s ((RR((Rs?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pyRUscCst|ddƒS(s. Retrieves service type from function RN(RR(R((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pytget_service_typecscCsMtidjot|id|ƒƒn tti|id|ƒƒƒdS(Niitsortby(ii(tsyst version_infotprintt get_stringRt safe_encode(tpttorder((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pyt_printjsic CsE|ph}dg}g}g}xo|D]g}g} xK|D]C} | |joq<n| |jo| i|| |ƒƒq<| |jo| iddƒ} n| iƒiddƒ} t|ƒtjo| |jo|| } n?t|| ƒ o|o|i| ƒq<nt|| dƒ} | d jo d} nt| t i ƒo#d| jo| iddƒ} n| i| ƒq<W|i| ƒq)Wx|D]} |i | ƒq›Wt i d„|Dƒdtƒ}g}|D] } |d qÜ~|_x|D]} |i| ƒqüW|d jo d }n ||}t||ƒd S( sÔPrints a list of objects. @param objs: Objects to print @param fields: Fields on each object to be printed @param exclude_unavailable: Boolean to decide if unavailable fields are removed @param formatters: Custom field formatters @param sortby_index: Results sorted against the key in the fields list at this index; if None then the object order is not altered tserverIdt t_R t-s cssx|] }|VqWdS(N((t.0R((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pys ¡s tcachingtlN(tappendtreplacetlowerttypetdictRRRt isinstancetsixt string_typestremovet prettytablet PrettyTableRtalignstadd_rowR((tobjstfieldstexclude_unavailablet formatterst sortby_indextmixed_case_fieldstremoved_fieldstrowstotrowtfieldt field_nametdataRR&t_[1]torder_by((s?/tmp/pip-build-cD3xZi/python-cinderclient/cinderclient/utils.pyt print_listqsP          $   tPropertycCs´ti|dgdtƒ}ddg|_xvti|ƒD]e}t|ƒ}t|dtiƒo/d|djo|di ddƒ|ds2            ; *