From 61d5333ec1a609bee9668a8073ff820caad85ed7 Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 27 Jul 2026 18:21:30 +0100 Subject: [PATCH] Removed the premade actions because they were empty anyway --- playbook/premade_steps_registry.py | 30 ------------------------------ registry/restic_actions.py | 5 +++-- 2 files changed, 3 insertions(+), 32 deletions(-) diff --git a/playbook/premade_steps_registry.py b/playbook/premade_steps_registry.py index 50e8e23..fded029 100644 --- a/playbook/premade_steps_registry.py +++ b/playbook/premade_steps_registry.py @@ -6,33 +6,3 @@ from playbook.action_registry import ActionRegistry # Module wide registry with built in functions registry: ActionRegistry = ActionRegistry("testrunner_registry") - - -@registry.register(name="directory_exists", version="stat1.0") -def directory_exists(ctx, name) -> StepLog: - log: StepLog = StepLog( - step_name=name, - status=Status.GOOD, - msg="source directory exists", - ) - return log - - -@registry.register(name="copy_directory", version="cp1.0") -def copy_directory(ctx, name) -> StepLog: - log: StepLog = StepLog( - step_name=name, - status=Status.GOOD, - msg="directory was copied/movied/borged/rsynced", - ) - return log - - -@registry.register(name="verify_copy", version="verify1.0") -def verify_copy(ctx, name) -> StepLog: - log: StepLog = StepLog( - step_name=name, - status=Status.GOOD, - msg="copied/movied/borged/rsynced exists and is valid", - ) - return log diff --git a/registry/restic_actions.py b/registry/restic_actions.py index d652a6e..67ae6df 100644 --- a/registry/restic_actions.py +++ b/registry/restic_actions.py @@ -14,6 +14,9 @@ from typing import List, Dict, Any, Tuple # we can create a class for this I reckon +restic = ActionRegistry("restic_actions_reg") + + def parse_output(line: str) -> List[Dict[str, Any]]: errors = [] for line in line.split('\n'): @@ -70,8 +73,6 @@ def run_restic_command(cmd: List[str]) -> Tuple[int, List[Dict[str, Any]]]: returncode = process.wait() return returncode, parsed_json -restic = ActionRegistry("restic_actions_reg") - @restic.register(name="check_restic_environment", version="") def check_restic_environment(ctx, name: str = "") -> StepLog: