Skip to content
Snippets Groups Projects
Commit 2323d627 authored by Neda Moeini's avatar Neda Moeini
Browse files

Added process URL to the Sharepoint checklist.

parent 33acd1ef
Branches
Tags
1 merge request!229Added process URL to the Sharepoint checklist.
Pipeline #87639 failed
...@@ -494,11 +494,15 @@ def netbox_allocate_side_b_interfaces(subscription: IptrunkInactive) -> None: ...@@ -494,11 +494,15 @@ def netbox_allocate_side_b_interfaces(subscription: IptrunkInactive) -> None:
@step("Create a new SharePoint checklist item") @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.""" """Create a new checklist item in SharePoint for approving this IPtrunk."""
new_list_item_url = SharePointClient().add_list_item( new_list_item_url = SharePointClient().add_list_item(
"ip_trunk", list_name="ip_trunk",
{"Title": f"{subscription.description} - {subscription.iptrunk.geant_s_sid}", "TT_NUMBER": tt_number}, 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} return {"checklist_url": new_list_item_url}
......
...@@ -21,6 +21,7 @@ from gso.services.lso_client import lso_interaction ...@@ -21,6 +21,7 @@ from gso.services.lso_client import lso_interaction
from gso.services.netbox_client import NetboxClient from gso.services.netbox_client import NetboxClient
from gso.services.partners import get_partner_by_name from gso.services.partners import get_partner_by_name
from gso.services.sharepoint import SharePointClient 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.helpers import generate_fqdn, iso_from_ipv4
from gso.utils.shared_enums import PortNumber, Vendor from gso.utils.shared_enums import PortNumber, Vendor
from gso.utils.workflow_steps import ( from gso.utils.workflow_steps import (
...@@ -224,10 +225,15 @@ def prompt_insert_in_radius(subscription: RouterInactive) -> FormGenerator: ...@@ -224,10 +225,15 @@ def prompt_insert_in_radius(subscription: RouterInactive) -> FormGenerator:
@step("Create a new SharePoint checklist") @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.""" """Create a new checklist in SharePoint for approving this router."""
new_list_item_url = SharePointClient().add_list_item( 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} return {"checklist_url": new_list_item_url}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment