/usr/lib/python3/dist-packages/sos/report/__pycache__
NameSizeModeActions
reporting.cpython-310.pyc80830644editdlrm
__init__.cpython-310.pyc536200644editdlrm
Edit: /usr/lib/python3/dist-packages/sos/report/__pycache__/reporting.cpython-310.pyc (8083B)
o G%@iq@sdZzddlZWn eyddlZYnwGdddZGdddeZGdddeZd d ZGd d d eZGd ddeZ GdddeZ GdddeZ GdddeZ GdddeZ ddZGdddZGdddeZGdddeZdS)zS This provides a restricted tag language to define the sos report index/report Nc@s eZdZiZddZddZdS)NodecCs t|jSN)jsondumpsdataselfr 6/usr/lib/python3/dist-packages/sos/report/reporting.py__str__s z Node.__str__cCsdS)NFr rnoder r r can_addsz Node.can_addN)__name__ __module__ __qualname__rr rr r r r rs rc@seZdZdZdS)Leafz0Marker class that can be added to a Section nodeN)rrr__doc__r r r r r"src@(eZdZdZddZddZddZdS) Reportz?The root element of a report. This is a container for sections.cCs i|_dSr)rrr r r __init__) zReport.__init__cC t|tSr) isinstanceSectionr r r r r,rzReport.can_addcGs&|D]}||r|j|j|j<qdSr)rrnamernodesr r r r add/s  z Report.addNrrrrrrrr r r r r&s  rcCt|tr|S|ddS)z3returns a string text for a given unicode/str inpututf8ignorerstrdecode)sr r r _decode5sr'c@r) rzeA section is a container for leaf elements. Sections may be nested inside of Report objects only.cCst||_i|_dSr)r'rr)rrr r r r>s  zSection.__init__cCrr)rrr r r r rBrzSection.can_addcGs0|D]}||r|j|jg|jqdSr)rr setdefaultADDS_TOappendrr r r rEs  z Section.addNrr r r r r:s  rc@eZdZdZddZdS)CommandcommandscCst||t|d|_dS)N)r return_codehrefr'r)rrr.r/r r r rOs zCommand.__init__Nrrrr)rr r r r r,K r,c@r+) CopiedFile copied_filescCt|t|d|_dSN)rr/r0rrr/r r r rY zCopiedFile.__init__Nr1r r r r r3Ur2r3c@r+) CreatedFile created_filescCr5r6r0r7r r r rbr8zCreatedFile.__init__Nr1r r r r r9^r2r9c@r+)AlertalertscCt||_dSrr0rcontentr r r rkzAlert.__init__Nr1r r r r r;gr2r;c@r+)NotenotescCr=rr0r>r r r rsr@z Note.__init__Nr1r r r r rAor2rAcCs |dS)a Return True if 'string' ends with a backslash, and False otherwise. Define this as a named function for no other reason than that pep8 now forbids binding of a lambda expression to a name: 'E731 do not assign a lambda expression, use a def' \)endswith)stringr r r ends_bsws rFc@seZdZdZdZdZdZdZdZdZ dZ dZ d Z dZ d Zd Zeed dfeed dfeeddfeeddfeeddffZgZddZddZddZdS)PlainTextReportz@Will generate a plain text report from a top_level Report objectz * %(name)sz ! %sz * %szLoaded Plugins:z %(name)s z%(name)szH========================================================================z- commands executed:z- files copied:z- files created:z - alerts:z - notes:cCstt|j|_dSr)sorteddictitemsr report_data)r report_noder r r rszPlainTextReport.__init__c Cs*g|_}t|jdkr||j||jd}d}t|j}|jD]!\}}||jd|i7}|d7}||jdkrE||krE||j7}q$||j 7}|||jD](\}}||j ||j d|i|j D]\}} } } | ||j| | | qjqSt|jdkr||jdtdd|} | S)NrrHrrIcSr )Nr!r"r#)ir r r s z)PlainTextReport.unicode..)line_buflenHEADERr*PLUGLISTHEADERrN PLUGLISTITEMPLUGLISTMAXITEMS PLUGLISTSEPPLUGLISTFOOTER PLUGDIVIDER PLUGINFORMAT subsectionsprocess_subsectionr)FOOTERjoinmap) rrSlinerQ plugcount section_name_section_contentstype_format_headerfooteroutputr r r unicodes:           zPlainTextReport.unicodecCsd||vr.|j|t||dddD] }|j||qt|dkr0|j|dSdSdS)NcSst|tr |dSdS)NrrH)rrL)xr r r rRsz4PlainTextReport.process_subsection..)keyr)rSr*rKgetrT)rsectionrnrirhrjitemr r r r^s   z"PlainTextReport.process_subsectionN)rrrrrUr_LEAFALERTNOTErVrWrYrXrZr\r[r,r3r9r;rAr]rSrrlr^r r r r rGs0      "rGc@sveZdZdZdZdZdZdZdZdZ dZ dZ d Z d Z d Zd Zeed dfeeddfeeddfeeddfeeddffZdS) HTMLReportz:Will generate a HTML report from a top_level Report objecta Sos System Report zz(
  • %(name)s
  • z
  • %s
  • z#

    Loaded Plugins:

    z* z rJz
    %(name)s
    z/

    Plugin %(name)s

    z
    z

    Commands executed:

      z
    z

    Files copied:

      z

      Files created:

        z

        Alerts:

          z

          Notes:

            N)rrrrrUr_rrrsrtrVrWrYrXrZr\r[r,r3r9r;rAr]r r r r rus(     ruc@r+) JSONReportz:Will generate a JSON report from a top_level Report objectcCstj|jddd}|S)NF)indent ensure_ascii)rrrN)rrkr r r rlszJSONReport.unicodeN)rrrrrlr r r r rvs rv)rr ImportError simplejsonrrrr'rr,r3r9r;rArFrGrurvr r r r s(         K&