diff --git a/gso/workflows/iptrunk/create_iptrunk.py b/gso/workflows/iptrunk/create_iptrunk.py index 440bb8e2ac0eef37df5af277864e126d61245214..30f2c46b172707fa905055339db060e57f81f440 100644 --- a/gso/workflows/iptrunk/create_iptrunk.py +++ b/gso/workflows/iptrunk/create_iptrunk.py @@ -494,11 +494,15 @@ def netbox_allocate_side_b_interfaces(subscription: IptrunkInactive) -> None: @step("Create a new SharePoint checklist item") -def create_new_sharepoint_checklist(subscription: IptrunkProvisioning, tt_number: str) -> State: +def create_new_sharepoint_checklist(subscription: IptrunkProvisioning, tt_number: str, process_id: UUIDstr) -> State: """Create a new checklist item in SharePoint for approving this IPtrunk.""" new_list_item_url = SharePointClient().add_list_item( - "ip_trunk", - {"Title": f"{subscription.description} - {subscription.iptrunk.geant_s_sid}", "TT_NUMBER": tt_number}, + list_name="ip_trunk", + fields={ + "Title": f"{subscription.description} - {subscription.iptrunk.geant_s_sid}", + "TT_NUMBER": tt_number, + "GAP_PROCESS_URL": f"{load_oss_params().GENERAL.public_hostname}/workflows/{process_id}", + }, ) return {"checklist_url": new_list_item_url} diff --git a/gso/workflows/router/create_router.py b/gso/workflows/router/create_router.py index 233d982c0ea1a275b12b9540399c1bbd4d8b20dd..700f3f9c86112562d1a1ef127dad209da22b96be 100644 --- a/gso/workflows/router/create_router.py +++ b/gso/workflows/router/create_router.py @@ -21,6 +21,7 @@ from gso.services.lso_client import lso_interaction from gso.services.netbox_client import NetboxClient from gso.services.partners import get_partner_by_name from gso.services.sharepoint import SharePointClient +from gso.settings import load_oss_params from gso.utils.helpers import generate_fqdn, iso_from_ipv4 from gso.utils.shared_enums import PortNumber, Vendor from gso.utils.workflow_steps import ( @@ -224,10 +225,15 @@ def prompt_insert_in_radius(subscription: RouterInactive) -> FormGenerator: @step("Create a new SharePoint checklist") -def create_new_sharepoint_checklist(subscription: RouterProvisioning, tt_number: str) -> State: +def create_new_sharepoint_checklist(subscription: RouterProvisioning, tt_number: str, process_id: UUIDstr) -> State: """Create a new checklist in SharePoint for approving this router.""" new_list_item_url = SharePointClient().add_list_item( - "p_router", {"Title": subscription.router.router_fqdn, "TT_NUMBER": tt_number} + list_name="p_router", + fields={ + "Title": subscription.router.router_fqdn, + "TT_NUMBER": tt_number, + "GAP_PROCESS_URL": f"{load_oss_params().GENERAL.public_hostname}/workflows/{process_id}", + }, ) return {"checklist_url": new_list_item_url}