From 0701984053e8d7e3e948f91c05601bf40de8b1e9 Mon Sep 17 00:00:00 2001 From: Alexander Tomokhov Date: Tue, 12 Dec 2023 13:30:28 +0400 Subject: [PATCH] rename jitsi to jitsi-meet --- selfprivacy_api/services/__init__.py | 4 +-- .../services/{jitsi => jitsimeet}/__init__.py | 32 +++++++++---------- .../services/{jitsi => jitsimeet}/icon.py | 0 tests/test_graphql/test_system/turned_on.json | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) rename selfprivacy_api/services/{jitsi => jitsimeet}/__init__.py (80%) rename selfprivacy_api/services/{jitsi => jitsimeet}/icon.py (100%) diff --git a/selfprivacy_api/services/__init__.py b/selfprivacy_api/services/__init__.py index 02bb1d3..2f30636 100644 --- a/selfprivacy_api/services/__init__.py +++ b/selfprivacy_api/services/__init__.py @@ -3,7 +3,7 @@ import typing from selfprivacy_api.services.bitwarden import Bitwarden from selfprivacy_api.services.gitea import Gitea -from selfprivacy_api.services.jitsi import Jitsi +from selfprivacy_api.services.jitsimeet import JitsiMeet from selfprivacy_api.services.mailserver import MailServer from selfprivacy_api.services.nextcloud import Nextcloud from selfprivacy_api.services.pleroma import Pleroma @@ -18,7 +18,7 @@ services: list[Service] = [ Nextcloud(), Pleroma(), Ocserv(), - Jitsi(), + JitsiMeet(), ] diff --git a/selfprivacy_api/services/jitsi/__init__.py b/selfprivacy_api/services/jitsimeet/__init__.py similarity index 80% rename from selfprivacy_api/services/jitsi/__init__.py rename to selfprivacy_api/services/jitsimeet/__init__.py index e2b644d..d53049b 100644 --- a/selfprivacy_api/services/jitsi/__init__.py +++ b/selfprivacy_api/services/jitsimeet/__init__.py @@ -1,4 +1,4 @@ -"""Class representing Jitsi service""" +"""Class representing Jitsi Meet service""" import base64 import subprocess import typing @@ -11,26 +11,26 @@ from selfprivacy_api.services.service import Service, ServiceDnsRecord, ServiceS from selfprivacy_api.utils import ReadUserData, WriteUserData, get_domain from selfprivacy_api.utils.block_devices import BlockDevice import selfprivacy_api.utils.network as network_utils -from selfprivacy_api.services.jitsi.icon import JITSI_ICON +from selfprivacy_api.services.jitsimeet.icon import JITSI_ICON -class Jitsi(Service): - """Class representing Jitsi service""" +class JitsiMeet(Service): + """Class representing Jitsi Meet service""" @staticmethod def get_id() -> str: """Return service id.""" - return "jitsi" + return "jitsi-meet" @staticmethod def get_display_name() -> str: """Return service display name.""" - return "Jitsi" + return "JitsiMeet" @staticmethod def get_description() -> str: """Return service description.""" - return "Jitsi is a free and open-source video conferencing solution." + return "Jitsi Meet is a free and open-source video conferencing solution." @staticmethod def get_svg_icon() -> str: @@ -58,7 +58,7 @@ class Jitsi(Service): @staticmethod def is_enabled() -> bool: with ReadUserData() as user_data: - return user_data.get("modules", {}).get("jitsi", {}).get("enable", False) + return user_data.get("modules", {}).get("jitsi-meet", {}).get("enable", False) @staticmethod def get_status() -> ServiceStatus: @@ -68,13 +68,13 @@ class Jitsi(Service): @staticmethod def enable(): - """Enable Jitsi service.""" + """Enable Jitsi Meet service.""" with WriteUserData() as user_data: if "modules" not in user_data: user_data["modules"] = {} - if "jitsi" not in user_data["modules"]: - user_data["modules"]["jitsi"] = {} - user_data["modules"]["jitsi"]["enable"] = True + if "jitsi-meet" not in user_data["modules"]: + user_data["modules"]["jitsi-meet"] = {} + user_data["modules"]["jitsi-meet"]["enable"] = True @staticmethod def disable(): @@ -82,9 +82,9 @@ class Jitsi(Service): with WriteUserData() as user_data: if "modules" not in user_data: user_data["modules"] = {} - if "jitsi" not in user_data["modules"]: - user_data["modules"]["jitsi"] = {} - user_data["modules"]["jitsi"]["enable"] = False + if "jitsi-meet" not in user_data["modules"]: + user_data["modules"]["jitsi-meet"] = {} + user_data["modules"]["jitsi-meet"]["enable"] = False @staticmethod def stop(): @@ -146,4 +146,4 @@ class Jitsi(Service): ] def move_to_volume(self, volume: BlockDevice) -> Job: - raise NotImplementedError("jitsi service is not movable") + raise NotImplementedError("jitsi-meet service is not movable") diff --git a/selfprivacy_api/services/jitsi/icon.py b/selfprivacy_api/services/jitsimeet/icon.py similarity index 100% rename from selfprivacy_api/services/jitsi/icon.py rename to selfprivacy_api/services/jitsimeet/icon.py diff --git a/tests/test_graphql/test_system/turned_on.json b/tests/test_graphql/test_system/turned_on.json index 68cd37e..dac629c 100644 --- a/tests/test_graphql/test_system/turned_on.json +++ b/tests/test_graphql/test_system/turned_on.json @@ -47,7 +47,7 @@ "pleroma": { "enable": true }, - "jitsi": { + "jitsi-meet": { "enable": true }, "simple-nixos-mailserver": {