Commit 28bf3f04 authored by George Papathanail's avatar George Papathanail
Browse files

feat: add appDeployment domain model for multi-zone deployments

parent b28c0dd4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ from open_exposure_gateway.domain.models.callbacks import (
    CallbackDelivery,
    CallbackRegistration,
)
from open_exposure_gateway.domain.models.deployments import AppDeployment, AppDeploymentState
from open_exposure_gateway.domain.models.instances import AppInstance, AppInstanceState
from open_exposure_gateway.domain.models.operations import (
    Operation,
@@ -16,6 +17,8 @@ from open_exposure_gateway.domain.models.registration import (
)

__all__ = [
    "AppDeployment",
    "AppDeploymentState",
    "AppInstance",
    "AppInstanceState",
    "AppRegistration",
+4 −0
Original line number Diff line number Diff line
from open_exposure_gateway.domain.models.deployments.enums import AppDeploymentState
from open_exposure_gateway.domain.models.deployments.models import AppDeployment

__all__ = ["AppDeployment", "AppDeploymentState"]
+10 −0
Original line number Diff line number Diff line
from enum import StrEnum


class AppDeploymentState(StrEnum):
    INSTANTIATING = "instantiating"
    READY = "ready"
    PARTIAL = "partial"
    FAILED = "failed"
    TERMINATING = "terminating"
    TERMINATED = "terminated"
+17 −0
Original line number Diff line number Diff line
from datetime import datetime
from uuid import UUID

from pydantic import BaseModel

from open_exposure_gateway.domain.models.deployments.enums import AppDeploymentState


class AppDeployment(BaseModel):
    app_deployment_id: UUID
    operation_id: UUID
    app_registration_id: UUID
    app_deployment_name: str
    edge_cloud_zones: list[UUID]
    state: AppDeploymentState
    created_at: datetime | None = None
    updated_at: datetime | None = None