@@ 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( |
@@ 1544-1580 (lines=37) @@ | ||
1541 | ||
1542 | return self._send_xml_command(cmd) |
|
1543 | ||
1544 | def get_configs( |
|
1545 | self, |
|
1546 | *, |
|
1547 | filter: Optional[str] = None, |
|
1548 | filter_id: Optional[str] = None, |
|
1549 | trash: Optional[bool] = None, |
|
1550 | details: Optional[bool] = None, |
|
1551 | families: Optional[bool] = None, |
|
1552 | preferences: Optional[bool] = None, |
|
1553 | tasks: Optional[bool] = None, |
|
1554 | ) -> Any: |
|
1555 | """Request a list of scan configs |
|
1556 | ||
1557 | Arguments: |
|
1558 | filter: Filter term to use for the query |
|
1559 | filter_id: UUID of an existing filter to use for the query |
|
1560 | trash: Whether to get the trashcan scan configs instead |
|
1561 | details: Whether to get config families, preferences, nvt selectors |
|
1562 | and tasks. |
|
1563 | families: Whether to include the families if no details are |
|
1564 | requested |
|
1565 | preferences: Whether to include the preferences if no details are |
|
1566 | requested |
|
1567 | tasks: Whether to get tasks using this config |
|
1568 | ||
1569 | Returns: |
|
1570 | The response. See :py:meth:`send_command` for details. |
|
1571 | """ |
|
1572 | return self.__get_configs( |
|
1573 | UsageType.SCAN, |
|
1574 | filter=filter, |
|
1575 | filter_id=filter_id, |
|
1576 | trash=trash, |
|
1577 | details=details, |
|
1578 | families=families, |
|
1579 | preferences=preferences, |
|
1580 | tasks=tasks, |
|
1581 | ) |
|
1582 | ||
1583 | def get_policies( |