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

Adding LLDP check after fiber move

parent dd30eea3
No related branches found
No related tags found
1 merge request!228Add LLDP check during IPTrunk migration
......@@ -266,6 +266,34 @@ def check_ip_trunk_optical_levels_post(
return {"subscription": subscription}
@step("Check LLDP on the trunk endpoints")
def check_ip_trunk_lldp(
subscription: Iptrunk,
callback_route: str,
new_node: Router,
new_lag_member_interfaces: list[dict],
replace_index: int,
) -> State:
"""Check LLDP on the new trunk endpoints."""
extra_vars = {
"wfo_ip_trunk_json": json.loads(json_dumps(subscription)),
"new_node": json.loads(json_dumps(new_node)),
"new_lag_member_interfaces": new_lag_member_interfaces,
"replace_index": replace_index,
"check": "lldp",
}
execute_playbook(
playbook_name="iptrunks_checks.yaml",
callback_route=callback_route,
inventory=f"{subscription.iptrunk.iptrunk_sides[1 - replace_index].iptrunk_side_node.router_fqdn}\n"
f"{new_node.router.router_fqdn}\n",
extra_vars=extra_vars,
)
return {"subscription": subscription}
@step("[DRY RUN] Disable configuration on old router")
def disable_old_config_dry(
subscription: Iptrunk,
......@@ -830,6 +858,7 @@ def migrate_iptrunk() -> StepList:
>> trunk_type_is_leased(lso_interaction(update_remaining_side_bfd_real))
>> confirm_continue_move_fiber
>> lso_interaction(check_ip_trunk_optical_levels_post)
>> lso_interaction(check_ip_trunk_lldp)
>> trunk_type_is_leased(lso_interaction(check_ip_trunk_bfd))
>> lso_interaction(check_ip_trunk_connectivity)
>> lso_interaction(deploy_new_isis)
......
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