From 8b153ad4f626ad48769448fa55203f7e2835ed6e Mon Sep 17 00:00:00 2001
From: Karel van Klink <karel.vanklink@geant.org>
Date: Mon, 2 Dec 2024 10:49:19 +0100
Subject: [PATCH] Update playbook verbs for pre- and post-deployment checks in
 P to PE promotion

---
 gso/workflows/router/promote_p_to_pe.py | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/gso/workflows/router/promote_p_to_pe.py b/gso/workflows/router/promote_p_to_pe.py
index 16d1ffcc..8db471f7 100644
--- a/gso/workflows/router/promote_p_to_pe.py
+++ b/gso/workflows/router/promote_p_to_pe.py
@@ -60,14 +60,14 @@ def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
     return user_input.model_dump() | {"subscription": subscription}
 
 
-@step("Evacuate the router by setting isis_overload")
-def set_isis_overload(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState:
-    """Evacuate the router by setting isis overload."""
+@step("Run pre-deployment checks")
+def run_pre_checks(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState:
+    """Run pre-deployment checks."""
     extra_vars = {
         "dry_run": False,
         "subscription": subscription,
-        "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Set ISIS overload",
-        "verb": "set_isis_overload",
+        "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - pre-deployment checks",
+        "verb": "pre_checks",
     }
 
     return {
@@ -199,14 +199,14 @@ def deploy_routing_instances_real(subscription: dict[str, Any], tt_number: str,
     }
 
 
-@step("Remove ISIS overload")
-def remove_isis_overload(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState:
-    """Remove :term:`ISIS` overload."""
+@step("Run post-deployment checks")
+def run_post_checks(subscription: dict[str, Any], tt_number: str, process_id: UUIDstr) -> LSOState:
+    """Run post-deployment checks."""
     extra_vars = {
         "dry_run": False,
         "subscription": subscription,
-        "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Remove ISIS overload",
-        "verb": "remove_isis_overload",
+        "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Run post-deployment checks",
+        "verb": "post_checks",
     }
 
     return {
@@ -271,7 +271,7 @@ def promote_p_to_pe() -> StepList:
         begin
         >> store_process_subscription(Target.MODIFY)
         >> unsync
-        >> lso_interaction(set_isis_overload)
+        >> lso_interaction(run_pre_checks)
         >> lso_interaction(deploy_pe_base_config_dry)
         >> lso_interaction(deploy_pe_base_config_real)
         >> prompt_insert_in_earl
@@ -294,7 +294,7 @@ def promote_p_to_pe() -> StepList:
         >> lso_interaction(add_pe_to_all_p_real)
         >> lso_interaction(delete_default_routes_dry)
         >> lso_interaction(delete_default_routes_real)
-        >> lso_interaction(remove_isis_overload)
+        >> lso_interaction(run_post_checks)
         >> update_subscription_model
         >> resync
         >> done
-- 
GitLab