init work on database

This commit is contained in:
Marek Wolan
2023-08-25 15:29:53 +01:00
parent 2dd191bf32
commit a9e969aa13
3 changed files with 61 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ from abc import abstractmethod
from enum import Enum
from typing import Any, Dict, List
from primaite.simulator.network.hardware.base import Node
from primaite.simulator.system.software import IOSoftware
@@ -32,6 +33,17 @@ class Service(IOSoftware):
operating_state: ServiceOperatingState
"The current operating state of the Service."
@abstractmethod
def __init__(self, parent_node: Node, **kwargs):
"""Create the service on a node.
:param parent_node: The node on which this service runs.
:type parent_node: Node
"""
super().__init__(**kwargs)
self.parent: Node = parent_node
self.parent.software_manager.add_service(self)
@abstractmethod
def describe_state(self) -> Dict:
"""