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

Add check for empty extra_vars item

if in extra_vars a var that is a result of `generate_inventory..`
function is empty, skip the lso_interaction step altogether.

Kudos to KvK.
parent de18499d
No related branches found
No related tags found
1 merge request!279Feature/sdp bgp mesh update
Pipeline #89523 passed
......@@ -93,6 +93,13 @@ def _update_sdp_single_pe(
)["all"]["hosts"],
}
if not extra_vars["pe_router_list"]:
return {
"playbook_name": "",
"inventory": {"all": {"hosts": {}}},
"extra_vars": {},
}
return {
"playbook_name": "update_pe_sdp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
......@@ -118,6 +125,13 @@ def _add_pe_mesh_to_pe(
)["all"]["hosts"],
}
if not extra_vars["pe_router_list"]:
return {
"playbook_name": "",
"inventory": {"all": {"hosts": {}}},
"extra_vars": {},
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
......@@ -167,6 +181,13 @@ def _add_all_p_to_pe(
)["all"]["hosts"],
}
if not extra_vars["p_router_list"]:
return {
"playbook_name": "",
"inventory": {"all": {"hosts": {}}},
"extra_vars": {},
}
return {
"playbook_name": "update_ibgp_mesh.yaml",
"inventory": {"all": {"hosts": {subscription["router"]["router_fqdn"]: None}}},
......
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