Annotation of checkStation/checkStation.pyc, revision 1.1.1.1

1.1       dwinter     1: ;
                      2: ԂBc@sdkl&Z&&d&klZ&dklZ&dkZdkZdkZdddgZ  dZ
                      3: ed&Zd Z
d
                      4: ZdZde&f&d
YZdZed&ZdS((&s
                      5: SimpleItem(&spackage_home(&sPageTemplateFileNs33335s22222sffs DragThingcCsd|o(&t&tiitt&|&&}n.&t&tiitt&|&&i|&}|Sd&S(s-returns a page template file from the productN(
                      6: sorphanedsPageTemplateFilesosspathsjoinspackage_homesglobalsspts__of__sself(sselfspathsorphanedspt((s9/usr/local/testzope/Products/checkStation/checkStation.pyszptFiles
                      7: &&(-&c&Cs1t|&}&|&d&jo&||&dSn&tSdS(sletzteii&N(slenslinesslengthsNone(slinesslength((s9/usr/local/testzope/Products/checkStation/checkStation.pysgetLastLines
                      8: &&
&cCsZ|i&d&&}|di&}|di&d&}|ddd!|&jo&tSn&tSdS(schecke formatssGETi&is&/iiN(slinessplitssplitteds splitted2sformatssTruesFalse(slinesformatss  splitted2ssplitted((s9/usr/local/testzope/Products/checkStation/checkStation.pyscheckFormats&&&&&c&Cs|i&d&&}&|&di&d&}&|&d}|i&d&}t|d&dt|d&}titi&}|i&d&}t|di&d&dt|d&}||Sd    S(
                      9: s2gibt minuten differenz der letzen beiden eintraeges&[i&s&]is&:i<iiN(
                     10: slinessplitstmpstimestrsintstime1stimesasctimes localtimestime2(slinestmpstimestrstime1stime2ssplits localtime((s9/usr/local/testzope/Products/checkStation/checkStation.pyscmpLine+s&&
                     11: &"&&,scheckStationcBstZ&dZd&ZdZddg&dZdZdd&Zhdd   <d
                     12: d<ZdZ   dd
&Z
                     13: dZdZe
d&ZRS(stest ob station lebtscheck Media StationscCs||_|&|_h|_d&S(sinitN(spathsselfsids
modulOverview(sselfsidspath((s9/usr/local/testzope/Products/checkStation/checkStation.pys__init__Cs&&   &   &isVIDcCsg}t&id&|&|if&}x!|iD]}|i   |&&q/Wt
                     14: |&}|o&tddfSn&&t|&}t||o&t||fSn&&||jo&t||fSn&t||fSdS(scheck station with nr nrsgrep /%s/ %s | tail siN(stxtsosspopensnrsselfspathstxtFhs   readlinesslinesappendsgetLastLinesTruescmpLinescmpTscheckFormatsformatsstimesFalse(sselfsnrstimesformatsscmpTstxtFhstxtsline((s9/usr/local/testzope/Products/checkStation/checkStation.pyscheckStationIs&&&
&&
&c&&&CstSd&S(s getModulsN(&smodule_list(&sself((s9/usr/local/testzope/Products/checkStation/checkStation.pys   getModulses&&cCs*|&|iid&<t|d}|SdS(soverviewsoutTimeszpt/overview.zptN(stimesselfsREQUESTsSESSIONszptFileszp(sselfstimeszp((s9/usr/local/testzope/Products/checkStation/checkStation.pysoverviewStationshs&&&s22222s  127.0.0.1s33335s 127.0.0.2cCs|i&|&}d&}ti||tf&i}xp|D]h}|id&dj&oL&|id}d}ti|||f&i}dG|||fGHq9&q9WdS(sneustartsssh root@%s "ps -xa | grep %s" sgrepisssh root@%s kill -9 %s sWWN(sselfsipssmodulsipsstrsosspopens
                     15: grepStrings readlinessretssretsfindssplitsprocess(sselfsmodulsprocesssipsretsretssstr((s9/usr/local/testzope/Products/checkStation/checkStation.pys
rebootStationqs&&
&&&&&cCsti&|_x|iD]y}|i|d&|&ddg&&}|doI&|i |&&t
                     16: |do&t|dh&n&&ti&|i|<q&qWdS(s)checks and reboots non responding firefoxstimesformatssVIDis
modulOverviewN(
stimes  localtimesselfs  lastChecks   getModulssmodulscheckStationstimerscheckeds
rebootStationshasattrssetattrs
modulOverview(sselfstimerscheckedsmodul((s9/usr/local/testzope/Products/checkStation/checkStation.pyscheckRebootDeads&&
&
&&&c&Cst|d&}&|&SdS(s
give Overviewszpt/rebootOverview.zptN(szptFilesselfspt(sselfspt((s9/usr/local/testzope/Products/checkStation/checkStation.pysrebootOverviews&&&c&Cst|d&}&|&SdS(sform for changeszpt/ChangeCheckStation.zptN(szptFilesselfspt(sselfspt((s9/usr/local/testzope/Products/checkStation/checkStation.pyschangeCheckStationForms&cCs%|&|_|o&|id&&&n&&dS(schangesmanage_mainN(spathsselfsRESPONSEsredirect(sselfspathsRESPONSE((s9/usr/local/testzope/Products/checkStation/checkStation.pyschangeCheckStations&&   &(s__name__s
                     17: __module__s__doc__s meta_types__init__scheckStations getModulssoverviewStationssipss
rebootStationscheckRebootDeadsrebootOverviewschangeCheckStationFormsNoneschangeCheckStation(((s9/usr/local/testzope/Products/checkStation/checkStation.pyscheckStation>s&          c&Cst|d&}&|&SdS(saddszpt/AddCheckStationN(szptFilesselfspt(sselfspt((s9/usr/local/testzope/Products/checkStation/checkStation.pysmanage_addCheckStationForms&&&cCsAt|&|}|i|&|&|tj o&|id&&&n&&dS(smanage checkstationsmanage_mainN(   scheckStationsidspathsnewObjsselfs
                     18: _setObjectsRESPONSEsNonesredirect(sselfsidspathsRESPONSEsnewObj((s9/usr/local/testzope/Products/checkStation/checkStation.pysmanage_addCheckStations
                     19: &&
&(sOFS.SimpleItems
                     20: SimpleItemsGlobalsspackage_homes'Products.PageTemplates.PageTemplateFilesPageTemplateFilesossos.pathstimesmodule_lists
                     21: grepStringsFalseszptFilesgetLastLinescheckFormatscmpLinescheckStationsmanage_addCheckStationFormsNonesmanage_addCheckStation(smodule_listscheckStationszptFilescmpLinesgetLastLines
                     22: grepStringsmanage_addCheckStationForms
                     23: SimpleItemscheckFormatsPageTemplateFilestimesmanage_addCheckStationsosspackage_home((s9/usr/local/testzope/Products/checkStation/checkStation.pys&?&s
&

&    &   &   &
                     24:               e 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>