| @@ 207-241 (lines=35) @@ | ||
| 204 | ||
| 205 | return self._send_xml_command(cmd) |
|
| 206 | ||
| 207 | def get_port_lists( |
|
| 208 | self, |
|
| 209 | *, |
|
| 210 | filter: Optional[str] = None, |
|
| 211 | filter_id: Optional[str] = None, |
|
| 212 | details: Optional[bool] = None, |
|
| 213 | targets: Optional[bool] = None, |
|
| 214 | trash: Optional[bool] = None, |
|
| 215 | ) -> Any: |
|
| 216 | """Request a list of port lists |
|
| 217 | ||
| 218 | Arguments: |
|
| 219 | filter: Filter term to use for the query |
|
| 220 | filter_id: UUID of an existing filter to use for the query |
|
| 221 | details: Whether to include full port list details |
|
| 222 | targets: Whether to include targets using this port list |
|
| 223 | trash: Whether to get port lists in the trashcan instead |
|
| 224 | ||
| 225 | Returns: |
|
| 226 | The response. See :py:meth:`send_command` for details. |
|
| 227 | """ |
|
| 228 | cmd = XmlCommand("get_port_lists") |
|
| 229 | ||
| 230 | add_filter(cmd, filter, filter_id) |
|
| 231 | ||
| 232 | if details is not None: |
|
| 233 | cmd.set_attribute("details", to_bool(details)) |
|
| 234 | ||
| 235 | if targets is not None: |
|
| 236 | cmd.set_attribute("targets", to_bool(targets)) |
|
| 237 | ||
| 238 | if trash is not None: |
|
| 239 | cmd.set_attribute("trash", to_bool(trash)) |
|
| 240 | ||
| 241 | return self._send_xml_command(cmd) |
|
| 242 | ||
| 243 | def get_port_list(self, port_list_id: str): |
|
| 244 | """Request a single port list |
|
| @@ 3102-3137 (lines=36) @@ | ||
| 3099 | """ |
|
| 3100 | return self._send_xml_command(XmlCommand("empty_trashcan")) |
|
| 3101 | ||
| 3102 | def get_credentials( |
|
| 3103 | self, |
|
| 3104 | *, |
|
| 3105 | filter: Optional[str] = None, |
|
| 3106 | filter_id: Optional[str] = None, |
|
| 3107 | scanners: Optional[bool] = None, |
|
| 3108 | trash: Optional[bool] = None, |
|
| 3109 | targets: Optional[bool] = None, |
|
| 3110 | ) -> Any: |
|
| 3111 | """Request a list of credentials |
|
| 3112 | ||
| 3113 | Arguments: |
|
| 3114 | filter: Filter term to use for the query |
|
| 3115 | filter_id: UUID of an existing filter to use for the query |
|
| 3116 | scanners: Whether to include a list of scanners using the |
|
| 3117 | credentials |
|
| 3118 | trash: Whether to get the trashcan credentials instead |
|
| 3119 | targets: Whether to include a list of targets using the credentials |
|
| 3120 | ||
| 3121 | Returns: |
|
| 3122 | The response. See :py:meth:`send_command` for details. |
|
| 3123 | """ |
|
| 3124 | cmd = XmlCommand("get_credentials") |
|
| 3125 | ||
| 3126 | add_filter(cmd, filter, filter_id) |
|
| 3127 | ||
| 3128 | if scanners is not None: |
|
| 3129 | cmd.set_attribute("scanners", to_bool(scanners)) |
|
| 3130 | ||
| 3131 | if trash is not None: |
|
| 3132 | cmd.set_attribute("trash", to_bool(trash)) |
|
| 3133 | ||
| 3134 | if targets is not None: |
|
| 3135 | cmd.set_attribute("targets", to_bool(targets)) |
|
| 3136 | ||
| 3137 | return self._send_xml_command(cmd) |
|
| 3138 | ||
| 3139 | def get_credential( |
|
| 3140 | self, |
|