Ñò sX_Kc@sòddkTddkTddkTddklZeiidideƒZd„Z d„Z e ƒZ d„Z d„Z dMeed „ZedMed „ZdMeed „ZedMd „Zd efd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd „ƒYZd!efd"„ƒYZd#efd$„ƒYZd%efd&„ƒYZ d'efd(„ƒYZ!d)efd*„ƒYZ"d+efd,„ƒYZ#ed-ege$i%i&e i%i'e$i%i(jd.e)ƒZ*ed/e i%i+ed.e)ƒZ,ede i%i-ed.e)ƒZ.ed0e i%i/ed.e)d1d2ƒZ0ed3e i%i1ed.e)ƒZ1ed4e i%i2ed.e)ƒZ3ed5e i%i4ed.e)ƒZ5ed6e i%i6ed.e)ƒZ7ed7e i%i8ed.e)ƒZ9ed8e i%i:ed.e)ƒZ;ed9e i%i<ed.e)ƒZ=ed:e i%i>e!d.e)d1d;ƒZ>ed<e i%i?e"d.e)d1d=ƒZ?ed>e i%i@e#d.e)d1d?ƒZ@ed@eeAi%iBgeCi%iDeCi%iDeAi%i'jd.e)ƒZEedAe eAi%iBgeCi%iDeCi%iDeAi%i'jd.e)dBe)ƒZFdC„ZGdD„ZHdE„ZIdF„ZJdG„ZKdH„ZLdI„ZMdJ„ZNdK„ZOee)joddLkPlQZQeQdMUndMS(Niÿÿÿÿ(t*(tconfigtglobalssmoon.myth_supportcCs#tiitiƒtddƒjS(NtdaysiZ(thoststct last_modifiedtdatettodayt timedelta(((s,/usr/local/www/smolt/hardware/model/views.pytold_hosts_clause scCsttgtƒƒidƒS(Nt old_hosts(tselectRR talias(((s,/usr/local/www/smolt/hardware/model/views.pytold_hosts_table scCsti|ƒidƒS(s1This is a counted column. A convenience functiontcnt(tfunctcounttlabel(tcolumn((s,/usr/local/www/smolt/hardware/model/views.pyt column_cntscCstiti|ƒƒidƒS(s$The same as column_cnt, but distinctR(RRtdistinctR(R((s,/usr/local/www/smolt/hardware/model/views.pyt column_cnt_dsc Csr|o t}nt}||ƒ}t|||g|ƒi|ƒ}|o|iƒ}n|i|ƒi|ƒS(s£Generates a satistical counted view of some table or simple join for some group of columns. This function is a bit low level, and you probably want the simple version of this: simple_mapped_counted_view params: name is the name of the view columns is an iterable with the columns desired - multiple tables' columns may be used here, for simple joins - what is in group_by should not be included here group_by the object to group on, such that it is counted restrictions are sqlalchemy where constraints desc is a boolean whether you want it in ascending, descending or condescending order (RRR tgroup_bytdesctorder_byR ( tnametcolumnsRt restrictionsRRtcnt_ftcnt_objts((s,/usr/local/www/smolt/hardware/model/views.pyt counted_views  "cCs9|o|i|ƒ}nt||g|d|d|ƒS(s+Generates a counted view on a single columnRR(RR (RRRRR((s,/usr/local/www/smolt/hardware/model/views.pytsimple_counted_view3sc CsJt||||||ƒ}t|i|iƒ}t||d|gƒ|S(Nt primary_key(R tgetattrRRtmapper( Rtmap_objRRRRRtseltp_key((s,/usr/local/www/smolt/hardware/model/views.pytmapped_counted_view;scCsat||||ƒ}|ot|i|ƒ}nt|i|iƒ}t||d|gƒ|S(sFor some column in a table, generates a counted view and maps it to some object params: name is the name of the view column is the column being counted map_obj is the object to be mapped to desc is the order you want it in label renames the column name to something else, so the class uses a different attribute name than the source table R"(R!R#RRR$(RRR%RRR&R'((s,/usr/local/www/smolt/hardware/model/views.pytsimple_mapped_counted_viewAs tFileSyscBseZRS((t__name__t __module__(((s,/usr/local/www/smolt/hardware/model/views.pyR*VstArchcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR-YstOScBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR.[stRunlevelcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR/]stNumCPUscBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR0_stVendorcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR1astSystemcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR2cst CPUVendorcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR3est KernelVersioncBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR4gst FormFactorcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR5istLanguagecBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR6kst TotalListcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR7mst UniqueListcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR8ostSelinuxEnabledcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR9qstSelinuxEnforcedcBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR:sst SelinuxPolicycBseZRS((R+R,(((s,/usr/local/www/smolt/hardware/model/views.pyR;ust FILESYSTEMSRtARCHtRUNLEVELRtrunleveltNUM_CPUStVENDORtSYSTEMt CPU_VENDORtKERNEL_VERSIONt FORMFACTORtLANGUAGEtSELINUX_ENABLEDtenabledtSELINUX_ENFORCEtenforcetSELINUX_POLICYtpolicyt TOTALLISTt UNIQUELISTRcCsttitiiƒgƒS(N(R RRR Rtid(((s,/usr/local/www/smolt/hardware/model/views.pyt total_hosts³scCstitƒiƒS(N(tsessiontqueryt HardwareClasstall(((s,/usr/local/www/smolt/hardware/model/views.pyt all_classes¶scCsJttititiiƒƒgtiitiijƒi ƒi ƒdS(Ni( R RRRR RROt host_linkst host_link_idtexecutetfetchone(((s,/usr/local/www/smolt/hardware/model/views.pythost_count_with_devicesºs!c CsOtdtgtiittii|jtiitiijƒdt dt ƒS(NttmpRR( R tcomputer_logical_devicesRVRRWtand_tclst device_idROtTrue(R^((s,/usr/local/www/smolt/hardware/model/views.pytdevices_per_class¾scCs%t|ƒiƒidƒiƒiƒS(Nid(RaR tlimitRXtfetchall(R^((s,/usr/local/www/smolt/hardware/model/views.pyttop_devices_per_classÄscCs_ttititiiƒƒgttii |jtii tii jƒƒi ƒi ƒdS(Ni(R RRRRVRRWR]R\R^R_RORXRY(R^((s,/usr/local/www/smolt/hardware/model/views.pythosts_per_classÒs!'cCs|iƒiƒiƒS(N(R RXRc(ttable((s,/usr/local/www/smolt/hardware/model/views.pyt just_selectØscCs,tti|iiƒgƒiƒiƒdS(Ni(R RRRRORXRY(Rf((s,/usr/local/www/smolt/hardware/model/views.pyt just_countÛsc CsAtdgtiitii|jdtdtƒiƒiƒd S(NR[RRid( R R\Rt vendor_idR^R`tFalseRXRc(R^((s,/usr/local/www/smolt/hardware/model/views.pyttop_vendors_per_classÞs  (tmyth_import_stringN(Rt sqlalchemytsqlalchemy.ormthardware.model.modelt turbogearsRt configMaptgetRjt myth_supportR RR RRtNoneR R!R(R)tobjectR*R-R.R/R0R1R2R3R4R5R6R7R8R9R:R;t file_systemsRtfs_typeROthost_idR`tfilesystplatformtarchstostosestdefault_runlevelt runlevelstnum_cpustvendortvendorstsystemtsystemst cpu_vendort cpu_vendorstkernel_versiontkernel_versionst formfactort formfactorstlanguaget languagestselinux_enabledtselinux_enforcetselinux_policyR\t descriptionRVR_t totallistt uniquelistRPRURZRaRdReRgRhRkt myth_viewsRl(((s,/usr/local/www/smolt/hardware/model/views.pytsž         *