@@ 1613-1631 (lines=19) @@ | ||
1610 | cmd.add_element("copy", policy_id) |
|
1611 | return self._send_xml_command(cmd) |
|
1612 | ||
1613 | def delete_audit( |
|
1614 | self, audit_id: str, *, ultimate: Optional[bool] = False |
|
1615 | ) -> Any: |
|
1616 | """Deletes an existing audit |
|
1617 | ||
1618 | Arguments: |
|
1619 | audit_id: UUID of the audit to be deleted. |
|
1620 | ultimate: Whether to remove entirely, or to the trashcan. |
|
1621 | """ |
|
1622 | if not audit_id: |
|
1623 | raise RequiredArgument( |
|
1624 | function=self.delete_audit.__name__, argument='audit_id' |
|
1625 | ) |
|
1626 | ||
1627 | cmd = XmlCommand("delete_task") |
|
1628 | cmd.set_attribute("task_id", audit_id) |
|
1629 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
1630 | ||
1631 | return self._send_xml_command(cmd) |
|
1632 | ||
1633 | def delete_policy( |
|
1634 | self, policy_id: str, *, ultimate: Optional[bool] = False |
@@ 1772-1790 (lines=19) @@ | ||
1769 | cmd.add_element("copy", policy_id) |
|
1770 | return self._send_xml_command(cmd) |
|
1771 | ||
1772 | def delete_audit( |
|
1773 | self, audit_id: str, *, ultimate: Optional[bool] = False |
|
1774 | ) -> Any: |
|
1775 | """Deletes an existing audit |
|
1776 | ||
1777 | Arguments: |
|
1778 | audit_id: UUID of the audit to be deleted. |
|
1779 | ultimate: Whether to remove entirely, or to the trashcan. |
|
1780 | """ |
|
1781 | if not audit_id: |
|
1782 | raise RequiredArgument( |
|
1783 | function=self.delete_audit.__name__, argument='audit_id' |
|
1784 | ) |
|
1785 | ||
1786 | cmd = XmlCommand("delete_task") |
|
1787 | cmd.set_attribute("task_id", audit_id) |
|
1788 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
1789 | ||
1790 | return self._send_xml_command(cmd) |
|
1791 | ||
1792 | def delete_policy( |
|
1793 | self, policy_id: str, *, ultimate: Optional[bool] = False |