| @@ 1551-1587 (lines=37) @@ | ||
| 1548 | tasks=tasks, |
|
| 1549 | ) |
|
| 1550 | ||
| 1551 | def get_policies( |
|
| 1552 | self, |
|
| 1553 | *, |
|
| 1554 | audits: Optional[bool] = None, |
|
| 1555 | filter: Optional[str] = None, |
|
| 1556 | filter_id: Optional[str] = None, |
|
| 1557 | details: Optional[bool] = None, |
|
| 1558 | families: Optional[bool] = None, |
|
| 1559 | preferences: Optional[bool] = None, |
|
| 1560 | trash: Optional[bool] = None, |
|
| 1561 | ) -> Any: |
|
| 1562 | """Request a list of policies |
|
| 1563 | ||
| 1564 | Arguments: |
|
| 1565 | audits: Whether to get audits using the policy |
|
| 1566 | filter: Filter term to use for the query |
|
| 1567 | filter_id: UUID of an existing filter to use for the query |
|
| 1568 | details: Whether to get families, preferences, nvt selectors |
|
| 1569 | and tasks. |
|
| 1570 | families: Whether to include the families if no details are |
|
| 1571 | requested |
|
| 1572 | preferences: Whether to include the preferences if no details are |
|
| 1573 | requested |
|
| 1574 | trash: Whether to get the trashcan audits instead |
|
| 1575 | ||
| 1576 | Returns: |
|
| 1577 | The response. See :py:meth:`send_command` for details. |
|
| 1578 | """ |
|
| 1579 | return self.__get_configs( |
|
| 1580 | UsageType.POLICY, |
|
| 1581 | filter=filter, |
|
| 1582 | filter_id=filter_id, |
|
| 1583 | details=details, |
|
| 1584 | families=families, |
|
| 1585 | preferences=preferences, |
|
| 1586 | tasks=audits, |
|
| 1587 | trash=trash, |
|
| 1588 | ) |
|
| 1589 | ||
| 1590 | def get_config( |
|
| @@ 1424-1460 (lines=37) @@ | ||
| 1421 | tasks=tasks, |
|
| 1422 | ) |
|
| 1423 | ||
| 1424 | def get_policies( |
|
| 1425 | self, |
|
| 1426 | *, |
|
| 1427 | audits: Optional[bool] = None, |
|
| 1428 | filter: Optional[str] = None, |
|
| 1429 | filter_id: Optional[str] = None, |
|
| 1430 | details: Optional[bool] = None, |
|
| 1431 | families: Optional[bool] = None, |
|
| 1432 | preferences: Optional[bool] = None, |
|
| 1433 | trash: Optional[bool] = None, |
|
| 1434 | ) -> Any: |
|
| 1435 | """Request a list of policies |
|
| 1436 | ||
| 1437 | Arguments: |
|
| 1438 | audits: Whether to get audits using the policy |
|
| 1439 | filter: Filter term to use for the query |
|
| 1440 | filter_id: UUID of an existing filter to use for the query |
|
| 1441 | details: Whether to get families, preferences, nvt selectors |
|
| 1442 | and tasks. |
|
| 1443 | families: Whether to include the families if no details are |
|
| 1444 | requested |
|
| 1445 | preferences: Whether to include the preferences if no details are |
|
| 1446 | requested |
|
| 1447 | trash: Whether to get the trashcan audits instead |
|
| 1448 | ||
| 1449 | Returns: |
|
| 1450 | The response. See :py:meth:`send_command` for details. |
|
| 1451 | """ |
|
| 1452 | return self.__get_configs( |
|
| 1453 | UsageType.POLICY, |
|
| 1454 | filter=filter, |
|
| 1455 | filter_id=filter_id, |
|
| 1456 | details=details, |
|
| 1457 | families=families, |
|
| 1458 | preferences=preferences, |
|
| 1459 | tasks=audits, |
|
| 1460 | trash=trash, |
|
| 1461 | ) |
|
| 1462 | ||
| 1463 | def get_config( |
|