diff --git a/compose_viz/models/service.py b/compose_viz/models/service.py index abd94f6..4ba1bbe 100644 --- a/compose_viz/models/service.py +++ b/compose_viz/models/service.py @@ -1,5 +1,6 @@ from typing import List, Optional +from compose_viz.models.device import Device from compose_viz.models.extends import Extends from compose_viz.models.port import Port from compose_viz.models.volume import Volume @@ -18,7 +19,7 @@ class Service: extends: Optional[Extends] = None, cgroup_parent: Optional[str] = None, container_name: Optional[str] = None, - devices: List[str] = [], + devices: Optional[Device] = None, env_file: List[str] = [], expose: List[str] = [], profiles: List[str] = [], @@ -31,12 +32,12 @@ class Service: self._depends_on = depends_on self._links = links self._extends = extends - self.cgroup_parent = cgroup_parent - self.container_name = container_name - self.devices = devices - self.env_file = env_file - self.expose = expose - self.profiles = profiles + self._cgroup_parent = cgroup_parent + self._container_name = container_name + self._devices = devices + self._env_file = env_file + self._expose = expose + self._profiles = profiles @property def name(self): @@ -69,3 +70,27 @@ class Service: @property def extends(self): return self._extends + + @property + def cgroup_parent(self): + return self._cgroup_parent + + @property + def container_name(self): + return self._container_name + + @property + def devices(self): + return self._devices + + @property + def env_file(self): + return self._env_file + + @property + def expose(self): + return self._expose + + @property + def profiles(self): + return self._profiles