| @@ 455-487 (lines=33) @@ | ||
| 452 | ||
| 453 | return self._send_xml_command(cmd) |
|
| 454 | ||
| 455 | def get_tls_certificates( |
|
| 456 | self, |
|
| 457 | *, |
|
| 458 | filter: Optional[str] = None, |
|
| 459 | filter_id: Optional[str] = None, |
|
| 460 | include_certificate_data: Optional[bool] = None, |
|
| 461 | details: Optional[bool] = None |
|
| 462 | ) -> Any: |
|
| 463 | """Request a list of TLS certificates |
|
| 464 | ||
| 465 | Arguments: |
|
| 466 | filter: Filter term to use for the query |
|
| 467 | filter_id: UUID of an existing filter to use for the query |
|
| 468 | include_certificate_data: Whether to include the certificate data in |
|
| 469 | the response |
|
| 470 | ||
| 471 | Returns: |
|
| 472 | The response. See :py:meth:`send_command` for details. |
|
| 473 | """ |
|
| 474 | ||
| 475 | cmd = XmlCommand("get_tls_certificates") |
|
| 476 | ||
| 477 | _add_filter(cmd, filter, filter_id) |
|
| 478 | ||
| 479 | if details is not None: |
|
| 480 | cmd.set_attribute("details", _to_bool(details)) |
|
| 481 | ||
| 482 | if include_certificate_data is not None: |
|
| 483 | cmd.set_attribute( |
|
| 484 | "include_certificate_data", _to_bool(include_certificate_data) |
|
| 485 | ) |
|
| 486 | ||
| 487 | return self._send_xml_command(cmd) |
|
| 488 | ||
| 489 | def get_tls_certificate(self, tls_certificate_id: str) -> Any: |
|
| 490 | """Request a single TLS certificate |
|
| @@ 3887-3917 (lines=31) @@ | ||
| 3884 | cmd.set_attribute("role_id", role_id) |
|
| 3885 | return self._send_xml_command(cmd) |
|
| 3886 | ||
| 3887 | def get_scanners( |
|
| 3888 | self, |
|
| 3889 | *, |
|
| 3890 | filter: Optional[str] = None, |
|
| 3891 | filter_id: Optional[str] = None, |
|
| 3892 | trash: Optional[bool] = None, |
|
| 3893 | details: Optional[bool] = None |
|
| 3894 | ) -> Any: |
|
| 3895 | """Request a list of scanners |
|
| 3896 | ||
| 3897 | Arguments: |
|
| 3898 | filter: Filter term to use for the query |
|
| 3899 | filter_id: UUID of an existing filter to use for the query |
|
| 3900 | trash: Whether to get the trashcan scanners instead |
|
| 3901 | details: Whether to include extra details like tasks using this |
|
| 3902 | scanner |
|
| 3903 | ||
| 3904 | Returns: |
|
| 3905 | The response. See :py:meth:`send_command` for details. |
|
| 3906 | """ |
|
| 3907 | cmd = XmlCommand("get_scanners") |
|
| 3908 | ||
| 3909 | _add_filter(cmd, filter, filter_id) |
|
| 3910 | ||
| 3911 | if trash is not None: |
|
| 3912 | cmd.set_attribute("trash", _to_bool(trash)) |
|
| 3913 | ||
| 3914 | if details is not None: |
|
| 3915 | cmd.set_attribute("details", _to_bool(details)) |
|
| 3916 | ||
| 3917 | return self._send_xml_command(cmd) |
|
| 3918 | ||
| 3919 | def get_scanner(self, scanner_id: str) -> Any: |
|
| 3920 | """Request a single scanner |
|
| @@ 3404-3433 (lines=30) @@ | ||
| 3401 | ||
| 3402 | return self._send_xml_command(cmd) |
|
| 3403 | ||
| 3404 | def get_overrides( |
|
| 3405 | self, |
|
| 3406 | *, |
|
| 3407 | filter: Optional[str] = None, |
|
| 3408 | filter_id: Optional[str] = None, |
|
| 3409 | details: Optional[bool] = None, |
|
| 3410 | result: Optional[bool] = None |
|
| 3411 | ) -> Any: |
|
| 3412 | """Request a list of overrides |
|
| 3413 | ||
| 3414 | Arguments: |
|
| 3415 | filter: Filter term to use for the query |
|
| 3416 | filter_id: UUID of an existing filter to use for the query |
|
| 3417 | details: Whether to include full details |
|
| 3418 | result: Whether to include results using the override |
|
| 3419 | ||
| 3420 | Returns: |
|
| 3421 | The response. See :py:meth:`send_command` for details. |
|
| 3422 | """ |
|
| 3423 | cmd = XmlCommand("get_overrides") |
|
| 3424 | ||
| 3425 | _add_filter(cmd, filter, filter_id) |
|
| 3426 | ||
| 3427 | if details is not None: |
|
| 3428 | cmd.set_attribute("details", _to_bool(details)) |
|
| 3429 | ||
| 3430 | if result is not None: |
|
| 3431 | cmd.set_attribute("result", _to_bool(result)) |
|
| 3432 | ||
| 3433 | return self._send_xml_command(cmd) |
|
| 3434 | ||
| 3435 | def get_override(self, override_id: str) -> Any: |
|
| 3436 | """Request a single override |
|
| @@ 3253-3282 (lines=30) @@ | ||
| 3250 | ||
| 3251 | return self._send_xml_command(cmd) |
|
| 3252 | ||
| 3253 | def get_notes( |
|
| 3254 | self, |
|
| 3255 | *, |
|
| 3256 | filter: Optional[str] = None, |
|
| 3257 | filter_id: Optional[str] = None, |
|
| 3258 | details: Optional[bool] = None, |
|
| 3259 | result: Optional[bool] = None |
|
| 3260 | ) -> Any: |
|
| 3261 | """Request a list of notes |
|
| 3262 | ||
| 3263 | Arguments: |
|
| 3264 | filter: Filter term to use for the query |
|
| 3265 | filter_id: UUID of an existing filter to use for the query |
|
| 3266 | details: Add info about connected results and tasks |
|
| 3267 | result: Return the details of possible connected results. |
|
| 3268 | ||
| 3269 | Returns: |
|
| 3270 | The response. See :py:meth:`send_command` for details. |
|
| 3271 | """ |
|
| 3272 | cmd = XmlCommand("get_notes") |
|
| 3273 | ||
| 3274 | _add_filter(cmd, filter, filter_id) |
|
| 3275 | ||
| 3276 | if details is not None: |
|
| 3277 | cmd.set_attribute("details", _to_bool(details)) |
|
| 3278 | ||
| 3279 | if result is not None: |
|
| 3280 | cmd.set_attribute("result", _to_bool(result)) |
|
| 3281 | ||
| 3282 | return self._send_xml_command(cmd) |
|
| 3283 | ||
| 3284 | def get_note(self, note_id: str) -> Any: |
|
| 3285 | """Request a single note |
|