diff --git a/gso/workflows/router/create_router.py b/gso/workflows/router/create_router.py index f33dcec56f8314c2ebd188f7e5d9df6865caa032..30e7175e3b498429b69be648955d4a6253177011 100644 --- a/gso/workflows/router/create_router.py +++ b/gso/workflows/router/create_router.py @@ -203,6 +203,25 @@ def prompt_insert_in_ims() -> FormGenerator: return {} +@inputstep("Prompt RADIUS insertion", assignee=Assignee.SYSTEM) +def prompt_insert_in_radius(subscription: RouterInactive) -> FormGenerator: + """Wait for confirmation from an operator that the router has been inserted in RADIUS.""" + + class RadiusPrompt(FormPage): + class Config: + title = "Update RADIUS clients" + + info_label_1: Label = ( + f"Please go to https://kratos.geant.org/add_radius_client and add the {subscription.router.router_fqdn}" # type: ignore[assignment] + f" - {subscription.router.router_lo_ipv4_address} to radius authentication" + ) + info_label_2: Label = "This will be functionally checked later during verification work." # type: ignore[assignment] + + yield RadiusPrompt + + return {} + + @workflow( "Create router", initial_input_form=wrap_create_initial_input_form(initial_input_form_generator), @@ -231,6 +250,7 @@ def create_router() -> StepList: >> prompt_reboot_router >> prompt_console_login >> prompt_insert_in_ims + >> prompt_insert_in_radius >> router_is_nokia(create_netbox_device) >> pp_interaction(run_checks_after_base_config) >> set_status(SubscriptionLifecycle.PROVISIONING) diff --git a/test/workflows/router/test_create_router.py b/test/workflows/router/test_create_router.py index efa7e6732c524cbf1d6edf0584fe207b070efcdf..fbfd09e416875e44aa9ffb30740a9c5325e8c1fe 100644 --- a/test/workflows/router/test_create_router.py +++ b/test/workflows/router/test_create_router.py @@ -87,8 +87,8 @@ def test_create_nokia_router_success( for _ in range(2): result, step_log = assert_pp_interaction_success(result, process_stat, step_log) - # Handle three consecutive user input steps - for _ in range(3): + # Handle four consecutive user input steps + for _ in range(4): assert_suspended(result) result, step_log = resume_workflow(process_stat, step_log, input_data=USER_CONFIRM_EMPTY_FORM)