From ec61421c6c4066c389ab288a88a218c044133863 Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <ak@geant.org>
Date: Mon, 28 Apr 2025 11:05:11 +0100
Subject: [PATCH] Include GSO process ID in every LSO call

Also added a fixture that auto-applies to all LSO interactions in unit tests
---
 gso/services/lso_client.py                    |  7 +++++--
 test/conftest.py                              | 21 +++++++++++++++++--
 test/services/test_lso_client.py              |  6 ++++--
 .../edge_port/test_create_edge_port.py        |  8 -------
 .../edge_port/test_migrate_edge_port.py       |  3 ---
 .../edge_port/test_modify_edge_port.py        |  6 ------
 .../edge_port/test_terminate_edge_port.py     |  3 ---
 .../edge_port/test_validate_edge_port.py      |  4 +---
 test/workflows/iptrunk/test_create_iptrunk.py | 10 +--------
 test/workflows/iptrunk/test_deploy_twamp.py   |  5 -----
 .../workflows/iptrunk/test_migrate_iptrunk.py |  4 +---
 .../iptrunk/test_modify_isis_metric.py        |  5 -----
 .../iptrunk/test_modify_trunk_interface.py    |  3 ---
 .../iptrunk/test_terminate_iptrunk.py         |  4 +---
 .../iptrunk/test_validate_iptrunk.py          |  6 ------
 .../l2_circuit/test_create_layer_2_circuit.py | 10 ++-------
 .../test_migrate_layer_2_circuit.py           |  5 -----
 .../l2_circuit/test_modify_layer_2_circuit.py | 10 ++-------
 .../test_terminate_layer_2_circuit.py         |  6 +-----
 .../test_create_l3_core_service.py            |  3 ---
 .../test_migrate_l3_core_service.py           | 10 ++-------
 .../test_validate_l3_core_service.py          |  6 +-----
 .../test_validate_prefix_list.py              | 17 +++------------
 .../test_validate_lan_switch_interconnect.py  |  3 +--
 test/workflows/router/test_create_router.py   |  6 ------
 test/workflows/router/test_promote_p_to_pe.py |  7 ++-----
 .../router/test_redeploy_base_config.py       |  5 -----
 .../workflows/router/test_terminate_router.py |  6 ------
 .../workflows/router/test_update_ibgp_mesh.py |  3 ---
 test/workflows/router/test_validate_router.py |  4 +---
 test/workflows/switch/test_create_switch.py   |  6 +-----
 test/workflows/switch/test_validate_switch.py |  4 +---
 .../vrf/test_modify_vrf_router_list.py        | 13 ++----------
 test/workflows/vrf/test_redeploy_vrf.py       |  6 +-----
 34 files changed, 52 insertions(+), 173 deletions(-)

diff --git a/gso/services/lso_client.py b/gso/services/lso_client.py
index 2318cffd7..67e279175 100644
--- a/gso/services/lso_client.py
+++ b/gso/services/lso_client.py
@@ -14,7 +14,7 @@ from orchestrator.forms import SubmitFormPage
 from orchestrator.utils.errors import ProcessFailureError
 from orchestrator.workflow import Step, StepList, begin, callback_step, conditional, inputstep
 from pydantic import ConfigDict
-from pydantic_forms.types import FormGenerator, State
+from pydantic_forms.types import FormGenerator, State, UUIDstr
 from pydantic_forms.validators import Label, LongText, ReadOnlyField
 from unidecode import unidecode
 
@@ -64,7 +64,7 @@ def _send_request(parameters: dict, callback_route: str) -> None:
 
 @step("Execute Ansible playbook")
 def _execute_playbook(
-    playbook_name: str, callback_route: str, inventory: dict[str, Any], extra_vars: dict[str, Any]
+    playbook_name: str, callback_route: str, inventory: dict[str, Any], extra_vars: dict[str, Any], process_id: UUIDstr
 ) -> None:
     """Execute a playbook remotely through the provisioning proxy.
 
@@ -112,7 +112,10 @@ def _execute_playbook(
         extra_vars: Any extra variables that the playbook relies on. This can include a subscription object, a boolean
             value indicating a dry run, a commit comment, etc. All unicode character values are decoded to prevent
             sending special characters to remote machines that don't support this.
+        process_id: The process ID of the workflow that is running the playbook. This is used in Ansible playbooks to
+            fetch custom configuration.
     """
+    extra_vars["gso_process_id"] = process_id
     parameters = {
         "playbook_name": playbook_name,
         "inventory": inventory,
diff --git a/test/conftest.py b/test/conftest.py
index 2d2c1a784..076a485e2 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -12,7 +12,7 @@ from alembic.config import Config
 from faker import Faker
 from faker.providers import BaseProvider
 from oauth2_lib.settings import oauth2lib_settings
-from orchestrator import app_settings
+from orchestrator import app_settings, step
 from orchestrator.db import (
     Database,
     ProductBlockTable,
@@ -26,7 +26,7 @@ from orchestrator.db.database import ENGINE_ARGUMENTS, SESSION_ARGUMENTS, BaseMo
 from orchestrator.domain import SUBSCRIPTION_MODEL_REGISTRY, SubscriptionModel
 from orchestrator.domain.base import ProductBlockModel
 from orchestrator.types import SubscriptionLifecycle
-from pydantic_forms.types import strEnum
+from pydantic_forms.types import UUIDstr, strEnum
 from sqlalchemy import create_engine, select, text
 from sqlalchemy.engine import make_url
 from sqlalchemy.orm import scoped_session, sessionmaker
@@ -606,3 +606,20 @@ def _no_mail(monkeypatch):
         logger.info(email)
 
     monkeypatch.setattr(gso.services.mailer, "send_mail", send_mail)
+
+
+@pytest.fixture(autouse=True)
+def _no_lso_interactions(monkeypatch):
+    """Remove all external LSO calls."""
+
+    @step("Mocked playbook execution")
+    def _execute_playbook(
+        playbook_name: str, callback_route: str, inventory: dict, extra_vars: dict, process_id: UUIDstr
+    ) -> None:
+        assert playbook_name
+        assert callback_route
+        assert inventory
+        assert extra_vars
+        assert process_id
+
+    monkeypatch.setattr(gso.services.lso_client, "_execute_playbook", _execute_playbook)
diff --git a/test/services/test_lso_client.py b/test/services/test_lso_client.py
index 2f52072a7..78af95fc2 100644
--- a/test/services/test_lso_client.py
+++ b/test/services/test_lso_client.py
@@ -4,7 +4,8 @@ from gso.services.lso_client import _execute_playbook
 
 
 @patch("gso.services.lso_client.requests.post")
-def test_replace_unicode_in_lso_call_success(mock_post):
+def test_replace_unicode_in_lso_call_success(mock_post, faker):
+    mocked_uuid = faker.uuid4()
     extra_vars = {
         "deployment_description": "I am going to deploy the best GÉANT service EVER!!",
         "email": "goat@géant.org",
@@ -19,10 +20,11 @@ def test_replace_unicode_in_lso_call_success(mock_post):
             "deployment_description": "I am going to deploy the best GEANT service EVER!!",
             "email": "goat@geant.org",
             "translations": {"ja": "zieantonosugoinasa-bisuwodepuroisuru"},
+            "gso_process_id": mocked_uuid,
         },
     }
 
     execute_playbook = _execute_playbook.__wrapped__
-    execute_playbook("playbook.yaml", "/api/callback_route", {}, extra_vars)
+    execute_playbook("playbook.yaml", "/api/callback_route", {}, extra_vars, mocked_uuid)
 
     mock_post.assert_called_once_with("https://localhost:44444/api/playbook", json=expected_parameters, timeout=10)
diff --git a/test/workflows/edge_port/test_create_edge_port.py b/test/workflows/edge_port/test_create_edge_port.py
index b907a4138..b73b9fe0a 100644
--- a/test/workflows/edge_port/test_create_edge_port.py
+++ b/test/workflows/edge_port/test_create_edge_port.py
@@ -87,9 +87,7 @@ def input_form_wizard_data(request, router_subscription_factory, partner_factory
 
 @pytest.mark.workflow()
 @pytest.mark.parametrize("router_vendor", [*Vendor.values()])
-@patch("gso.services.lso_client._send_request")
 def test_successful_edge_port_creation(
-    mock_execute_playbook,
     router_vendor,
     input_form_wizard_data,
     faker,
@@ -119,13 +117,10 @@ def test_successful_edge_port_creation(
         == f"Edge Port {initial_data[2]["name"]} on {router_fqdn}, GAAR, {subscription.edge_port.ga_id}"
     )
     assert len(subscription.edge_port.edge_port_ae_members) == 2
-    assert mock_execute_playbook.call_count == 4
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_successful_edge_port_creation_with_auto_ga_id_creation(
-    mock_execute_playbook,
     input_form_wizard_data,
     faker,
     _netbox_client_mock,  # noqa: PT019
@@ -150,7 +145,6 @@ def test_successful_edge_port_creation_with_auto_ga_id_creation(
 
     assert subscription.status == "active"
     assert subscription.edge_port.ga_id.startswith("GA-5000")
-    assert mock_execute_playbook.call_count == 4
 
 
 def test_edge_port_creation_with_invalid_input(
@@ -173,9 +167,7 @@ def test_edge_port_creation_with_invalid_input(
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_edge_port_creation_with_existing_ga_id(
-    mock_execute_playbook,
     input_form_wizard_data,
     faker,
     _netbox_client_mock,  # noqa: PT019
diff --git a/test/workflows/edge_port/test_migrate_edge_port.py b/test/workflows/edge_port/test_migrate_edge_port.py
index 821e7e82b..85ab31cfc 100644
--- a/test/workflows/edge_port/test_migrate_edge_port.py
+++ b/test/workflows/edge_port/test_migrate_edge_port.py
@@ -75,9 +75,7 @@ def input_form_wizard_data(request, router_subscription_factory, partner, faker)
 
 @pytest.mark.workflow()
 @patch("gso.tasks.start_process.start_process_task.apply_async")
-@patch("gso.services.lso_client._send_request")
 def test_successful_edge_port_migration(
-    mock_execute_playbook,
     start_process_task_apply_async,
     input_form_wizard_data,
     faker,
@@ -128,4 +126,3 @@ def test_successful_edge_port_migration(
     assert subscription.edge_port.ga_id is not None
     assert subscription.description == f"Edge Port lag-21 on {router_fqdn}, GAAR, {subscription.edge_port.ga_id}"
     assert len(subscription.edge_port.edge_port_ae_members) == 2
-    assert mock_execute_playbook.call_count == 4
diff --git a/test/workflows/edge_port/test_modify_edge_port.py b/test/workflows/edge_port/test_modify_edge_port.py
index 0d71e92cb..987344969 100644
--- a/test/workflows/edge_port/test_modify_edge_port.py
+++ b/test/workflows/edge_port/test_modify_edge_port.py
@@ -56,7 +56,6 @@ def test_modify_edge_port_with_invalid_ga_id(
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_available_interfaces")
 @patch("gso.services.netbox_client.NetboxClient.attach_interface_to_lag")
 @patch("gso.services.netbox_client.NetboxClient.reserve_interface")
@@ -72,7 +71,6 @@ def test_modify_edge_port_with_changing_capacity(
     mocked_reserve_interface,
     mocked_attach_interface_to_lag,
     mocked_get_available_interfaces,
-    mocked_execute_playbook,
     input_form_wizard_data,
     faker,
 ):
@@ -99,7 +97,6 @@ def test_modify_edge_port_with_changing_capacity(
     subscription = EdgePort.from_subscription(subscription_id)
 
     assert subscription.status == "active"
-    assert mocked_execute_playbook.call_count == 2
 
     # The number of members have been changed from 2 to 1
     assert mocked_reserve_interface.call_count == 1
@@ -132,7 +129,6 @@ def input_form_wizard_without_changing_capacity(request, faker, edge_port_subscr
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_available_interfaces")
 @patch("gso.services.netbox_client.NetboxClient.attach_interface_to_lag")
 @patch("gso.services.netbox_client.NetboxClient.reserve_interface")
@@ -148,7 +144,6 @@ def test_modify_edge_port_without_changing_capacity(
     mocked_reserve_interface,
     mocked_attach_interface_to_lag,
     mocked_get_available_interfaces,
-    mocked_execute_playbook,
     input_form_wizard_without_changing_capacity,
     faker,
 ):
@@ -173,7 +168,6 @@ def test_modify_edge_port_without_changing_capacity(
     assert subscription.status == "active"
 
     # The capacity has not been changed so the following methods should not be called
-    assert mocked_execute_playbook.call_count == 0
     assert mocked_reserve_interface.call_count == 0
     assert mocked_attach_interface_to_lag.call_count == 0
     assert mocked_free_interface.call_count == 0
diff --git a/test/workflows/edge_port/test_terminate_edge_port.py b/test/workflows/edge_port/test_terminate_edge_port.py
index 58c7d0872..d399dd377 100644
--- a/test/workflows/edge_port/test_terminate_edge_port.py
+++ b/test/workflows/edge_port/test_terminate_edge_port.py
@@ -13,13 +13,11 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.delete_interface")
 @patch("gso.services.netbox_client.NetboxClient.free_interface")
 def test_successful_edge_port_termination(
     mocked_free_interface,
     mocked_delete_interface,
-    mock_execute_playbook,
     edge_port_subscription_factory,
     faker,
 ):
@@ -52,4 +50,3 @@ def test_successful_edge_port_termination(
     subscription = EdgePort.from_subscription(subscription_id)
 
     assert subscription.status == "terminated"
-    assert mock_execute_playbook.call_count == 2
diff --git a/test/workflows/edge_port/test_validate_edge_port.py b/test/workflows/edge_port/test_validate_edge_port.py
index d6ce39e05..92ee9454d 100644
--- a/test/workflows/edge_port/test_validate_edge_port.py
+++ b/test/workflows/edge_port/test_validate_edge_port.py
@@ -13,11 +13,9 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_interface_by_name_and_device")
 def test_validate_edge_port_success(
     mock_get_interface_by_name_and_device,
-    mock_execute_playbook,
     edge_port_subscription_factory,
     faker,
 ):
@@ -56,6 +54,6 @@ def test_validate_edge_port_success(
     assert_complete(result)
     subscription = EdgePort.from_subscription(subscription_id)
     assert subscription.status == "active"
-    assert mock_execute_playbook.call_count == 1
+
     # One time for getting the LAG and two times for getting the interfaces
     assert mock_get_interface_by_name_and_device.call_count == 3
diff --git a/test/workflows/iptrunk/test_create_iptrunk.py b/test/workflows/iptrunk/test_create_iptrunk.py
index 861c6d325..95522cfe1 100644
--- a/test/workflows/iptrunk/test_create_iptrunk.py
+++ b/test/workflows/iptrunk/test_create_iptrunk.py
@@ -100,7 +100,6 @@ def input_form_wizard_data(request, router_subscription_factory, faker):
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.allocate_v6_network")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.allocate_v4_network")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.create_host_by_ip")
@@ -114,7 +113,6 @@ def test_successful_iptrunk_creation_with_standard_lso_result(
     mock_create_host,
     mock_allocate_v4_network,
     mock_allocate_v6_network,
-    mock_execute_playbook,
     input_form_wizard_data,
     faker,
     _netbox_client_mock,  # noqa: PT019
@@ -154,14 +152,12 @@ def test_successful_iptrunk_creation_with_standard_lso_result(
         f"{subscription.iptrunk.gs_id}"
     )
 
-    assert mock_execute_playbook.call_count == 6
     #  We search for 6 hosts in total, 2 in a /31 and 4 in a /126
     assert mock_find_host_by_ip.call_count == 6
     assert mock_ping.call_count == 6
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.allocate_v6_network")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.allocate_v4_network")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.find_host_by_ip")
@@ -171,7 +167,6 @@ def test_iptrunk_creation_fails_when_lso_return_code_is_one(
     mock_find_host_by_ip,
     mock_allocate_v4_network,
     mock_allocate_v6_network,
-    mock_execute_playbook,
     input_form_wizard_data,
     faker,
     _netbox_client_mock,  # noqa: PT019
@@ -189,14 +184,12 @@ def test_iptrunk_creation_fails_when_lso_return_code_is_one(
 
     assert_lso_interaction_failure(result, process_stat, step_log)
 
-    assert mock_execute_playbook.call_count == 2
     assert mock_find_host_by_ip.call_count == 6
     assert mock_ping.call_count == 6
 
 
 @pytest.mark.parametrize("input_form_wizard_data", [Vendor.JUNIPER], indirect=True)
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.allocate_v6_network")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.allocate_v4_network")
 @patch("gso.workflows.iptrunk.create_iptrunk.infoblox.create_host_by_ip")
@@ -210,7 +203,6 @@ def test_successful_iptrunk_creation_with_juniper_interface_names(
     mock_create_host,
     mock_allocate_v4_network,
     mock_allocate_v6_network,
-    mock_execute_playbook,
     input_form_wizard_data,
     faker,
     _netbox_client_mock,  # noqa: PT019
@@ -233,7 +225,7 @@ def test_successful_iptrunk_creation_with_juniper_interface_names(
     result, step_log = resume_suspended_workflow(result, process_stat, step_log, input_data=USER_CONFIRM_EMPTY_FORM)
 
     assert_complete(result)
-    assert mock_execute_playbook.call_count == 6
+
     assert mock_find_host_by_ip.call_count == 6
     assert mock_ping.call_count == 6
 
diff --git a/test/workflows/iptrunk/test_deploy_twamp.py b/test/workflows/iptrunk/test_deploy_twamp.py
index 7791940fc..d43d213d9 100644
--- a/test/workflows/iptrunk/test_deploy_twamp.py
+++ b/test/workflows/iptrunk/test_deploy_twamp.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 
 from gso.products.product_types.iptrunk import Iptrunk
@@ -12,9 +10,7 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_iptrunk_deploy_twamp_success(
-    mock_execute_playbook,
     iptrunk_subscription_factory,
     faker,
 ):
@@ -35,4 +31,3 @@ def test_iptrunk_deploy_twamp_success(
     subscription = Iptrunk.from_subscription(subscription_id)
 
     assert subscription.status == "active"
-    assert mock_execute_playbook.call_count == 3
diff --git a/test/workflows/iptrunk/test_migrate_iptrunk.py b/test/workflows/iptrunk/test_migrate_iptrunk.py
index 8054dfba1..d2bd637b2 100644
--- a/test/workflows/iptrunk/test_migrate_iptrunk.py
+++ b/test/workflows/iptrunk/test_migrate_iptrunk.py
@@ -111,7 +111,6 @@ def interface_lists_are_equal(list1, list2):
 @pytest.mark.workflow()
 @patch("gso.services.infoblox.create_host_by_ip")
 @patch("gso.services.infoblox.delete_host_by_ip")
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_available_interfaces")
 @patch("gso.services.netbox_client.NetboxClient.get_available_lags")
 @patch("gso.services.netbox_client.NetboxClient.create_interface")
@@ -131,7 +130,6 @@ def test_migrate_iptrunk_success(  # noqa: PLR0915
     mocked_create_interface,
     mocked_get_available_lags,
     mocked_get_available_interfaces,
-    mock_execute_playbook,
     mock_delete_host_by_ip,
     mock_create_host_by_ip,
     migrate_form_input,
@@ -180,7 +178,7 @@ def test_migrate_iptrunk_success(  # noqa: PLR0915
     subscription = Iptrunk.from_subscription(subscription_id)
 
     assert subscription.status == "active"
-    assert mock_execute_playbook.call_count == (17 if restore_isis_metric else 16)
+
     assert mock_create_host_by_ip.call_count == 1
     assert mock_delete_host_by_ip.call_count == 1
 
diff --git a/test/workflows/iptrunk/test_modify_isis_metric.py b/test/workflows/iptrunk/test_modify_isis_metric.py
index 551ab0c26..6b1bc416c 100644
--- a/test/workflows/iptrunk/test_modify_isis_metric.py
+++ b/test/workflows/iptrunk/test_modify_isis_metric.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 
 from gso.products.product_types.iptrunk import Iptrunk
@@ -12,9 +10,7 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_iptrunk_modify_isis_metric_success(
-    mock_provision_ip_trunk,
     iptrunk_subscription_factory,
     faker,
 ):
@@ -40,5 +36,4 @@ def test_iptrunk_modify_isis_metric_success(
     subscription = Iptrunk.from_subscription(subscription_id)
 
     assert subscription.status == "active"
-    assert mock_provision_ip_trunk.call_count == 2
     assert subscription.iptrunk.iptrunk_isis_metric == new_isis_metric
diff --git a/test/workflows/iptrunk/test_modify_trunk_interface.py b/test/workflows/iptrunk/test_modify_trunk_interface.py
index e636c2cc3..4b0f25772 100644
--- a/test/workflows/iptrunk/test_modify_trunk_interface.py
+++ b/test/workflows/iptrunk/test_modify_trunk_interface.py
@@ -92,7 +92,6 @@ def input_form_iptrunk_data(
     indirect=True,
 )
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_available_interfaces")
 @patch("gso.services.netbox_client.NetboxClient.attach_interface_to_lag")
 @patch("gso.services.netbox_client.NetboxClient.reserve_interface")
@@ -106,7 +105,6 @@ def test_iptrunk_modify_trunk_interface_success(
     mocked_reserve_interface,
     mocked_attach_interface_to_lag,
     mocked_get_available_interfaces,
-    mock_provision_ip_trunk,
     input_form_iptrunk_data,
     faker,
 ):
@@ -134,7 +132,6 @@ def test_iptrunk_modify_trunk_interface_success(
     subscription = Iptrunk.from_subscription(subscription_id)
 
     assert subscription.status == "active"
-    assert mock_provision_ip_trunk.call_count == lso_interaction_count
     # Assert all Netbox calls have been made
     new_sid = input_form_iptrunk_data[1]["gs_id"]
     new_side_a_gid = input_form_iptrunk_data[3]["side_a_ga_id"]
diff --git a/test/workflows/iptrunk/test_terminate_iptrunk.py b/test/workflows/iptrunk/test_terminate_iptrunk.py
index 14c6c5298..6ce271a1a 100644
--- a/test/workflows/iptrunk/test_terminate_iptrunk.py
+++ b/test/workflows/iptrunk/test_terminate_iptrunk.py
@@ -15,7 +15,6 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.iptrunk.terminate_iptrunk.infoblox.delete_network")
 @patch("gso.services.netbox_client.NetboxClient.delete_interface")
 @patch("gso.services.netbox_client.NetboxClient.free_interface")
@@ -23,7 +22,6 @@ def test_successful_iptrunk_termination(
     mocked_free_interface,
     mocked_delete_interface,
     mock_infoblox_delete_network,
-    mock_execute_playbook,
     iptrunk_subscription_factory,
     faker,
     router_subscription_factory,
@@ -62,6 +60,6 @@ def test_successful_iptrunk_termination(
     subscription = Iptrunk.from_subscription(subscription_id)
 
     assert subscription.status == "terminated"
-    assert mock_execute_playbook.call_count == 3
+
     assert mock_infoblox_delete_network.call_count == 2
     assert subscription.iptrunk.iptrunk_isis_metric == oss_params.GENERAL.isis_high_metric
diff --git a/test/workflows/iptrunk/test_validate_iptrunk.py b/test/workflows/iptrunk/test_validate_iptrunk.py
index a6460cb3a..e192980e7 100644
--- a/test/workflows/iptrunk/test_validate_iptrunk.py
+++ b/test/workflows/iptrunk/test_validate_iptrunk.py
@@ -45,11 +45,9 @@ def _mocked_netbox_client():
 @patch("gso.services.infoblox.find_network_by_cidr")
 @patch("gso.services.infoblox.find_v6_host_by_fqdn")
 @patch("gso.services.infoblox.find_host_by_fqdn")
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_interface_by_name_and_device")
 def test_validate_iptrunk_success(
     mock_get_interface_by_name,
-    mock_validate_iptrunk,
     mock_find_host_by_fqdn,
     mock_find_v6_host_by_fqdn,
     mock_find_network_by_cidr,
@@ -191,7 +189,6 @@ def test_validate_iptrunk_success(
     subscription = Iptrunk.from_subscription(subscription_id)
 
     assert subscription.status == subscription_status
-    assert mock_validate_iptrunk.call_count == 3
     assert mock_find_host_by_fqdn.call_count == 2
     assert mock_find_v6_host_by_fqdn.call_count == 2
     assert mock_find_network_by_cidr.call_count == 2
@@ -203,11 +200,9 @@ def test_validate_iptrunk_success(
 @patch("gso.services.infoblox.find_network_by_cidr")
 @patch("gso.services.infoblox.find_v6_host_by_fqdn")
 @patch("gso.services.infoblox.find_host_by_fqdn")
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_interface_by_name_and_device")
 def test_validate_iptrunk_skip_legacy_trunks(
     mock_get_interface_by_name,
-    mock_validate_iptrunk,
     mock_find_host_by_fqdn,
     mock_find_v6_host_by_fqdn,
     mock_find_network_by_cidr,
@@ -235,7 +230,6 @@ def test_validate_iptrunk_skip_legacy_trunks(
 
     assert subscription.status == subscription_status
     assert mock_get_interface_by_name.call_count == 0
-    assert mock_validate_iptrunk.call_count == 0
     assert mock_find_host_by_fqdn.call_count == 0
     assert mock_find_v6_host_by_fqdn.call_count == 0
     assert mock_find_network_by_cidr.call_count == 0
diff --git a/test/workflows/l2_circuit/test_create_layer_2_circuit.py b/test/workflows/l2_circuit/test_create_layer_2_circuit.py
index 4d282f6f7..b892b5df4 100644
--- a/test/workflows/l2_circuit/test_create_layer_2_circuit.py
+++ b/test/workflows/l2_circuit/test_create_layer_2_circuit.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 from orchestrator.types import SubscriptionLifecycle
 
@@ -60,9 +58,7 @@ def layer_2_circuit_ethernet_input(
 
 @pytest.mark.parametrize("layer_2_circuit_service_type", LAYER_2_CIRCUIT_SERVICE_TYPES)
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_create_layer_2_circuit_success(
-    mock_lso_interaction,
     layer_2_circuit_service_type,
     layer_2_circuit_input,
     faker,
@@ -76,7 +72,7 @@ def test_create_layer_2_circuit_success(
     assert_complete(result)
     state = extract_state(result)
     subscription = Layer2Circuit.from_subscription(state["subscription_id"])
-    assert mock_lso_interaction.call_count == 2
+
     assert subscription.status == SubscriptionLifecycle.ACTIVE
     assert subscription.layer_2_circuit.virtual_circuit_id is not None
     assert len(subscription.layer_2_circuit.layer_2_circuit_sides) == 2
@@ -113,9 +109,7 @@ def test_create_layer_2_circuit_success(
 
 @pytest.mark.parametrize("layer_2_circuit_service_type", LAYER_2_CIRCUIT_SERVICE_TYPES)
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_create_layer_2_circuit_with_ethernet_type(
-    mock_lso_interaction,
     layer_2_circuit_service_type,
     layer_2_circuit_ethernet_input,
     faker,
@@ -129,7 +123,7 @@ def test_create_layer_2_circuit_with_ethernet_type(
     assert_complete(result)
     state = extract_state(result)
     subscription = Layer2Circuit.from_subscription(state["subscription_id"])
-    assert mock_lso_interaction.call_count == 2
+
     assert subscription.status == SubscriptionLifecycle.ACTIVE
     assert subscription.layer_2_circuit.virtual_circuit_id is not None
     assert len(subscription.layer_2_circuit.layer_2_circuit_sides) == 2
diff --git a/test/workflows/l2_circuit/test_migrate_layer_2_circuit.py b/test/workflows/l2_circuit/test_migrate_layer_2_circuit.py
index a0f05946c..7b66d9b3a 100644
--- a/test/workflows/l2_circuit/test_migrate_layer_2_circuit.py
+++ b/test/workflows/l2_circuit/test_migrate_layer_2_circuit.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 
 from gso.products.product_types.edge_port import EdgePort
@@ -13,9 +11,7 @@ from test.workflows import assert_complete, assert_lso_interaction_success, extr
 @pytest.mark.parametrize("run_old_side_ansible", [False, True])
 @pytest.mark.parametrize("run_new_side_ansible", [False, True])
 @pytest.mark.parametrize("generate_new_vc_id", [False, True])
-@patch("gso.services.lso_client._send_request")
 def test_migrate_layer_2_circuit(
-    mock_lso_interaction,
     generate_new_vc_id,
     run_new_side_ansible,
     run_old_side_ansible,
@@ -64,7 +60,6 @@ def test_migrate_layer_2_circuit(
     subscription_id = state["subscription_id"]
     subscription = Layer2Circuit.from_subscription(subscription_id)
     assert subscription.status == "active"
-    assert mock_lso_interaction.call_count == lso_step_count
 
     replaced_edge_port = subscription.layer_2_circuit.layer_2_circuit_sides[1].sbp.edge_port
     assert replaced_edge_port.model_dump(exclude="edge_port_ae_members") == new_edge_port.edge_port.model_dump(
diff --git a/test/workflows/l2_circuit/test_modify_layer_2_circuit.py b/test/workflows/l2_circuit/test_modify_layer_2_circuit.py
index e4f4dcce3..7637efc20 100644
--- a/test/workflows/l2_circuit/test_modify_layer_2_circuit.py
+++ b/test/workflows/l2_circuit/test_modify_layer_2_circuit.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 from orchestrator.types import SubscriptionLifecycle
 
@@ -11,9 +9,7 @@ from test.workflows import assert_complete, assert_lso_interaction_success, extr
 @pytest.mark.parametrize("layer_2_circuit_service_type", LAYER_2_CIRCUIT_SERVICE_TYPES)
 @pytest.mark.parametrize("run_ansible_steps", [False, True])
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_modify_layer_2_circuit_change_policer_bandwidth(
-    mock_lso_interaction,
     layer_2_circuit_service_type,
     run_ansible_steps,
     layer_2_circuit_subscription_factory,
@@ -48,7 +44,7 @@ def test_modify_layer_2_circuit_change_policer_bandwidth(
 
     subscription = Layer2Circuit.from_subscription(str(subscription.subscription_id))
     assert_complete(result)
-    assert mock_lso_interaction.call_count == lso_step_count
+
     assert subscription.status == SubscriptionLifecycle.ACTIVE
     assert subscription.layer_2_circuit.policer_enabled is False
     assert subscription.layer_2_circuit.bandwidth is None
@@ -70,9 +66,7 @@ def test_modify_layer_2_circuit_change_policer_bandwidth(
 @pytest.mark.parametrize("layer_2_circuit_service_type", LAYER_2_CIRCUIT_SERVICE_TYPES)
 @pytest.mark.parametrize("run_ansible_steps", [False, True])
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_modify_layer_2_circuit_change_circuit_type(
-    mock_lso_interaction,
     layer_2_circuit_service_type,
     run_ansible_steps,
     layer_2_circuit_subscription_factory,
@@ -105,7 +99,7 @@ def test_modify_layer_2_circuit_change_circuit_type(
     assert_complete(result)
     state = extract_state(result)
     subscription = Layer2Circuit.from_subscription(state["subscription_id"])
-    assert mock_lso_interaction.call_count == lso_step_count
+
     assert subscription.status == SubscriptionLifecycle.ACTIVE
     assert subscription.layer_2_circuit.vlan_range_lower_bound is None
     assert subscription.layer_2_circuit.vlan_range_upper_bound is None
diff --git a/test/workflows/l2_circuit/test_terminate_layer_2_circuit.py b/test/workflows/l2_circuit/test_terminate_layer_2_circuit.py
index 55deedede..eba60dafc 100644
--- a/test/workflows/l2_circuit/test_terminate_layer_2_circuit.py
+++ b/test/workflows/l2_circuit/test_terminate_layer_2_circuit.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 
 from gso.products.product_types.layer_2_circuit import LAYER_2_CIRCUIT_SERVICE_TYPES, Layer2Circuit
@@ -9,9 +7,8 @@ from test.workflows import assert_complete, assert_lso_interaction_success, extr
 @pytest.mark.workflow()
 @pytest.mark.parametrize("layer_2_circuit_service_type", LAYER_2_CIRCUIT_SERVICE_TYPES)
 @pytest.mark.parametrize("run_ansible_steps", [True, False])
-@patch("gso.services.lso_client._send_request")
 def test_terminate_layer_2_circuit(
-    mock_lso_interaction, layer_2_circuit_service_type, run_ansible_steps, layer_2_circuit_subscription_factory, faker
+    layer_2_circuit_service_type, run_ansible_steps, layer_2_circuit_subscription_factory, faker
 ):
     subscription_id = str(
         layer_2_circuit_subscription_factory(layer_2_circuit_service_type=layer_2_circuit_service_type).subscription_id
@@ -33,4 +30,3 @@ def test_terminate_layer_2_circuit(
     subscription_id = state["subscription_id"]
     subscription = Layer2Circuit.from_subscription(subscription_id)
     assert subscription.status == "terminated"
-    assert mock_lso_interaction.call_count == lso_step_count
diff --git a/test/workflows/l3_core_service/test_create_l3_core_service.py b/test/workflows/l3_core_service/test_create_l3_core_service.py
index 20d307f49..a8ee5bc6a 100644
--- a/test/workflows/l3_core_service/test_create_l3_core_service.py
+++ b/test/workflows/l3_core_service/test_create_l3_core_service.py
@@ -39,11 +39,9 @@ def base_bgp_peer_input(faker):
 
 @pytest.mark.parametrize("product_name", L3_PRODUCT_NAMES)
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.l3_core_service.base_create_l3_core_service.SharePointClient")
 def test_create_l3_core_service_success(
     mock_sharepoint_client,
-    mock_lso_client,
     product_name,
     faker,
     partner_factory,
@@ -108,7 +106,6 @@ def test_create_l3_core_service_success(
     subscription = SubscriptionModel.from_subscription(state["subscription_id"])
 
     assert subscription.product.name == product_name
-    assert mock_lso_client.call_count == lso_interaction_count + 1
     assert subscription.status == SubscriptionLifecycle.ACTIVE
     assert len(subscription.l3_core.ap_list) == 1
     assert (
diff --git a/test/workflows/l3_core_service/test_migrate_l3_core_service.py b/test/workflows/l3_core_service/test_migrate_l3_core_service.py
index 18c5682e7..eb1b292a9 100644
--- a/test/workflows/l3_core_service/test_migrate_l3_core_service.py
+++ b/test/workflows/l3_core_service/test_migrate_l3_core_service.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 from orchestrator.domain import SubscriptionModel
 
@@ -19,9 +17,7 @@ from test.workflows import (
 
 @pytest.mark.workflow()
 @pytest.mark.parametrize("product_name", L3_PRODUCT_NAMES)
-@patch("gso.services.lso_client._send_request")
 def test_migrate_l3_core_service_success(
-    mock_execute_playbook,
     faker,
     edge_port_subscription_factory,
     partner_factory,
@@ -62,7 +58,7 @@ def test_migrate_l3_core_service_success(
     assert_complete(result)
     state = extract_state(result)
     subscription = SubscriptionModel.from_subscription(state["subscription_id"])
-    assert mock_execute_playbook.call_count == 11
+
     assert subscription.insync
     assert len(subscription.l3_core.ap_list) == 1
     assert str(subscription.l3_core.ap_list[0].sbp.edge_port.owner_subscription_id) == destination_edge_port
@@ -70,9 +66,7 @@ def test_migrate_l3_core_service_success(
 
 @pytest.mark.workflow()
 @pytest.mark.parametrize("product_name", L3_PRODUCT_NAMES)
-@patch("gso.services.lso_client._send_request")
 def test_migrate_l3_core_service_scoped_emission(
-    mock_execute_playbook,
     faker,
     edge_port_subscription_factory,
     access_port_factory,
@@ -139,7 +133,7 @@ def test_migrate_l3_core_service_scoped_emission(
     assert_complete(result)
     state = extract_state(result)
     subscription = SubscriptionModel.from_subscription(state["subscription_id"])
-    assert mock_execute_playbook.call_count == 11
+
     assert subscription.insync
     ap_list = subscription.l3_core.ap_list
     assert len(ap_list) == 5
diff --git a/test/workflows/l3_core_service/test_validate_l3_core_service.py b/test/workflows/l3_core_service/test_validate_l3_core_service.py
index ad6a06ca2..60192558b 100644
--- a/test/workflows/l3_core_service/test_validate_l3_core_service.py
+++ b/test/workflows/l3_core_service/test_validate_l3_core_service.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 from orchestrator.domain import SubscriptionModel
 
@@ -8,9 +6,8 @@ from test.workflows import assert_complete, assert_lso_success, extract_state, r
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @pytest.mark.parametrize("product_name", L3_PRODUCT_NAMES)
-def test_validate_l3_core_service(mock_lso_interaction, l3_core_service_subscription_factory, faker, product_name):
+def test_validate_l3_core_service(l3_core_service_subscription_factory, faker, product_name):
     subscription_id = str(l3_core_service_subscription_factory(product_name=product_name).subscription_id)
     initial_l3_core_service_data = [{"subscription_id": subscription_id}]
     result, process_stat, step_log = run_workflow(L3_VALIDATION_WF_MAP[product_name], initial_l3_core_service_data)
@@ -23,4 +20,3 @@ def test_validate_l3_core_service(mock_lso_interaction, l3_core_service_subscrip
     subscription = SubscriptionModel.from_subscription(subscription_id)
     assert subscription.status == "active"
     assert subscription.insync is True
-    assert mock_lso_interaction.call_count == 2
diff --git a/test/workflows/l3_core_service/test_validate_prefix_list.py b/test/workflows/l3_core_service/test_validate_prefix_list.py
index a2baecb68..42e945200 100644
--- a/test/workflows/l3_core_service/test_validate_prefix_list.py
+++ b/test/workflows/l3_core_service/test_validate_prefix_list.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 
 from gso.products.product_types.geant_ip import GeantIP
@@ -18,8 +16,7 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
-def test_validate_prefix_list_success(mock_lso_interaction, geant_ip_subscription_factory, faker):
+def test_validate_prefix_list_success(geant_ip_subscription_factory, faker):
     subscription_id = str(geant_ip_subscription_factory().subscription_id)
     initial_l3_core_service_data = [{"subscription_id": subscription_id}]
     # Run the workflow and extract results
@@ -36,13 +33,10 @@ def test_validate_prefix_list_success(mock_lso_interaction, geant_ip_subscriptio
     # Verify the subscription has no Juniper devices
     for ap in subscription.geant_ip.l3_core.ap_list:
         assert ap.sbp.edge_port.node.vendor != Vendor.JUNIPER
-    # Verify the number of LSO interactions
-    assert mock_lso_interaction.call_count == 1
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
-def test_validate_prefix_list_with_diff(mock_lso_interaction, geant_ip_subscription_factory, faker):
+def test_validate_prefix_list_with_diff(geant_ip_subscription_factory, faker):
     """Test case where playbook_has_diff qualifies and additional steps are executed."""
     subscription_id = str(geant_ip_subscription_factory().subscription_id)
     initial_l3_core_service_data = [{"subscription_id": subscription_id}]
@@ -68,13 +62,10 @@ def test_validate_prefix_list_with_diff(mock_lso_interaction, geant_ip_subscript
     subscription = GeantIP.from_subscription(subscription_id)
     assert subscription.status == "active"
     assert subscription.insync is True
-    # Verify the number of LSO interactions
-    assert mock_lso_interaction.call_count == 3  # One for validation and two for deployment
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
-def test_validate_prefix_list_without_diff(mock_lso_interaction, geant_ip_subscription_factory, faker):
+def test_validate_prefix_list_without_diff(geant_ip_subscription_factory, faker):
     """Test case where playbook_has_diff does not qualify and skips additional steps."""
     subscription_id = str(geant_ip_subscription_factory().subscription_id)
     initial_l3_core_service_data = [{"subscription_id": subscription_id}]
@@ -89,8 +80,6 @@ def test_validate_prefix_list_without_diff(mock_lso_interaction, geant_ip_subscr
     subscription = GeantIP.from_subscription(subscription_id)
     assert subscription.status == "active"
     assert subscription.insync is True
-    # Verify the number of LSO interactions
-    assert mock_lso_interaction.call_count == 1  # Only validation is performed
 
 
 @pytest.mark.workflow()
diff --git a/test/workflows/lan_switch_interconnect/test_validate_lan_switch_interconnect.py b/test/workflows/lan_switch_interconnect/test_validate_lan_switch_interconnect.py
index 18e67d171..db180c7d5 100644
--- a/test/workflows/lan_switch_interconnect/test_validate_lan_switch_interconnect.py
+++ b/test/workflows/lan_switch_interconnect/test_validate_lan_switch_interconnect.py
@@ -10,9 +10,8 @@ from test.workflows import assert_complete, assert_lso_success, extract_state, r
 @pytest.mark.workflow()
 @patch("gso.services.infoblox.find_host_by_fqdn")
 @patch("gso.services.infoblox.find_network_by_cidr")
-@patch("gso.services.lso_client._send_request")
 def test_validate_lan_switch_interconnect(
-    mock_lso_interaction, mock_find_network, mock_find_host, lan_switch_interconnect_subscription_factory, faker
+    mock_find_network, mock_find_host, lan_switch_interconnect_subscription_factory, faker
 ):
     subscription_id = str(lan_switch_interconnect_subscription_factory().subscription_id)
     mocked_netbox_reply = objects.HostRecord(
diff --git a/test/workflows/router/test_create_router.py b/test/workflows/router/test_create_router.py
index 67d317b1e..8300a42bd 100644
--- a/test/workflows/router/test_create_router.py
+++ b/test/workflows/router/test_create_router.py
@@ -38,7 +38,6 @@ def router_creation_input_form_data(site_subscription_factory, faker):
 
 @pytest.mark.workflow()
 @pytest.mark.parametrize("router_role", [RouterRole.P, RouterRole.PE])
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.router.create_router.NetboxClient.create_device")
 @patch("gso.workflows.router.create_router.infoblox.hostname_available")
 @patch("gso.workflows.router.create_router.infoblox.find_host_by_fqdn")
@@ -52,7 +51,6 @@ def test_create_nokia_router_success(
     mock_find_host_by_fqdn,
     mock_hostname_available,
     mock_netbox_create_device,
-    mock_provision_router,
     router_creation_input_form_data,
     router_role,
     faker,
@@ -113,7 +111,6 @@ def test_create_nokia_router_success(
     assert subscription.status == "provisioning"
     assert subscription.description == f"Router {mock_fqdn}"
 
-    assert mock_provision_router.call_count == 3
     assert mock_netbox_create_device.call_count == 1
     assert mock_find_host_by_fqdn.call_count == 1
     assert mock_sharepoint_client.call_count == 1
@@ -122,7 +119,6 @@ def test_create_nokia_router_success(
 
 @pytest.mark.workflow()
 @pytest.mark.parametrize("router_role", [RouterRole.P, RouterRole.PE])
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.router.create_router.NetboxClient.create_device")
 @patch("gso.workflows.router.create_router.infoblox.hostname_available")
 @patch("gso.workflows.router.create_router.infoblox.find_network_by_cidr")
@@ -140,7 +136,6 @@ def test_create_nokia_router_lso_failure(
     mock_find_network_by_cidr,
     mock_hostname_available,
     mock_netbox_create_device,
-    mock_provision_router,
     router_creation_input_form_data,
     router_role,
     faker,
@@ -198,7 +193,6 @@ def test_create_nokia_router_lso_failure(
     assert subscription.status == "initial"
     assert subscription.description == f"Router {mock_fqdn}"
 
-    assert mock_provision_router.call_count == 2
     assert mock_netbox_create_device.call_count == 0
     assert mock_find_host_by_fqdn.call_count == 0
     assert mock_find_network_by_cidr.call_count == 0
diff --git a/test/workflows/router/test_promote_p_to_pe.py b/test/workflows/router/test_promote_p_to_pe.py
index 46ab40b7f..3b510b360 100644
--- a/test/workflows/router/test_promote_p_to_pe.py
+++ b/test/workflows/router/test_promote_p_to_pe.py
@@ -18,11 +18,9 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.utils.workflow_steps.KentikClient")
 def test_promote_p_to_pe_success(
     mock_kentik_client,
-    mock_execute_playbook,
     router_subscription_factory,
     faker,
 ):
@@ -45,7 +43,7 @@ def test_promote_p_to_pe_success(
         result, step_log = assert_lso_interaction_success(result, process_stat, step_log)
     state = extract_state(result)
     assert_complete(result)
-    assert mock_execute_playbook.call_count == 24
+
     assert state["subscription"]["router"]["router_role"] == RouterRole.PE
 
 
@@ -66,8 +64,7 @@ def test_promote_p_to_pe_juniper_router(router_subscription_factory, faker):
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
-def test_promote_p_to_pe_nokia_pe_router(mock_execute_playbook, router_subscription_factory, faker):
+def test_promote_p_to_pe_nokia_pe_router(router_subscription_factory, faker):
     """Test that the workflow does not run for a Nokia PE router since it is already a PE router."""
     router_id = str(
         router_subscription_factory(
diff --git a/test/workflows/router/test_redeploy_base_config.py b/test/workflows/router/test_redeploy_base_config.py
index 5106c59aa..4dee5a5e9 100644
--- a/test/workflows/router/test_redeploy_base_config.py
+++ b/test/workflows/router/test_redeploy_base_config.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 
 from gso.products.product_types.router import Router
@@ -12,9 +10,7 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 def test_redeploy_base_config_success(
-    mock_provision_router,
     router_subscription_factory,
     faker,
 ):
@@ -35,4 +31,3 @@ def test_redeploy_base_config_success(
     subscription = Router.from_subscription(subscription_id)
 
     assert subscription.status == "active"
-    assert mock_provision_router.call_count == 2
diff --git a/test/workflows/router/test_terminate_router.py b/test/workflows/router/test_terminate_router.py
index a760472ef..a7303181e 100644
--- a/test/workflows/router/test_terminate_router.py
+++ b/test/workflows/router/test_terminate_router.py
@@ -12,7 +12,6 @@ from test.workflows import assert_complete, assert_lso_interaction_success, extr
 @pytest.mark.parametrize("remove_configuration", [True, False])
 @pytest.mark.parametrize("update_ibgp_mesh", [True, False])
 @pytest.mark.parametrize("update_sdp_mesh", [True, False])
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.router.terminate_router.NetboxClient.delete_device")
 @patch("gso.workflows.router.terminate_router.infoblox.delete_host_by_ip")
 @patch("gso.workflows.router.terminate_router.KentikClient")
@@ -22,7 +21,6 @@ def test_terminate_pe_router_full_success(
     mock_kentik_client,
     mock_delete_host_by_ip,
     mock_delete_device,
-    mock_execute_playbook,
     remove_configuration,
     update_ibgp_mesh,
     update_sdp_mesh,
@@ -65,13 +63,11 @@ def test_terminate_pe_router_full_success(
     assert mock_delete_device.call_count == 1
     assert mock_delete_host_by_ip.call_count == 1
     assert mock_librenms_remove_device.call_count == 1
-    assert mock_execute_playbook.call_count == lso_interaction_count
 
 
 @pytest.mark.workflow()
 @pytest.mark.parametrize("remove_configuration", [True, False])
 @pytest.mark.parametrize("update_ibgp_mesh", [True, False])
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.router.terminate_router.NetboxClient.delete_device")
 @patch("gso.workflows.router.terminate_router.infoblox.delete_host_by_ip")
 @patch("gso.workflows.router.terminate_router.LibreNMSClient.remove_device")
@@ -79,7 +75,6 @@ def test_terminate_p_router_full_success(
     mock_librenms_remove_device,
     mock_delete_host_by_ip,
     mock_delete_device,
-    mock_execute_playbook,
     remove_configuration,
     update_ibgp_mesh,
     router_subscription_factory,
@@ -117,4 +112,3 @@ def test_terminate_p_router_full_success(
     assert mock_delete_device.call_count == 1
     assert mock_delete_host_by_ip.call_count == 1
     assert mock_librenms_remove_device.call_count == 1
-    assert mock_execute_playbook.call_count == lso_interaction_count
diff --git a/test/workflows/router/test_update_ibgp_mesh.py b/test/workflows/router/test_update_ibgp_mesh.py
index 2cd098b39..ca7ae4ee7 100644
--- a/test/workflows/router/test_update_ibgp_mesh.py
+++ b/test/workflows/router/test_update_ibgp_mesh.py
@@ -21,13 +21,11 @@ from test.workflows import (
 @pytest.mark.parametrize("update_ibgp_mesh", [True, False])
 @pytest.mark.parametrize("update_sbp_mesh", [True, False])
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.workflows.router.update_ibgp_mesh.librenms_client.LibreNMSClient.add_device")
 @patch("gso.workflows.router.update_ibgp_mesh.librenms_client.LibreNMSClient.device_exists")
 def test_update_ibgp_mesh_success(
     mock_librenms_device_exists,
     mock_librenms_add_device,
-    mock_execute_playbook,
     update_sbp_mesh,
     update_ibgp_mesh,
     router_role,
@@ -80,7 +78,6 @@ def test_update_ibgp_mesh_success(
 
     state = extract_state(result)
 
-    assert mock_execute_playbook.call_count == callback_step_count
     assert mock_librenms_add_device.call_count == 1
     assert result.status == StepStatus.COMPLETE
     assert state["subscription"]["router"]["router_access_via_ts"] is False
diff --git a/test/workflows/router/test_validate_router.py b/test/workflows/router/test_validate_router.py
index 8e9397885..c67aa4e74 100644
--- a/test/workflows/router/test_validate_router.py
+++ b/test/workflows/router/test_validate_router.py
@@ -20,7 +20,6 @@ from test.workflows import (
 @pytest.mark.parametrize("router_role", [RouterRole.P, RouterRole.PE])
 @pytest.mark.workflow()
 @patch("gso.services.infoblox.find_host_by_fqdn")
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_device_by_name")
 @patch("gso.services.librenms_client.LibreNMSClient.validate_device")
 @patch("gso.services.kentik_client.KentikClient")
@@ -28,7 +27,6 @@ def test_validate_nokia_router_success(
     mock_kentik_client,
     mock_validate_librenms_device,
     mock_get_device_by_name,
-    mock_execute_playbook,
     mock_find_host_by_fqdn,
     router_subscription_factory,
     faker,
@@ -76,7 +74,7 @@ def test_validate_nokia_router_success(
     subscription = Router.from_subscription(subscription_id)
 
     assert subscription.status == router_state
-    assert mock_execute_playbook.call_count == lso_execution_count
+
     assert mock_find_host_by_fqdn.call_count == 1
     assert mock_get_device_by_name.call_count == 1
     assert mock_validate_librenms_device.call_count == 1
diff --git a/test/workflows/switch/test_create_switch.py b/test/workflows/switch/test_create_switch.py
index a6e02d83c..137ff7a66 100644
--- a/test/workflows/switch/test_create_switch.py
+++ b/test/workflows/switch/test_create_switch.py
@@ -20,12 +20,9 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.infoblox.hostname_available")
 @patch("gso.services.sharepoint.SharePointClient")
-def test_create_switch_success(
-    mock_sharepoint_client, mock_hostname_available, mock_execute_playbook, faker, site_subscription_factory
-):
+def test_create_switch_success(mock_sharepoint_client, mock_hostname_available, faker, site_subscription_factory):
     product_id = get_product_id_by_name(ProductName.SWITCH)
     initial_form_input = [
         {"product": product_id},
@@ -63,4 +60,3 @@ def test_create_switch_success(
     subscription_id = state["subscription_id"]
     subscription = Switch.from_subscription(subscription_id)
     assert subscription.status == "provisioning"
-    assert mock_execute_playbook.call_count == 3
diff --git a/test/workflows/switch/test_validate_switch.py b/test/workflows/switch/test_validate_switch.py
index 0e5a3b134..8b9c57693 100644
--- a/test/workflows/switch/test_validate_switch.py
+++ b/test/workflows/switch/test_validate_switch.py
@@ -12,11 +12,9 @@ from test.workflows import (
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
 @patch("gso.services.netbox_client.NetboxClient.get_device_by_name")
 def test_validate_switch_success(
     mock_get_device_by_name,
-    mock_execute_playbook,
     switch_subscription_factory,
     faker,
     geant_partner,
@@ -33,5 +31,5 @@ def test_validate_switch_success(
     subscription = Switch.from_subscription(state["subscription_id"])
 
     assert subscription.status == "active"
-    assert mock_execute_playbook.call_count == 1
+
     assert mock_get_device_by_name.call_count == 1
diff --git a/test/workflows/vrf/test_modify_vrf_router_list.py b/test/workflows/vrf/test_modify_vrf_router_list.py
index 2dbcd9ef1..47136c1f8 100644
--- a/test/workflows/vrf/test_modify_vrf_router_list.py
+++ b/test/workflows/vrf/test_modify_vrf_router_list.py
@@ -1,5 +1,4 @@
 import uuid
-from unittest.mock import patch
 
 import pytest
 from pydantic_forms.exceptions import FormValidationError
@@ -9,10 +8,7 @@ from test.workflows import assert_complete, assert_lso_interaction_success, extr
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
-def test_modify_vrf_router_list_add_a_router(
-    mock_lso_call, vrf_subscription_factory, router_subscription_factory, faker
-):
+def test_modify_vrf_router_list_add_a_router(vrf_subscription_factory, router_subscription_factory, faker):
     subscription_id = str(vrf_subscription_factory().subscription_id)
     initial_vrf_data = [
         {"subscription_id": subscription_id},
@@ -30,14 +26,10 @@ def test_modify_vrf_router_list_add_a_router(
     subscription = VRF.from_subscription(subscription_id)
     assert subscription.status == "active"
     assert len(subscription.vrf.vrf_router_list) == 1
-    assert mock_lso_call.call_count == 2
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
-def test_modify_vrf_router_list_remove_router(
-    mock_lso_call, vrf_subscription_factory, router_subscription_factory, faker
-):
+def test_modify_vrf_router_list_remove_router(vrf_subscription_factory, router_subscription_factory, faker):
     old_router = router_subscription_factory()
     subscription_id = str(vrf_subscription_factory(vrf_router_list=[old_router]).subscription_id)
     initial_vrf_data = [
@@ -56,7 +48,6 @@ def test_modify_vrf_router_list_remove_router(
     subscription = VRF.from_subscription(subscription_id)
     assert subscription.status == "active"
     assert len(subscription.vrf.vrf_router_list) == 0
-    assert mock_lso_call.call_count == 2
 
 
 @pytest.mark.workflow()
diff --git a/test/workflows/vrf/test_redeploy_vrf.py b/test/workflows/vrf/test_redeploy_vrf.py
index cb1d7f2e9..effabeb08 100644
--- a/test/workflows/vrf/test_redeploy_vrf.py
+++ b/test/workflows/vrf/test_redeploy_vrf.py
@@ -1,5 +1,3 @@
-from unittest.mock import patch
-
 import pytest
 
 from gso.products.product_types.vrf import VRF
@@ -7,8 +5,7 @@ from test.workflows import assert_complete, assert_lso_interaction_success, extr
 
 
 @pytest.mark.workflow()
-@patch("gso.services.lso_client._send_request")
-def test_redeploy_vrf(mock_lso_call, vrf_subscription_factory, router_subscription_factory, faker):
+def test_redeploy_vrf(vrf_subscription_factory, router_subscription_factory, faker):
     router_a = router_subscription_factory()
     router_b = router_subscription_factory()
     subscription_id = str(vrf_subscription_factory(vrf_router_list=[router_a, router_b]).subscription_id)
@@ -26,4 +23,3 @@ def test_redeploy_vrf(mock_lso_call, vrf_subscription_factory, router_subscripti
     subscription_id = state["subscription_id"]
     subscription = VRF.from_subscription(subscription_id)
     assert subscription.status == "active"
-    assert mock_lso_call.call_count == 2
-- 
GitLab