Unverified Commit 6dea32cb authored by Marvin Meiers's avatar Marvin Meiers
Browse files

symphony/orchestration: move app wait flag to base class Application

parent 2451c80b
...@@ -91,10 +91,7 @@ class Simulator(utils_base.IdObj, abc.ABC): ...@@ -91,10 +91,7 @@ class Simulator(utils_base.IdObj, abc.ABC):
host_comps = self.filter_components_by_type(ty=sys_conf.Host) host_comps = self.filter_components_by_type(ty=sys_conf.Host)
for host in host_comps: for host in host_comps:
for app in host.applications: for app in host.applications:
if not isinstance(app, sys_conf.BaseLinuxApplication): if app.wait:
continue
lin_app: sys_conf.BaseLinuxApplication = app
if lin_app.wait:
return True return True
return False return False
......
...@@ -37,6 +37,7 @@ class Application(utils_base.IdObj): ...@@ -37,6 +37,7 @@ class Application(utils_base.IdObj):
def __init__(self, h: sys_host.Host) -> None: def __init__(self, h: sys_host.Host) -> None:
super().__init__() super().__init__()
self.host: sys_host.Host = h self.host: sys_host.Host = h
self.wait: bool = False
self.parameters: dict[tp.Any, tp.Any] = {} self.parameters: dict[tp.Any, tp.Any] = {}
def toJSON(self) -> dict: def toJSON(self) -> dict:
...@@ -65,7 +66,6 @@ class BaseLinuxApplication(Application): ...@@ -65,7 +66,6 @@ class BaseLinuxApplication(Application):
super().__init__(h) super().__init__(h)
self.start_delay: float | None = None self.start_delay: float | None = None
self.end_delay: float | None = None self.end_delay: float | None = None
self.wait: bool = False
@abc.abstractmethod @abc.abstractmethod
def run_cmds(self, inst: inst_base.Instantiation) -> list[str]: def run_cmds(self, inst: inst_base.Instantiation) -> list[str]:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment