diff --git a/gso/workflows/router/terminate_router.py b/gso/workflows/router/terminate_router.py index 395f8c7a103d3dea63db0094c6ad8655dee43431..688e3ecc21543ddc5ca678296b763fe7c6194bb5 100644 --- a/gso/workflows/router/terminate_router.py +++ b/gso/workflows/router/terminate_router.py @@ -98,7 +98,7 @@ def remove_config_from_router_real( } execute_playbook( - playbook_name="base_config.yaml", + playbook_name="base_config.yaml", # FIX: need to use correct playbook. callback_route=callback_route, inventory=subscription.router.router_fqdn, extra_vars=extra_vars, @@ -117,7 +117,7 @@ def remove_p_from_all_pe_dry(subscription: Router, callback_route: str, tt_numbe """Perform a dry run of removing the terminated router from all the PE routers.""" extra_vars = { "dry_run": True, - "subscription": subscription, + "subscription": json.loads(json_dumps(subscription)), "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - " f"Remove {subscription.router.router_fqdn} from all the PE routers", "verb": "remove_p_from_pe", @@ -136,7 +136,7 @@ def remove_p_from_all_pe_real(subscription: Router, callback_route: str, tt_numb """Perform a real run of removing the terminated router from all the PE routers.""" extra_vars = { "dry_run": False, - "subscription": subscription, + "subscription": json.loads(json_dumps(subscription)), "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - " f"Remove {subscription.router.router_fqdn} from all the PE routers", "verb": "remove_p_from_pe", @@ -152,13 +152,13 @@ def remove_p_from_all_pe_real(subscription: Router, callback_route: str, tt_numb @step("[DRY RUN] Remove PE router from all the PE routers") def remove_pe_from_all_pe_dry(subscription: Router, callback_route: str, tt_number: str, process_id: UUIDstr) -> None: - """Perform a dry run of removing the terminated router from all the PE routers.""" + """Perform a dry run of removing the terminated PE router from the PE router mesh.""" extra_vars = { "dry_run": True, - "subscription": subscription, + "subscription": json.loads(json_dumps(subscription)), "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - " f"Remove {subscription.router.router_fqdn} from all the PE routers", - "verb": "remove_p_from_net", + "verb": "remove_pe_from_pe", } lso_client.execute_playbook( @@ -173,13 +173,13 @@ def remove_pe_from_all_pe_dry(subscription: Router, callback_route: str, tt_numb @step("[REAL RUN] Remove all PE routers from all the PE routers") def remove_pe_from_all_pe_real(subscription: Router, callback_route: str, tt_number: str, process_id: UUIDstr) -> None: - """Perform a real run of removing PE router from P router iBGP table.""" + """Perform a real run of removing terminated PE router from PE the router mesh.""" extra_vars = { "dry_run": False, - "subscription": subscription, + "subscription": json.loads(json_dumps(subscription)), "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - " f"Remove {subscription.router.router_fqdn} from iBGP mesh", - "verb": "remove_p_from_net", + "verb": "remove_pe_from_pe", } lso_client.execute_playbook( @@ -197,7 +197,7 @@ def remove_pe_from_all_p_dry(subscription: Router, callback_route: str, tt_numbe """Perform a dry run of removing PE router from all P routers.""" extra_vars = { "dry_run": True, - "subscription": subscription, + "subscription": json.loads(json_dumps(subscription)), "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - " f"Remove {subscription.router.router_fqdn} from all the P routers", "verb": "remove_pe_from_p", @@ -213,10 +213,10 @@ def remove_pe_from_all_p_dry(subscription: Router, callback_route: str, tt_numbe @step("[REAL RUN] Remove PE router from all P routers") def remove_pe_from_all_p_real(subscription: Router, callback_route: str, tt_number: str, process_id: UUIDstr) -> None: - """Perform a dry run of removing PE router from all P routers.""" + """Perform a real run of removing PE router from all P routers.""" extra_vars = { "dry_run": False, - "subscription": subscription, + "subscription": json.loads(json_dumps(subscription)), "commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - " f"Remove {subscription.router.router_fqdn} from all the P routers", "verb": "remove_pe_from_p",