From 7f913205a83a214dec6b6056136c0f3d2f0d9e4c Mon Sep 17 00:00:00 2001
From: Aleksandr Kurbatov <ak@geant.org>
Date: Wed, 23 Oct 2024 16:13:29 +0100
Subject: [PATCH] validate_edge_port: add partner_name

---
 gso/workflows/edge_port/validate_edge_port.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gso/workflows/edge_port/validate_edge_port.py b/gso/workflows/edge_port/validate_edge_port.py
index 2a29a641..af82afee 100644
--- a/gso/workflows/edge_port/validate_edge_port.py
+++ b/gso/workflows/edge_port/validate_edge_port.py
@@ -12,6 +12,7 @@ from orchestrator.workflows.utils import wrap_modify_initial_input_form
 from gso.products.product_types.edge_port import EdgePort
 from gso.services.lso_client import LSOState, anonymous_lso_interaction
 from gso.services.netbox_client import NetboxClient
+from gso.services.partners import get_partner_by_id
 
 
 @step("Prepare required keys in state")
@@ -58,12 +59,14 @@ def verify_netbox_entries(subscription: EdgePort) -> None:
 @step("Check base config for drift")
 def verify_base_config(subscription: dict[str, Any]) -> LSOState:
     """Workflow step for running a playbook that checks whether base config has drifted."""
+    partner_name = get_partner_by_id(subscription["customer_id"]).name
     return {
         "playbook_name": "gap_ansible/playbooks/edge_port.yaml",
         "inventory": {"all": {"hosts": {subscription["edge_port"]["node"]["router_fqdn"]: None}}},
         "extra_vars": {
             "dry_run": True,
             "subscription": subscription,
+            "partner_name": partner_name,
             "verb": "create",
             "is_verification_workflow": "true",
         },
-- 
GitLab