diff --git a/gso/services/provisioning_proxy.py b/gso/services/provisioning_proxy.py index aa8ab9ca81cc88d6ab5c3f0804ea60b6ae709e0e..232ed3f1a5b8d9efb2d49e6edd8dbc8769b49a22 100644 --- a/gso/services/provisioning_proxy.py +++ b/gso/services/provisioning_proxy.py @@ -21,8 +21,6 @@ from gso.products.product_types.iptrunk import Iptrunk, IptrunkProvisioning from gso.products.product_types.router import Router, RouterProvisioning logger = logging.getLogger(__name__) -DEFAULT_LABEL = "Provisioning proxy is running. Please come back later for the results." -"""The default label displayed when the provisioning proxy is running, in case no custom label is provided.""" class CUDOperation(strEnum): @@ -256,7 +254,7 @@ def migrate_ip_trunk( _send_request("ip_trunk/migrate", parameters, callback_route, CUDOperation.POST) -@step("Evaluate user input for provisioning proxy") +@step("Evaluate provisioning proxy result") def _evaluate_pp_results(callback_result: dict) -> State: if callback_result["return_code"] != 0: raise ProcessFailureError(message="Provisioning proxy failure", details=callback_result) @@ -264,14 +262,6 @@ def _evaluate_pp_results(callback_result: dict) -> State: return {"callback_result": callback_result} -@step("Clean up the state after external provisioning") -def _clean_up_state(state: State) -> State: - for old_key in ["callback_route", "callback_result", "__callback_token"]: - state.pop(old_key, None) - - return state - - @inputstep("Confirm provisioning proxy results", assignee=Assignee("SYSTEM")) def _show_pp_results(state: State) -> FormGenerator: if "callback_result" not in state: @@ -289,6 +279,8 @@ def _show_pp_results(state: State) -> FormGenerator: def pp_interaction(provisioning_step: Step, interaction_name: str) -> StepList: - return begin >> callback_step( - name=interaction_name, action_step=provisioning_step, validate_step=_evaluate_pp_results - ) >> _show_pp_results >> _clean_up_state + return ( + begin + >> callback_step(name=interaction_name, action_step=provisioning_step, validate_step=_evaluate_pp_results) + >> _show_pp_results + )