Skip to content
Snippets Groups Projects

Feature/lan switch interconnect

Merged Karel van Klink requested to merge feature/lan-switch-interconnect into develop
19 files
+ 236
27
Compare changes
  • Side-by-side
  • Inline
Files
19
@@ -6,7 +6,6 @@ from orchestrator.config.assignee import Assignee
from orchestrator.forms import FormPage
from orchestrator.targets import Target
from orchestrator.types import FormGenerator, State, SubscriptionLifecycle, UUIDstr
from orchestrator.utils.errors import ProcessFailureError
from orchestrator.workflow import StepList, begin, done, inputstep, step, workflow
from orchestrator.workflows.steps import resync, set_status, store_process_subscription
from orchestrator.workflows.utils import wrap_create_initial_input_form
@@ -15,7 +14,7 @@ from pydantic_forms.validators import Label, ReadOnlyField
from gso.products.product_blocks.switch import SwitchModel
from gso.products.product_types.site import Site
from gso.products.product_types.switch import SwitchInactive
from gso.products.product_types.switch import SwitchInactive, SwitchProvisioning
from gso.services import infoblox
from gso.services.lso_client import LSOState, lso_interaction
from gso.services.partners import get_partner_by_name
@@ -36,7 +35,7 @@ def _initial_input_form_generator(product_name: str) -> FormGenerator:
tt_number: TTNumber
partner: ReadOnlyField("GEANT", default_type=str) # type: ignore[valid-type]
switch_site: active_site_selector() # type: ignore[valid-type]
switch_site: active_site_selector() or str # type: ignore[valid-type]
hostname: str
ts_port: PortNumber
vendor: ReadOnlyField(Vendor.JUNIPER, default_type=Vendor) # type: ignore[valid-type]
@@ -168,12 +167,8 @@ def run_post_deploy_checks(subscription: dict) -> LSOState:
@step("Create a new SharePoint checklist")
def create_new_sharepoint_checklist(subscription: SwitchInactive, tt_number: str, process_id: UUIDstr) -> State:
def create_new_sharepoint_checklist(subscription: SwitchProvisioning, tt_number: str, process_id: UUIDstr) -> State:
"""Create a new checklist in SharePoint for approving this router."""
if not subscription.switch.fqdn:
msg = "Switch is missing an FQDN."
raise ProcessFailureError(msg, details=subscription.subscription_id)
new_list_item_url = SharePointClient().add_list_item(
list_name="switch",
fields={
Loading