|
@@ 4570-4601 (lines=32) @@
|
| 4567 |
|
""" |
| 4568 |
|
return self._send_xml_command(XmlCommand("sync_scap")) |
| 4569 |
|
|
| 4570 |
|
def verify_report_format( |
| 4571 |
|
self, report_format_id: Union[str, ReportFormatType] |
| 4572 |
|
) -> Any: |
| 4573 |
|
"""Verify an existing report format |
| 4574 |
|
|
| 4575 |
|
Verifies the trust level of an existing report format. It will be |
| 4576 |
|
checked whether the signature of the report format currently matches the |
| 4577 |
|
report format. This includes the script and files used to generate |
| 4578 |
|
reports of this format. It is *not* verified if the report format works |
| 4579 |
|
as expected by the user. |
| 4580 |
|
|
| 4581 |
|
Arguments: |
| 4582 |
|
report_format_id: UUID of the report format to be verified |
| 4583 |
|
or ReportFormatType (enum) |
| 4584 |
|
|
| 4585 |
|
Returns: |
| 4586 |
|
The response. See :py:meth:`send_command` for details. |
| 4587 |
|
""" |
| 4588 |
|
if not report_format_id: |
| 4589 |
|
raise RequiredArgument( |
| 4590 |
|
function=self.verify_report_format.__name__, |
| 4591 |
|
argument='report_format_id', |
| 4592 |
|
) |
| 4593 |
|
|
| 4594 |
|
cmd = XmlCommand("verify_report_format") |
| 4595 |
|
|
| 4596 |
|
if isinstance(report_format_id, ReportFormatType): |
| 4597 |
|
report_format_id = report_format_id.value |
| 4598 |
|
|
| 4599 |
|
cmd.set_attribute("report_format_id", report_format_id) |
| 4600 |
|
|
| 4601 |
|
return self._send_xml_command(cmd) |
| 4602 |
|
|
| 4603 |
|
def verify_scanner(self, scanner_id: str) -> Any: |
| 4604 |
|
"""Verify an existing scanner |
|
@@ 3442-3469 (lines=28) @@
|
| 3439 |
|
|
| 3440 |
|
return self._send_xml_command(cmd) |
| 3441 |
|
|
| 3442 |
|
def get_report_format( |
| 3443 |
|
self, report_format_id: Union[str, ReportFormatType] |
| 3444 |
|
) -> Any: |
| 3445 |
|
"""Request a single report format |
| 3446 |
|
|
| 3447 |
|
Arguments: |
| 3448 |
|
report_format_id: UUID of an existing report format |
| 3449 |
|
or ReportFormatType (enum) |
| 3450 |
|
|
| 3451 |
|
Returns: |
| 3452 |
|
The response. See :py:meth:`send_command` for details. |
| 3453 |
|
""" |
| 3454 |
|
cmd = XmlCommand("get_report_formats") |
| 3455 |
|
|
| 3456 |
|
if not report_format_id: |
| 3457 |
|
raise RequiredArgument( |
| 3458 |
|
function=self.get_report_format.__name__, |
| 3459 |
|
argument='report_format_id', |
| 3460 |
|
) |
| 3461 |
|
|
| 3462 |
|
if isinstance(report_format_id, ReportFormatType): |
| 3463 |
|
report_format_id = report_format_id.value |
| 3464 |
|
|
| 3465 |
|
cmd.set_attribute("report_format_id", report_format_id) |
| 3466 |
|
|
| 3467 |
|
# for single entity always request all details |
| 3468 |
|
cmd.set_attribute("details", "1") |
| 3469 |
|
return self._send_xml_command(cmd) |
| 3470 |
|
|
| 3471 |
|
def get_roles( |
| 3472 |
|
self, |