23 lines
499 B
Python
23 lines
499 B
Python
import logging
|
|
from abc import abstractmethod
|
|
|
|
import pydantic
|
|
|
|
|
|
class Action:
|
|
id = ""
|
|
|
|
class Parameters(pydantic.BaseModel):
|
|
pass
|
|
|
|
def __init__(self, parameters=None):
|
|
self.logger = logging.getLogger(self.__class__.__name__)
|
|
self.parameters = self.Parameters(**(parameters or {}))
|
|
|
|
@abstractmethod
|
|
def execute(self, workspace, **kwargs):
|
|
"""
|
|
Main method to override that handles the work for the defining action.
|
|
"""
|
|
pass
|