From 6d6b1213ae1013b7c26ce228196fade4962576ca Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <aleksandr.kurbatov@GL1342.local>
Date: Mon, 4 Mar 2024 18:05:44 +0000
Subject: [PATCH] ISIS high metric change

According to Neteng the correct "High metric" should be 99k, not 90k.
---
 gso/utils/workflow_steps.py              | 6 +++---
 gso/workflows/iptrunk/migrate_iptrunk.py | 8 ++++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/gso/utils/workflow_steps.py b/gso/utils/workflow_steps.py
index 5890d62b7..8b14e9cb3 100644
--- a/gso/utils/workflow_steps.py
+++ b/gso/utils/workflow_steps.py
@@ -63,10 +63,10 @@ def deploy_base_config_real(
 
 
 @step("[COMMIT] Set ISIS metric to 90.000")
-def set_isis_to_90000(subscription: Iptrunk, process_id: UUIDstr, callback_route: str, tt_number: str) -> State:
-    """Workflow step for setting the :term:`ISIS` metric to 90k as an arbitrarily high value to drain a link."""
+def set_isis_to_99000(subscription: Iptrunk, process_id: UUIDstr, callback_route: str, tt_number: str) -> State:
+    """Workflow step for setting the :term:`ISIS` metric to 99k as an arbitrarily high value to drain a link."""
     old_isis_metric = subscription.iptrunk.iptrunk_isis_metric
-    subscription.iptrunk.iptrunk_isis_metric = 90000
+    subscription.iptrunk.iptrunk_isis_metric = 99000
     extra_vars = {
         "wfo_trunk_json": json.loads(json_dumps(subscription)),
         "dry_run": False,
diff --git a/gso/workflows/iptrunk/migrate_iptrunk.py b/gso/workflows/iptrunk/migrate_iptrunk.py
index 5f1240c56..b209e11c7 100644
--- a/gso/workflows/iptrunk/migrate_iptrunk.py
+++ b/gso/workflows/iptrunk/migrate_iptrunk.py
@@ -41,7 +41,7 @@ from gso.utils.helpers import (
     validate_tt_number,
 )
 from gso.utils.shared_enums import Vendor
-from gso.utils.workflow_steps import set_isis_to_90000
+from gso.utils.workflow_steps import set_isis_to_99000
 
 
 def initial_input_form_generator(subscription_id: UUIDstr) -> FormGenerator:
@@ -656,13 +656,17 @@ def migrate_iptrunk() -> StepList:
         >> unsync
         >> new_side_is_nokia(netbox_reserve_interfaces)
         >> calculate_old_side_data
-        >> pp_interaction(set_isis_to_90000)
+        >> pp_interaction(set_isis_to_99000)
+            #  TODO: get initial optical levels
         >> pp_interaction(disable_old_config_dry)
         >> pp_interaction(disable_old_config_real)
         >> pp_interaction(deploy_new_config_dry)
         >> pp_interaction(deploy_new_config_real)
         >> confirm_continue_move_fiber
+            #  TODO  get new optical levels
+            #  TODO  run ping on a new trunk
         >> pp_interaction(deploy_new_isis)
+            #  TODO  check ISIS adj
         >> should_restore_isis_metric(confirm_continue_restore_isis)
         >> should_restore_isis_metric(pp_interaction(restore_isis_metric))
         >> pp_interaction(delete_old_config_dry)
-- 
GitLab