Skip to content
Snippets Groups Projects
Commit 07ada899 authored by Karel van Klink's avatar Karel van Klink :smiley_cat: Committed by Neda Moeini
Browse files

Add check for enabled interfaces

parent 0e7082e7
Branches
Tags
1 merge request!139Feature/add validation workflows
......@@ -126,6 +126,8 @@ def verify_netbox_entries(subscription: Iptrunk):
f"'{subscription.subscription_id}' but got '{interface.description}'"
)
]
if not interface.enabled:
netbox_errors += [f"NetBox interface '{side.iptrunk_side_ae_iface}' is not enabled."]
for member in side.iptrunk_side_ae_members:
interface = nbclient.get_interface_by_name_and_device(
member.interface_name, side.iptrunk_side_node.router_fqdn
......@@ -137,6 +139,8 @@ def verify_netbox_entries(subscription: Iptrunk):
f"'{subscription.subscription_id}' but got '{interface.description}'"
)
]
if not interface.enabled:
netbox_errors += [f"NetBox interface '{side.iptrunk_side_ae_iface}' is not enabled."]
if netbox_errors:
raise ProcessFailureError(message="NetBox misconfiguration(s) found", details=str(netbox_errors))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment