sos.report.reporting — Reporting Interface¶
This provides a restricted tag language to define the sos report index/report
- class sos.report.reporting.Command(name, return_code, href)[source]¶
Bases:
Leaf- ADDS_TO = 'commands'¶
- class sos.report.reporting.HTMLReport(report_node)[source]¶
Bases:
PlainTextReportWill generate a HTML report from a top_level Report object
- ALERT = '<li>%s</li>'¶
- FOOTER = '</body></html>'¶
- HEADER = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\n "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">\n <head>\n <meta http-equiv="Content-Type" content="text/html;\n charset=utf-8" />\n <title>Sos System Report</title>\n <style type="text/css">\n td {\n padding: 0 5px;\n }\n </style>\n </head>\n <body>\n'¶
- LEAF = '<li><a href="%(href)s">%(name)s</a></li>'¶
- NOTE = '<li>%s</li>'¶
- PLUGDIVIDER = '<hr/>\n'¶
- PLUGINFORMAT = '<h2 id="%(name)s">Plugin <em>%(name)s</em></h2>'¶
- PLUGLISTFOOTER = '</tr></table>'¶
- PLUGLISTHEADER = '<h3>Loaded Plugins:</h3><table><tr>'¶
- PLUGLISTITEM = '<td><a href="#%(name)s">%(name)s</a></td>\n'¶
- PLUGLISTMAXITEMS = 5¶
- PLUGLISTSEP = '</tr>\n<tr>'¶
- subsections = ((<class 'sos.report.reporting.Command'>, '<li><a href="%(href)s">%(name)s</a></li>', '<p>Commands executed:</p><ul>', '</ul>'), (<class 'sos.report.reporting.CopiedFile'>, '<li><a href="%(href)s">%(name)s</a></li>', '<p>Files copied:</p><ul>', '</ul>'), (<class 'sos.report.reporting.CreatedFile'>, '<li><a href="%(href)s">%(name)s</a></li>', '<p>Files created:</p><ul>', '</ul>'), (<class 'sos.report.reporting.Alert'>, '<li>%s</li>', '<p>Alerts:</p><ul>', '</ul>'), (<class 'sos.report.reporting.Note'>, '<li>%s</li>', '<p>Notes:</p><ul>', '</ul>'))¶
- class sos.report.reporting.JSONReport(report_node)[source]¶
Bases:
PlainTextReportWill generate a JSON report from a top_level Report object
- class sos.report.reporting.Leaf[source]¶
Bases:
NodeMarker class that can be added to a Section node
- class sos.report.reporting.PlainTextReport(report_node)[source]¶
Bases:
objectWill generate a plain text report from a top_level Report object
- ALERT = ' ! %s'¶
- FOOTER = ''¶
- HEADER = ''¶
- LEAF = ' * %(name)s'¶
- NOTE = ' * %s'¶
- PLUGDIVIDER = '========================================================================'¶
- PLUGINFORMAT = '%(name)s'¶
- PLUGLISTFOOTER = ''¶
- PLUGLISTHEADER = 'Loaded Plugins:'¶
- PLUGLISTITEM = ' %(name)s'¶
- PLUGLISTMAXITEMS = 5¶
- PLUGLISTSEP = '\n'¶
- line_buf = []¶
- subsections = ((<class 'sos.report.reporting.Command'>, ' * %(name)s', '- commands executed:', ''), (<class 'sos.report.reporting.CopiedFile'>, ' * %(name)s', '- files copied:', ''), (<class 'sos.report.reporting.CreatedFile'>, ' * %(name)s', '- files created:', ''), (<class 'sos.report.reporting.Alert'>, ' ! %s', '- alerts:', ''), (<class 'sos.report.reporting.Note'>, ' * %s', '- notes:', ''))¶
- class sos.report.reporting.Report[source]¶
Bases:
NodeThe root element of a report. This is a container for sections.