@@ 4666-4701 (lines=36) @@ | ||
4663 | ||
4664 | return self._send_xml_command(cmd) |
|
4665 | ||
4666 | def get_credentials( |
|
4667 | self, |
|
4668 | *, |
|
4669 | filter: Optional[str] = None, |
|
4670 | filter_id: Optional[str] = None, |
|
4671 | scanners: Optional[bool] = None, |
|
4672 | trash: Optional[bool] = None, |
|
4673 | targets: Optional[bool] = None, |
|
4674 | ) -> Any: |
|
4675 | """Request a list of credentials |
|
4676 | ||
4677 | Arguments: |
|
4678 | filter: Filter term to use for the query |
|
4679 | filter_id: UUID of an existing filter to use for the query |
|
4680 | scanners: Whether to include a list of scanners using the |
|
4681 | credentials |
|
4682 | trash: Whether to get the trashcan credentials instead |
|
4683 | targets: Whether to include a list of targets using the credentials |
|
4684 | ||
4685 | Returns: |
|
4686 | The response. See :py:meth:`send_command` for details. |
|
4687 | """ |
|
4688 | cmd = XmlCommand("get_credentials") |
|
4689 | ||
4690 | _add_filter(cmd, filter, filter_id) |
|
4691 | ||
4692 | if scanners is not None: |
|
4693 | cmd.set_attribute("scanners", _to_bool(scanners)) |
|
4694 | ||
4695 | if trash is not None: |
|
4696 | cmd.set_attribute("trash", _to_bool(trash)) |
|
4697 | ||
4698 | if targets is not None: |
|
4699 | cmd.set_attribute("targets", _to_bool(targets)) |
|
4700 | ||
4701 | return self._send_xml_command(cmd) |
|
4702 | ||
4703 | def get_credential( |
|
4704 | self, |
|
@@ 5110-5144 (lines=35) @@ | ||
5107 | cmd.set_attribute("permission_id", permission_id) |
|
5108 | return self._send_xml_command(cmd) |
|
5109 | ||
5110 | def get_port_lists( |
|
5111 | self, |
|
5112 | *, |
|
5113 | filter: Optional[str] = None, |
|
5114 | filter_id: Optional[str] = None, |
|
5115 | details: Optional[bool] = None, |
|
5116 | targets: Optional[bool] = None, |
|
5117 | trash: Optional[bool] = None, |
|
5118 | ) -> Any: |
|
5119 | """Request a list of port lists |
|
5120 | ||
5121 | Arguments: |
|
5122 | filter: Filter term to use for the query |
|
5123 | filter_id: UUID of an existing filter to use for the query |
|
5124 | details: Whether to include full port list details |
|
5125 | targets: Whether to include targets using this port list |
|
5126 | trash: Whether to get port lists in the trashcan instead |
|
5127 | ||
5128 | Returns: |
|
5129 | The response. See :py:meth:`send_command` for details. |
|
5130 | """ |
|
5131 | cmd = XmlCommand("get_port_lists") |
|
5132 | ||
5133 | _add_filter(cmd, filter, filter_id) |
|
5134 | ||
5135 | if details is not None: |
|
5136 | cmd.set_attribute("details", _to_bool(details)) |
|
5137 | ||
5138 | if targets is not None: |
|
5139 | cmd.set_attribute("targets", _to_bool(targets)) |
|
5140 | ||
5141 | if trash is not None: |
|
5142 | cmd.set_attribute("trash", _to_bool(trash)) |
|
5143 | ||
5144 | return self._send_xml_command(cmd) |
|
5145 | ||
5146 | def get_port_list(self, port_list_id: str): |
|
5147 | """Request a single port list |