#2888: Add ConfigSchema to Services.

This commit is contained in:
Nick Todd
2024-12-10 16:58:28 +00:00
parent 7dd25f18f6
commit 66f775da4d
11 changed files with 101 additions and 5 deletions

View File

@@ -24,6 +24,8 @@ class DatabaseService(Service):
This class inherits from the `Service` class and provides methods to simulate a SQL database.
"""
config: "DatabaseService.ConfigSchema"
password: Optional[str] = None
"""Password that needs to be provided by clients if they want to connect to the DatabaseService."""
@@ -36,6 +38,11 @@ class DatabaseService(Service):
latest_backup_file_name: str = None
"""File name of latest backup."""
class ConfigSchema(Service.ConfigSchema):
"""ConfigSchema for DatabaseService."""
type: str = "DATABASESERVICE"
def __init__(self, **kwargs):
kwargs["name"] = "DatabaseService"
kwargs["port"] = PORT_LOOKUP["POSTGRES_SERVER"]