| @@ 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( |
|
| @@ 1583-1619 (lines=37) @@ | ||
| 1580 | tasks=tasks, |
|
| 1581 | ) |
|
| 1582 | ||
| 1583 | def get_policies( |
|
| 1584 | self, |
|
| 1585 | *, |
|
| 1586 | audits: Optional[bool] = None, |
|
| 1587 | filter: Optional[str] = None, |
|
| 1588 | filter_id: Optional[str] = None, |
|
| 1589 | details: Optional[bool] = None, |
|
| 1590 | families: Optional[bool] = None, |
|
| 1591 | preferences: Optional[bool] = None, |
|
| 1592 | trash: Optional[bool] = None, |
|
| 1593 | ) -> Any: |
|
| 1594 | """Request a list of policies |
|
| 1595 | ||
| 1596 | Arguments: |
|
| 1597 | audits: Whether to get audits using the policy |
|
| 1598 | filter: Filter term to use for the query |
|
| 1599 | filter_id: UUID of an existing filter to use for the query |
|
| 1600 | details: Whether to get families, preferences, nvt selectors |
|
| 1601 | and tasks. |
|
| 1602 | families: Whether to include the families if no details are |
|
| 1603 | requested |
|
| 1604 | preferences: Whether to include the preferences if no details are |
|
| 1605 | requested |
|
| 1606 | trash: Whether to get the trashcan audits instead |
|
| 1607 | ||
| 1608 | Returns: |
|
| 1609 | The response. See :py:meth:`send_command` for details. |
|
| 1610 | """ |
|
| 1611 | return self.__get_configs( |
|
| 1612 | UsageType.POLICY, |
|
| 1613 | filter=filter, |
|
| 1614 | filter_id=filter_id, |
|
| 1615 | details=details, |
|
| 1616 | families=families, |
|
| 1617 | preferences=preferences, |
|
| 1618 | tasks=audits, |
|
| 1619 | trash=trash, |
|
| 1620 | ) |
|
| 1621 | ||
| 1622 | def get_config( |
|