@@ 1512-1548 (lines=37) @@ | ||
1509 | ||
1510 | return self._send_xml_command(cmd) |
|
1511 | ||
1512 | def get_configs( |
|
1513 | self, |
|
1514 | *, |
|
1515 | filter: Optional[str] = None, |
|
1516 | filter_id: Optional[str] = None, |
|
1517 | trash: Optional[bool] = None, |
|
1518 | details: Optional[bool] = None, |
|
1519 | families: Optional[bool] = None, |
|
1520 | preferences: Optional[bool] = None, |
|
1521 | tasks: Optional[bool] = None, |
|
1522 | ) -> Any: |
|
1523 | """Request a list of scan configs |
|
1524 | ||
1525 | Arguments: |
|
1526 | filter: Filter term to use for the query |
|
1527 | filter_id: UUID of an existing filter to use for the query |
|
1528 | trash: Whether to get the trashcan scan configs instead |
|
1529 | details: Whether to get config families, preferences, nvt selectors |
|
1530 | and tasks. |
|
1531 | families: Whether to include the families if no details are |
|
1532 | requested |
|
1533 | preferences: Whether to include the preferences if no details are |
|
1534 | requested |
|
1535 | tasks: Whether to get tasks using this config |
|
1536 | ||
1537 | Returns: |
|
1538 | The response. See :py:meth:`send_command` for details. |
|
1539 | """ |
|
1540 | return self.__get_configs( |
|
1541 | UsageType.SCAN, |
|
1542 | filter=filter, |
|
1543 | filter_id=filter_id, |
|
1544 | trash=trash, |
|
1545 | details=details, |
|
1546 | families=families, |
|
1547 | preferences=preferences, |
|
1548 | tasks=tasks, |
|
1549 | ) |
|
1550 | ||
1551 | def get_policies( |
@@ 1385-1421 (lines=37) @@ | ||
1382 | ||
1383 | return self._send_xml_command(cmd) |
|
1384 | ||
1385 | def get_configs( |
|
1386 | self, |
|
1387 | *, |
|
1388 | filter: Optional[str] = None, |
|
1389 | filter_id: Optional[str] = None, |
|
1390 | trash: Optional[bool] = None, |
|
1391 | details: Optional[bool] = None, |
|
1392 | families: Optional[bool] = None, |
|
1393 | preferences: Optional[bool] = None, |
|
1394 | tasks: Optional[bool] = None, |
|
1395 | ) -> Any: |
|
1396 | """Request a list of scan configs |
|
1397 | ||
1398 | Arguments: |
|
1399 | filter: Filter term to use for the query |
|
1400 | filter_id: UUID of an existing filter to use for the query |
|
1401 | trash: Whether to get the trashcan scan configs instead |
|
1402 | details: Whether to get config families, preferences, nvt selectors |
|
1403 | and tasks. |
|
1404 | families: Whether to include the families if no details are |
|
1405 | requested |
|
1406 | preferences: Whether to include the preferences if no details are |
|
1407 | requested |
|
1408 | tasks: Whether to get tasks using this config |
|
1409 | ||
1410 | Returns: |
|
1411 | The response. See :py:meth:`send_command` for details. |
|
1412 | """ |
|
1413 | return self.__get_configs( |
|
1414 | UsageType.SCAN, |
|
1415 | filter=filter, |
|
1416 | filter_id=filter_id, |
|
1417 | trash=trash, |
|
1418 | details=details, |
|
1419 | families=families, |
|
1420 | preferences=preferences, |
|
1421 | tasks=tasks, |
|
1422 | ) |
|
1423 | ||
1424 | def get_policies( |