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

`promote_p_to_pe`: update in `add_all_p_to_pe`

extra_vars: need to exclude this promoted router, since it is still `P`
role.
parent cb6b5c2f
No related branches found
No related tags found
1 merge request!263`promote_p_to_pe`: update in `add_all_p_to_pe`
......@@ -440,7 +440,7 @@ def update_subscription_model(subscription: Router) -> State:
return {"subscription": subscription}
@step("[DRY RUN] Add all P to PE")
@step("[DRY RUN] Add all P to this new PE")
def add_all_p_to_pe_dry(subscription: dict[str, Any], callback_route: str, tt_number: str, process_id: UUIDstr) -> None:
"""Perform a dry run of adding all P routers to the PE router."""
extra_vars = {
......@@ -448,7 +448,9 @@ def add_all_p_to_pe_dry(subscription: dict[str, Any], callback_route: str, tt_nu
"subscription": subscription,
"commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Add all P-routers to this new PE",
"verb": "add_all_p_to_pe",
"p_router_list": generate_inventory_for_active_routers(RouterRole.P)["all"]["hosts"],
"p_router_list": generate_inventory_for_active_routers(
RouterRole.P, exclude_routers=[subscription["router"]["router_fqdn"]]
)["all"]["hosts"],
}
lso_client.execute_playbook(
......@@ -459,7 +461,7 @@ def add_all_p_to_pe_dry(subscription: dict[str, Any], callback_route: str, tt_nu
)
@step("[FOR REAL] Add all P to PE")
@step("[FOR REAL] Add all P to this new PE")
def add_all_p_to_pe_real(
subscription: dict[str, Any], callback_route: str, tt_number: str, process_id: UUIDstr
) -> None:
......@@ -469,7 +471,9 @@ def add_all_p_to_pe_real(
"subscription": subscription,
"commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Add all P-routers to this new PE",
"verb": "add_all_p_to_pe",
"p_router_list": generate_inventory_for_active_routers(RouterRole.P)["all"]["hosts"],
"p_router_list": generate_inventory_for_active_routers(
RouterRole.P, exclude_routers=[subscription["router"]["router_fqdn"]]
)["all"]["hosts"],
}
lso_client.execute_playbook(
......
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