@@ 4882-4913 (lines=32) @@ | ||
4879 | """ |
|
4880 | return self._send_xml_command(XmlCommand("sync_scap")) |
|
4881 | ||
4882 | def verify_report_format( |
|
4883 | self, report_format_id: Union[str, ReportFormatType] |
|
4884 | ) -> Any: |
|
4885 | """Verify an existing report format |
|
4886 | ||
4887 | Verifies the trust level of an existing report format. It will be |
|
4888 | checked whether the signature of the report format currently matches the |
|
4889 | report format. This includes the script and files used to generate |
|
4890 | reports of this format. It is *not* verified if the report format works |
|
4891 | as expected by the user. |
|
4892 | ||
4893 | Arguments: |
|
4894 | report_format_id: UUID of the report format to be verified |
|
4895 | or ReportFormatType (enum) |
|
4896 | ||
4897 | Returns: |
|
4898 | The response. See :py:meth:`send_command` for details. |
|
4899 | """ |
|
4900 | if not report_format_id: |
|
4901 | raise RequiredArgument( |
|
4902 | function=self.verify_report_format.__name__, |
|
4903 | argument='report_format_id', |
|
4904 | ) |
|
4905 | ||
4906 | cmd = XmlCommand("verify_report_format") |
|
4907 | ||
4908 | if isinstance(report_format_id, ReportFormatType): |
|
4909 | report_format_id = report_format_id.value |
|
4910 | ||
4911 | cmd.set_attribute("report_format_id", report_format_id) |
|
4912 | ||
4913 | return self._send_xml_command(cmd) |
|
4914 | ||
4915 | def verify_scanner(self, scanner_id: str) -> Any: |
|
4916 | """Verify an existing scanner |
|
@@ 3733-3760 (lines=28) @@ | ||
3730 | ||
3731 | return self._send_xml_command(cmd) |
|
3732 | ||
3733 | def get_report_format( |
|
3734 | self, report_format_id: Union[str, ReportFormatType] |
|
3735 | ) -> Any: |
|
3736 | """Request a single report format |
|
3737 | ||
3738 | Arguments: |
|
3739 | report_format_id: UUID of an existing report format |
|
3740 | or ReportFormatType (enum) |
|
3741 | ||
3742 | Returns: |
|
3743 | The response. See :py:meth:`send_command` for details. |
|
3744 | """ |
|
3745 | cmd = XmlCommand("get_report_formats") |
|
3746 | ||
3747 | if not report_format_id: |
|
3748 | raise RequiredArgument( |
|
3749 | function=self.get_report_format.__name__, |
|
3750 | argument='report_format_id', |
|
3751 | ) |
|
3752 | ||
3753 | if isinstance(report_format_id, ReportFormatType): |
|
3754 | report_format_id = report_format_id.value |
|
3755 | ||
3756 | cmd.set_attribute("report_format_id", report_format_id) |
|
3757 | ||
3758 | # for single entity always request all details |
|
3759 | cmd.set_attribute("details", "1") |
|
3760 | return self._send_xml_command(cmd) |
|
3761 | ||
3762 | def get_roles( |
|
3763 | self, |