Skip to content
Snippets Groups Projects
Commit 9d5834b2 authored by Aleksandr Kurbatov's avatar Aleksandr Kurbatov
Browse files

Small fixes to terminate_router workflow

parent 8ac8442a
No related branches found
No related tags found
1 merge request!231Added more steps in router termination including:
Pipeline #88081 passed
......@@ -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",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment