Improved hosting

This commit is contained in:
2020-11-26 11:20:21 +01:00
parent 5faac76c32
commit ead0eae5f0
19 changed files with 124 additions and 37 deletions

View File

@@ -1,2 +1,3 @@
# imports:
from .application_host_base import ApplicationHostBase
from .environment_base import EnvironmentBase

View File

@@ -1,17 +1,28 @@
from abc import ABC, abstractmethod
from datetime import datetime
from sh_edraft.hosting.base.environment_base import EnvironmentBase
class ApplicationHostBase(ABC):
@abstractmethod
def __init__(self): pass
@property
@abstractmethod
def name(self) -> str: pass
@property
@abstractmethod
def environment(self) -> EnvironmentBase: pass
@property
@abstractmethod
def start_time(self) -> datetime: pass
@start_time.setter
@abstractmethod
def start_time(self, start_time: datetime): pass
@property
@@ -19,4 +30,9 @@ class ApplicationHostBase(ABC):
def end_time(self): pass
@end_time.setter
@abstractmethod
def end_time(self, end_time: datetime): pass
@property
@abstractmethod
def date_time_now(self) -> datetime: pass

View File

@@ -0,0 +1,25 @@
from abc import ABC, abstractmethod
from sh_edraft.hosting.model.environment_name import EnvironmentName
class EnvironmentBase(ABC):
@abstractmethod
def __init__(self): pass
@property
@abstractmethod
def name(self) -> EnvironmentName: pass
@name.setter
@abstractmethod
def name(self, name: EnvironmentName): pass
@property
@abstractmethod
def content_root_path(self) -> str: pass
@content_root_path.setter
@abstractmethod
def content_root_path(self, content_root_path: str): pass