PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  #^c@sndZddlZddlmZmZddlmZddlmZddl m Z ej rje Z ndefdYZd efd YZd Zd efd YZdefdYZdefdYZeddedZede edfedZeddedddgZeefZeedefZeededeededeedfZeedeedefZeedeededddgfZ eedeed efZ!e!Z"eedeed ede ddgfZ#eedede ddgfZ$dS(!s& Simple description of return values. iN(tReadOnlytlock(tclient_has_capability(t_(tapireprtOutputcBsJeZdZdZdZdZgZddgdZdZ dZ RS(s Simple description of a member in the return value ``dict``. This class controls both the type of object being returned by a command as well as how the output will be displayed. For example, this class defines two return results: an entry and a value. >>> from ipalib import crud, output >>> class user(crud.Update): ... ... has_output = ( ... output.Entry('result'), ... output.value, ... ) The order of the values in has_output controls the order of output. If you have values that you don't want to be printed then add ``'no_display'`` to flags. The difference between ``'no_display'`` and ``'no_output'`` is that ``'no_output'`` will prevent a Param value from being returned at all. ``'no_display'`` will cause the API to return a value, it simply won't be displayed to the user. This is so some things may be returned that while not interesting to us, but may be to others. >>> from ipalib import crud, output >>> myvalue = output.Output('myvalue', unicode, ... 'Do not print this value', flags=['no_display'], ... ) >>> class user(crud.Update): ... ... has_output = ( ... output.Entry('result'), ... myvalue, ... ) cCsk||_|dk r<t|ts0|f}n||_n|dk rT||_n||_t|dS(N(tnametNonet isinstancettuplettypetdoctflagsR(tselfRR R R ((s1/usr/lib/python2.7/site-packages/ipalib/output.pyt__init__Ns       cCs#d|jjdj|jfS(Ns%s(%s)s, (t __class__t__name__tjoint_Output__repr_iter(R ((s1/usr/lib/python2.7/site-packages/ipalib/output.pyt__repr__Ys ccst|jVxkdD]c}|jj|}|s9qnt|tr]tt|}n t|}d||fVqWdS(NR R R s%s=%s(stypesdocsflags(treprRt__dict__tgetRR Rtlist(R tkeytvalue((s1/usr/lib/python2.7/site-packages/ipalib/output.pyt __repr_iter_s  N( Rt __module__t__doc__RR tvalidateR R RRR(((s1/usr/lib/python2.7/site-packages/ipalib/output.pyR!s& tEntrycBseZeZedZRS(s'A dictionary representing an LDAP entry(RRtdictR RR (((s1/usr/lib/python2.7/site-packages/ipalib/output.pyRlssP%s.validate_output() => %s.validate(): output[%r][%d]: need a %r; got a %r: %rt ListOfEntriescBs)eZeefZedZdZRS(sA list of LDAP entriesc Csjxct|D]U\}}t|ts tt|j|jj|j|tt||fq q WdS(N( t enumerateRRt TypeErrortemsgRRRR (R tcmdtentriestversiontitentry((s1/usr/lib/python2.7/site-packages/ipalib/output.pyRxs(RRRR R RR R(((s1/usr/lib/python2.7/site-packages/ipalib/output.pyR ts  t PrimaryKeycBseZdZRS(c Cst|drdt|drE|jrE|jjrE|jjj}n tf}|tdf}n tf}t||st d|j |j j |j |dt||fndS(Ntprimary_key_typestobjsH%s.validate_output() => %s.validate(): output[%r]: need %r; got %r: %ri( RthasattrR+t primary_keyt allowed_typestunicodeR RRR"RRR(R R$RR&ttypes((s1/usr/lib/python2.7/site-packages/ipalib/output.pyRs$  (RRR(((s1/usr/lib/python2.7/site-packages/ipalib/output.pyR)stListOfPrimaryKeyscBseZdZRS(c Cs0t|drttf}n tf}t||sqtd|j|jj|j|dt ||fnt|dr,t |dr|j r|j j r|j j j }n tf}xjt|D]Y\}}t||stt|j|jj||j|dt ||fqqWndS(NR*sH%s.validate_output() => %s.validate(): output[%r]: need %r; got %r: %riR+(RR RR/RR"RRRR R,R+R-R.R!R#(R R$tvaluesR&R0R'R((s1/usr/lib/python2.7/site-packages/ipalib/output.pyRs"  $ (RRR(((s1/usr/lib/python2.7/site-packages/ipalib/output.pyR1stresultR s*All commands should at least have a resulttsummarys-User-friendly description of action performedRs:The primary_key value of the entry, e.g. 'jdoe' for a userR t no_displaytcountsNumber of entries returnedt truncateds%True if not all results were returnedsList of deletions that faileds'True means the operation was successful(%Rtsixtipalib.plugableRRtipalib.capabilitiesRt ipalib.textRt ipalib.utilRtPY3tstrR/RRR#R R)R1R3R RR4Rtstandardtstandard_entrytinttbooltstandard_list_of_entriesRtstandard_deletetstandard_multi_deletetstandard_booleantstandard_valuet simple_valuet simple_entry(((s1/usr/lib/python2.7/site-packages/ipalib/output.pytsV   K