Ñò ¸sWc@s@dZddklZddklZdefd„ƒYZdS(s7Name Service Cache Daemon (nscd) classes used by nscfg.iÿÿÿÿ(tprint_functioni(tNssbasetNscdcBsgeZdZdZdZdZdZdZdZdZ dZ d dd d d d dddddddddddddddgZ d ddd dd dd!d"d#dd$d%dddddddgZ hZ d Zhd&dgd'6d&dgd(6d&dgd)6Zhd*d+gd,6d-d.gd/6d-d0gd16d-d2gd36d*d+gd46d-d5gd66d-dgd76Zh d8d96d:d;6d<d=6d>d?6d@dA6dBd 6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6Zh d8dO6dGdP6dIdQ6dKdR6dSdT6dUdV6dWdX6dYdZ6d[dN6Zd\Zd]„Zd^„Zd_„Zd`„Zda„Zdb„Zdc„Zdd„Zde„Zdf„Zdg„ZRS(hs~Name Service Cache Daemon class. Represents the configuration of the name service cache. See nscd.conf(4) for details.ssvc:/system/name-service/caches nscd.confs/etctdefaulttit1994s-# See nscd(1m) and nscd.conf(4) for details. tconfigthosttpasswordtgrouptnetworktprotocoltrpctethertnetmaskt bootparamtnetgrouptservicetprintertprojectt auth_attrt exec_attrt prof_attrt user_attrttnrhtpttnrhdbthoststpasswdtnetworkst protocolstetherstnetmaskst bootparamstservicestprinterstastringtlogfilet debug_leveltdebug_componentstbooleanttruet enable_cachetintegert3600tpositive_time_to_livet5tnegative_time_to_livet20tkeep_hot_countt check_filest0tcheck_file_intervaltmaximum_entries_alloweditcacheitswitchitfrontendit self_creditadmini i@t smf_monitori€t nsw_stateitgetentitaccessitint_addriÿtallt cant_findtdebugterrortwarningitinfoitnoticei talerti@tcritiÿs$solaris.smf.value.name-service.cachecCsÍti|ƒt|iƒdjo¦x:|iD]/}|i|i|ƒ}|i||i|Convert yes/no to true/false expected by the SMF boolean type.tfalseR(RRU(RVRWRX(RPRYRZR[((s../common/nscd.pyt truefalse†s  cCsÁyt|ƒ}Wn|idƒdSX||idjodSg}xN|iiƒD]=}|djoqWn||i|@o|i|ƒqWqWWt|ƒdjo|idƒdS|S(s7Converts a debug_component integer to a SMF value list.s0Non integer component value found in legacy fileR?is(No component values found in legacy fileN(tintterr_msgtNonet debug_comptkeystappendRI(RPtstrvaluetinputtlistti((s../common/nscd.pytimport_component’s$   cCsÕ|iddƒ}|id|ƒ|djpt|ƒdjodSt|ƒdjo#|ddjot|idƒSd}x3|D]+}y|i|}||O}WqŠqŠXqŠW|djodSt|ƒS(s8Converts a debug_component SMF value list to an integer.RRsconfig/debug_componentssexport debug_components= iiR?N(tget_prop_val_listttraceitRaRItstrRb(RPRgtdbintRhtvalue((s../common/nscd.pytexport_component¦s" $  cCsÁyt|ƒ}Wn|idƒdSX||idjodSg}xN|iiƒD]=}|djoqWn||i|@o|i|ƒqWqWWt|ƒdjo|idƒdS|S(s3Converts a debug_level integer to a SMF value list.s2Non integer value debug value found in legacy fileR?is%Non debug values found in legacy fileN(R_R`RaR%RcRdRI(RPReRfRgRh((s../common/nscd.pyt import_level¹s$   c Cs.|iddƒ}|id|ƒ|djpt|ƒdjodSt|ƒdjo||d}|djot|idƒSyEt|ƒ}|djodS|djo|djo|SdSWqÖqÖXnd}x3|D]+}y|i|}||O}WqãqãXqãW|djodSt|ƒS( s4Converts a debug_level SMF value list to an integer.RRsconfig/debug_levelsexport debug_level= iiR?i N(RjRkRaRIRlR%R_(RPRgRYRhRmRn((s../common/nscd.pyt export_levelÍs8       cCs`|idƒh}xy|iD]n}|i|i|ƒ}|id|ƒ}|djo4t|ƒtdƒjo|djo|||sú                                          cCs[|idƒ|idƒ|idƒp|iS|iƒp|iS|idƒ|iS(sUnconfigure SMF. Reset DEFPG.sunconfiguring nscd...s"Delete all service customizations.Rssuccessful unconfigure.(RsR”RzR•R“(RP((s../common/nscd.pyt unconfig_smfÄs    cCsü|iƒ}|djoß|i|joË|i|jo»|i|iƒ}|djo˜d}d}xs|iiƒD]b}|i|ddjoqtn|d7}di|i|fƒ}||jo|d7}qtqtW||jotSqôqønt S(s/Is SMF populated with this service? True/FalseiiRRrN( tget_pgsRaRtRMt get_propsRORcRLRWR‹(RPtpgstpropstfndproptallpropRQttprop((s../common/nscd.pyt is_populatedÒs$       (t__name__t __module__t__doc__tSERVICEtLEGACYt LEGACYDIRRttDEFPROPtGROUPtCOPY_YRtDOCRNRwRJRMRKRORbR%t VALUE_AUTHRHR\R^RiRoRpRqR…R©RªR²(((s../common/nscd.pyRsˆ                    S † N(Rµt __future__RtnssbaseRR(((s../common/nscd.pyts