coturn: Completely uninstall app

Tests:

* Verify from the UI that after reinstalling the app a new secret is generated
* Functional tests passed

Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, make uninstall fail-safe]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
nbenedek authored and Sunil Mohan Adapa committed 2023-04-11 10:04:16 +05:30
1 parent 3d71869211
commit db2d42c5ac
2 files changed
+11

No files matched your search

+5
View File
@@ -114,6 +114,11 @@ class CoturnApp(app_module.App):
self.get_component('letsencrypt-coturn').setup_certificates()
notify_configuration_change()
def uninstall(self):
"""De-configure and uninstall the app."""
super().uninstall()
privileged.uninstall()
def get_available_domains():
"""Return an iterator with all domains able to have a certificate."""
+6
View File
@@ -89,3 +89,9 @@ def augeas_load():
aug.load()
return aug
@privileged
def uninstall():
"""Remove configuration file."""
CONFIG_FILE.unlink(missing_ok=True)