def prepare_for_generation(self): """Function prepares the XML file for conversion to HTML format""" for report in self._get_reports(): if self.conf.old_report_style: ReportParser.write_xccdf_version(report, direction=True) self.openscap_helper.run_generate(report, report.replace('.xml', '.html'), old_style=self.conf.old_report_style) if self.conf.old_report_style: ReportParser.write_xccdf_version(report)
def prepare_for_generation(self): """Function prepares the XML file for conversion to HTML format""" for report in self._get_reports(): if self.conf.old_report_style: ReportParser.write_xccdf_version(report, direction=True) self.openscap_helper.run_generate( report, report.replace('.xml', '.html'), old_style=self.conf.old_report_style) if self.conf.old_report_style: ReportParser.write_xccdf_version(report)
def prepare_xml_for_html(self): """The function prepares a XML file for HTML creation""" # Reload XML file self.report_parser.reload_xml(self.openscap_helper.get_default_xml_result_path()) # strip whitespaces on start and end of stdout/stderr from modules # inside the result.xml file self.report_parser.strip_whitespaces() # Replace fail in case of slight and medium risks with needs_inspection self.report_parser.replace_inplace_risk(scanning_results=self.scanning_progress) if not self.conf.debug: self.report_parser.remove_debug_info() self.report_parser.reload_xml(self.openscap_helper.get_default_xml_result_path()) self.report_parser.update_check_description() xml_report = self.openscap_helper.get_default_xml_result_path() if self.old_report_style: ReportParser.write_xccdf_version(xml_report, direction=True)
def prepare_xml_for_html(self): """The function prepares a XML file for HTML creation""" # Reload XML file self.report_parser.reload_xml(self.openscap_helper.get_default_xml_result_path()) # strip whitespaces on start and end of stdout/stderr from modules # inside the result.xml file self.report_parser.strip_whitespaces() # Replace fail in case of slight and medium risks with needs_inspection self.report_parser.replace_inplace_risk(scanning_results=self.scanning_progress) if not self.conf.debug: self.report_parser.remove_debug_info() self.report_parser.reload_xml(self.openscap_helper.get_default_xml_result_path()) self.report_parser.update_check_description() xml_report = self.openscap_helper.get_default_xml_result_path() if self.old_report_style: ReportParser.write_xccdf_version(xml_report, direction=True)
def update_xml_after_html_generated(self): xml_report = self.openscap_helper.get_default_xml_result_path() self.xml_mgr.update_report(xml_report) if self.old_report_style: # Revert change to the XML XCCDF namespace which would break preupg-diff ReportParser.write_xccdf_version(xml_report)
def update_xml_after_html_generated(self): xml_report = self.openscap_helper.get_default_xml_result_path() self.xml_mgr.update_report(xml_report) if self.old_report_style: # Revert change to the XML XCCDF namespace which would break preupg-diff ReportParser.write_xccdf_version(xml_report)