Make changes to the way actions work
This commit is contained in:
@@ -28,6 +28,8 @@ class DatabaseService(Service):
|
||||
:param folder_name: Name of the folder which will be setup to hold the db files, defaults to "database"
|
||||
:type folder_name: str, optional
|
||||
"""
|
||||
# note that this parent.file_system.create_folder call in the future will be authenticated by using permissions
|
||||
# handler. This permission will be granted based on service account given to the database service.
|
||||
folder = self.parent.file_system.create_folder(folder_name)
|
||||
self.parent.file_system.create_file("db_primary_store", db_size, FileSystemFileType.MDF, folder=folder)
|
||||
self.parent.file_system.create_file("db_transaction_log", "1", FileSystemFileType.LDF, folder=folder)
|
||||
|
||||
@@ -2,7 +2,6 @@ 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
|
||||
|
||||
|
||||
@@ -33,17 +32,6 @@ 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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user