@@ 1633-1651 (lines=19) @@ | ||
1630 | ||
1631 | return self._send_xml_command(cmd) |
|
1632 | ||
1633 | def delete_policy( |
|
1634 | self, policy_id: str, *, ultimate: Optional[bool] = False |
|
1635 | ) -> Any: |
|
1636 | """Deletes an existing policy |
|
1637 | ||
1638 | Arguments: |
|
1639 | policy_id: UUID of the policy to be deleted. |
|
1640 | ultimate: Whether to remove entirely, or to the trashcan. |
|
1641 | """ |
|
1642 | if not policy_id: |
|
1643 | raise RequiredArgument( |
|
1644 | function=self.delete_policy.__name__, argument='policy_id' |
|
1645 | ) |
|
1646 | ||
1647 | cmd = XmlCommand("delete_config") |
|
1648 | cmd.set_attribute("config_id", policy_id) |
|
1649 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
1650 | ||
1651 | return self._send_xml_command(cmd) |
|
1652 | ||
1653 | def delete_tls_certificate(self, tls_certificate_id: str) -> Any: |
|
1654 | """Deletes an existing tls certificate |
@@ 1792-1810 (lines=19) @@ | ||
1789 | ||
1790 | return self._send_xml_command(cmd) |
|
1791 | ||
1792 | def delete_policy( |
|
1793 | self, policy_id: str, *, ultimate: Optional[bool] = False |
|
1794 | ) -> Any: |
|
1795 | """Deletes an existing policy |
|
1796 | ||
1797 | Arguments: |
|
1798 | policy_id: UUID of the policy to be deleted. |
|
1799 | ultimate: Whether to remove entirely, or to the trashcan. |
|
1800 | """ |
|
1801 | if not policy_id: |
|
1802 | raise RequiredArgument( |
|
1803 | function=self.delete_policy.__name__, argument='policy_id' |
|
1804 | ) |
|
1805 | ||
1806 | cmd = XmlCommand("delete_config") |
|
1807 | cmd.set_attribute("config_id", policy_id) |
|
1808 | cmd.set_attribute("ultimate", _to_bool(ultimate)) |
|
1809 | ||
1810 | return self._send_xml_command(cmd) |
|
1811 | ||
1812 | def delete_tls_certificate(self, tls_certificate_id: str) -> Any: |
|
1813 | """Deletes an existing tls certificate |