| @@ 5259-5284 (lines=26) @@ | ||
| 5256 | cmd.set_attribute("details", "1") |
|
| 5257 | return self._send_xml_command(cmd) |
|
| 5258 | ||
| 5259 | def get_preferences( |
|
| 5260 | self, *, nvt_oid: Optional[str] = None, config_id: Optional[str] = None |
|
| 5261 | ) -> Any: |
|
| 5262 | """Request a list of preferences |
|
| 5263 | ||
| 5264 | When the command includes a config_id attribute, the preference element |
|
| 5265 | includes the preference name, type and value, and the NVT to which the |
|
| 5266 | preference applies. Otherwise, the preference element includes just the |
|
| 5267 | name and value, with the NVT and type built into the name. |
|
| 5268 | ||
| 5269 | Arguments: |
|
| 5270 | nvt_oid: OID of nvt |
|
| 5271 | config_id: UUID of scan config of which to show preference values |
|
| 5272 | ||
| 5273 | Returns: |
|
| 5274 | The response. See :py:meth:`send_command` for details. |
|
| 5275 | """ |
|
| 5276 | cmd = XmlCommand("get_preferences") |
|
| 5277 | ||
| 5278 | if nvt_oid: |
|
| 5279 | cmd.set_attribute("nvt_oid", nvt_oid) |
|
| 5280 | ||
| 5281 | if config_id: |
|
| 5282 | cmd.set_attribute("config_id", config_id) |
|
| 5283 | ||
| 5284 | return self._send_xml_command(cmd) |
|
| 5285 | ||
| 5286 | def get_preference( |
|
| 5287 | self, |
|
| @@ 3625-3650 (lines=26) @@ | ||
| 3622 | cmd.set_attribute("details", "1") |
|
| 3623 | return self._send_xml_command(cmd) |
|
| 3624 | ||
| 3625 | def get_preferences( |
|
| 3626 | self, *, nvt_oid: Optional[str] = None, config_id: Optional[str] = None |
|
| 3627 | ) -> Any: |
|
| 3628 | """Request a list of preferences |
|
| 3629 | ||
| 3630 | When the command includes a config_id attribute, the preference element |
|
| 3631 | includes the preference name, type and value, and the NVT to which the |
|
| 3632 | preference applies. Otherwise, the preference element includes just the |
|
| 3633 | name and value, with the NVT and type built into the name. |
|
| 3634 | ||
| 3635 | Arguments: |
|
| 3636 | nvt_oid: OID of nvt |
|
| 3637 | config_id: UUID of scan config of which to show preference values |
|
| 3638 | ||
| 3639 | Returns: |
|
| 3640 | The response. See :py:meth:`send_command` for details. |
|
| 3641 | """ |
|
| 3642 | cmd = XmlCommand("get_preferences") |
|
| 3643 | ||
| 3644 | if nvt_oid: |
|
| 3645 | cmd.set_attribute("nvt_oid", nvt_oid) |
|
| 3646 | ||
| 3647 | if config_id: |
|
| 3648 | cmd.set_attribute("config_id", config_id) |
|
| 3649 | ||
| 3650 | return self._send_xml_command(cmd) |
|
| 3651 | ||
| 3652 | def get_preference( |
|
| 3653 | self, |
|