Skip to content
Snippets Groups Projects

Update empty extra_vars and PE router list in ibgp mesh update

Merged Karel van Klink requested to merge feature/update-extra-vars into develop
@@ -125,7 +125,7 @@ def add_all_pe_to_p_dry(subscription: dict[str, Any]) -> LSOState:
extra_vars = {
"dry_run": True,
"subscription": subscription,
"pe_router_list": generate_inventory_for_routers(RouterRole.PE),
"pe_router_list": generate_inventory_for_routers(RouterRole.PE)["all"]["hosts"],
"verb": "add_pe_to_p",
}
@@ -142,7 +142,7 @@ def add_all_pe_to_p_real(subscription: dict[str, Any], tt_number: str, process_i
extra_vars = {
"dry_run": False,
"subscription": subscription,
"pe_router_list": generate_inventory_for_routers(RouterRole.PE),
"pe_router_list": generate_inventory_for_routers(RouterRole.PE)["all"]["hosts"],
"commit_comment": f"GSO_PROCESS_ID: {process_id} - TT_NUMBER: {tt_number} - Update iBGP mesh",
"verb": "add_pe_to_p",
}
@@ -155,12 +155,12 @@ def add_all_pe_to_p_real(subscription: dict[str, Any], tt_number: str, process_i
@step("Verify iBGP session health")
def check_ibgp_session(subscription: Router) -> LSOState:
def check_ibgp_session(subscription: dict[str, Any]) -> LSOState:
"""Run a playbook using the provisioning proxy, to check the health of the new iBGP session."""
return {
"playbook_name": "gap_ansible/playbooks/check_ibgp.yaml",
"inventory": {"all": {"hosts": {subscription.router.router_fqdn: None}}},
"extra_vars": {},
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
"extra_vars": {"subscription": subscription},
}
Loading