@@ 6696-6727 (lines=32) @@ | ||
6693 | ||
6694 | return self._send_xml_command(cmd) |
|
6695 | ||
6696 | def verify_report_format( |
|
6697 | self, report_format_id: Union[str, ReportFormatType] |
|
6698 | ) -> Any: |
|
6699 | """Verify an existing report format |
|
6700 | ||
6701 | Verifies the trust level of an existing report format. It will be |
|
6702 | checked whether the signature of the report format currently matches the |
|
6703 | report format. This includes the script and files used to generate |
|
6704 | reports of this format. It is *not* verified if the report format works |
|
6705 | as expected by the user. |
|
6706 | ||
6707 | Arguments: |
|
6708 | report_format_id: UUID of the report format to be verified |
|
6709 | or ReportFormatType (enum) |
|
6710 | ||
6711 | Returns: |
|
6712 | The response. See :py:meth:`send_command` for details. |
|
6713 | """ |
|
6714 | if not report_format_id: |
|
6715 | raise RequiredArgument( |
|
6716 | function=self.verify_report_format.__name__, |
|
6717 | argument='report_format_id', |
|
6718 | ) |
|
6719 | ||
6720 | cmd = XmlCommand("verify_report_format") |
|
6721 | ||
6722 | if isinstance(report_format_id, ReportFormatType): |
|
6723 | report_format_id = report_format_id.value |
|
6724 | ||
6725 | cmd.set_attribute("report_format_id", report_format_id) |
|
6726 | ||
6727 | return self._send_xml_command(cmd) |
|
6728 | ||
6729 | def verify_scanner(self, scanner_id: str) -> Any: |
|
6730 | """Verify an existing scanner |
|
@@ 5047-5074 (lines=28) @@ | ||
5044 | ||
5045 | return self._send_xml_command(cmd) |
|
5046 | ||
5047 | def get_report_format( |
|
5048 | self, report_format_id: Union[str, ReportFormatType] |
|
5049 | ) -> Any: |
|
5050 | """Request a single report format |
|
5051 | ||
5052 | Arguments: |
|
5053 | report_format_id: UUID of an existing report format |
|
5054 | or ReportFormatType (enum) |
|
5055 | ||
5056 | Returns: |
|
5057 | The response. See :py:meth:`send_command` for details. |
|
5058 | """ |
|
5059 | cmd = XmlCommand("get_report_formats") |
|
5060 | ||
5061 | if not report_format_id: |
|
5062 | raise RequiredArgument( |
|
5063 | function=self.get_report_format.__name__, |
|
5064 | argument='report_format_id', |
|
5065 | ) |
|
5066 | ||
5067 | if isinstance(report_format_id, ReportFormatType): |
|
5068 | report_format_id = report_format_id.value |
|
5069 | ||
5070 | cmd.set_attribute("report_format_id", report_format_id) |
|
5071 | ||
5072 | # for single entity always request all details |
|
5073 | cmd.set_attribute("details", "1") |
|
5074 | return self._send_xml_command(cmd) |
|
5075 | ||
5076 | def get_results( |
|
5077 | self, |