@@ 3316-3345 (lines=30) @@ | ||
3313 | ||
3314 | return self._send_xml_command(cmd) |
|
3315 | ||
3316 | def get_notes( |
|
3317 | self, |
|
3318 | *, |
|
3319 | filter: Optional[str] = None, |
|
3320 | filter_id: Optional[str] = None, |
|
3321 | details: Optional[bool] = None, |
|
3322 | result: Optional[bool] = None |
|
3323 | ) -> Any: |
|
3324 | """Request a list of notes |
|
3325 | ||
3326 | Arguments: |
|
3327 | filter: Filter term to use for the query |
|
3328 | filter_id: UUID of an existing filter to use for the query |
|
3329 | details: Add info about connected results and tasks |
|
3330 | result: Return the details of possible connected results. |
|
3331 | ||
3332 | Returns: |
|
3333 | The response. See :py:meth:`send_command` for details. |
|
3334 | """ |
|
3335 | cmd = XmlCommand("get_notes") |
|
3336 | ||
3337 | _add_filter(cmd, filter, filter_id) |
|
3338 | ||
3339 | if details is not None: |
|
3340 | cmd.set_attribute("details", _to_bool(details)) |
|
3341 | ||
3342 | if result is not None: |
|
3343 | cmd.set_attribute("result", _to_bool(result)) |
|
3344 | ||
3345 | return self._send_xml_command(cmd) |
|
3346 | ||
3347 | def get_note(self, note_id: str) -> Any: |
|
3348 | """Request a single note |
|
@@ 3964-3994 (lines=31) @@ | ||
3961 | cmd.set_attribute("role_id", role_id) |
|
3962 | return self._send_xml_command(cmd) |
|
3963 | ||
3964 | def get_scanners( |
|
3965 | self, |
|
3966 | *, |
|
3967 | filter: Optional[str] = None, |
|
3968 | filter_id: Optional[str] = None, |
|
3969 | trash: Optional[bool] = None, |
|
3970 | details: Optional[bool] = None |
|
3971 | ) -> Any: |
|
3972 | """Request a list of scanners |
|
3973 | ||
3974 | Arguments: |
|
3975 | filter: Filter term to use for the query |
|
3976 | filter_id: UUID of an existing filter to use for the query |
|
3977 | trash: Whether to get the trashcan scanners instead |
|
3978 | details: Whether to include extra details like tasks using this |
|
3979 | scanner |
|
3980 | ||
3981 | Returns: |
|
3982 | The response. See :py:meth:`send_command` for details. |
|
3983 | """ |
|
3984 | cmd = XmlCommand("get_scanners") |
|
3985 | ||
3986 | _add_filter(cmd, filter, filter_id) |
|
3987 | ||
3988 | if trash is not None: |
|
3989 | cmd.set_attribute("trash", _to_bool(trash)) |
|
3990 | ||
3991 | if details is not None: |
|
3992 | cmd.set_attribute("details", _to_bool(details)) |
|
3993 | ||
3994 | return self._send_xml_command(cmd) |
|
3995 | ||
3996 | def get_scanner(self, scanner_id: str) -> Any: |
|
3997 | """Request a single scanner |
|
@@ 3470-3499 (lines=30) @@ | ||
3467 | ||
3468 | return self._send_xml_command(cmd) |
|
3469 | ||
3470 | def get_overrides( |
|
3471 | self, |
|
3472 | *, |
|
3473 | filter: Optional[str] = None, |
|
3474 | filter_id: Optional[str] = None, |
|
3475 | details: Optional[bool] = None, |
|
3476 | result: Optional[bool] = None |
|
3477 | ) -> Any: |
|
3478 | """Request a list of overrides |
|
3479 | ||
3480 | Arguments: |
|
3481 | filter: Filter term to use for the query |
|
3482 | filter_id: UUID of an existing filter to use for the query |
|
3483 | details: Whether to include full details |
|
3484 | result: Whether to include results using the override |
|
3485 | ||
3486 | Returns: |
|
3487 | The response. See :py:meth:`send_command` for details. |
|
3488 | """ |
|
3489 | cmd = XmlCommand("get_overrides") |
|
3490 | ||
3491 | _add_filter(cmd, filter, filter_id) |
|
3492 | ||
3493 | if details is not None: |
|
3494 | cmd.set_attribute("details", _to_bool(details)) |
|
3495 | ||
3496 | if result is not None: |
|
3497 | cmd.set_attribute("result", _to_bool(result)) |
|
3498 | ||
3499 | return self._send_xml_command(cmd) |
|
3500 | ||
3501 | def get_override(self, override_id: str) -> Any: |
|
3502 | """Request a single override |
@@ 661-693 (lines=33) @@ | ||
658 | ||
659 | return self._send_xml_command(cmd) |
|
660 | ||
661 | def get_tls_certificates( |
|
662 | self, |
|
663 | *, |
|
664 | filter: Optional[str] = None, |
|
665 | filter_id: Optional[str] = None, |
|
666 | include_certificate_data: Optional[bool] = None, |
|
667 | details: Optional[bool] = None |
|
668 | ) -> Any: |
|
669 | """Request a list of TLS certificates |
|
670 | ||
671 | Arguments: |
|
672 | filter: Filter term to use for the query |
|
673 | filter_id: UUID of an existing filter to use for the query |
|
674 | include_certificate_data: Whether to include the certificate data in |
|
675 | the response |
|
676 | ||
677 | Returns: |
|
678 | The response. See :py:meth:`send_command` for details. |
|
679 | """ |
|
680 | ||
681 | cmd = XmlCommand("get_tls_certificates") |
|
682 | ||
683 | _add_filter(cmd, filter, filter_id) |
|
684 | ||
685 | if details is not None: |
|
686 | cmd.set_attribute("details", _to_bool(details)) |
|
687 | ||
688 | if include_certificate_data is not None: |
|
689 | cmd.set_attribute( |
|
690 | "include_certificate_data", _to_bool(include_certificate_data) |
|
691 | ) |
|
692 | ||
693 | return self._send_xml_command(cmd) |
|
694 | ||
695 | def get_tls_certificate(self, tls_certificate_id: str) -> Any: |
|
696 | """Request a single TLS certificate |