From af90b37a3393e4087083f33909901840d2e3871e Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Tue, 15 Mar 2022 21:52:44 +0000 Subject: [PATCH] bugfix: Use sub-interface name --- validator/interface.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validator/interface.py b/validator/interface.py index 976fe2b..d3f73d1 100644 --- a/validator/interface.py +++ b/validator/interface.py @@ -454,13 +454,13 @@ def validate_interfaces(yaml): msgs.append("sub-interface %s has l2xc so it cannot have an address" % (sub_ifname)) result = False if not get_by_name(yaml, sub_iface['l2xc']): - msgs.append("sub-interface %s l2xc target %s does not exist" % (ifname, sub_iface['l2xc'])) + msgs.append("sub-interface %s l2xc target %s does not exist" % (sub_ifname, sub_iface['l2xc'])) result = False if not is_l2xc_target_interface_unique(yaml, sub_iface['l2xc']): - msgs.append("sub-interface %s l2xc target %s is not unique" % (ifname, sub_iface['l2xc'])) + msgs.append("sub-interface %s l2xc target %s is not unique" % (sub_ifname, sub_iface['l2xc'])) result = False if is_bridge_interface(yaml, sub_iface['l2xc']): - msgs.append("sub-interface %s l2xc target %s is in a bridgedomain" % (ifname, sub_iface['l2xc'])) + msgs.append("sub-interface %s l2xc target %s is in a bridgedomain" % (sub_ifname, sub_iface['l2xc'])) result = False if has_lcp(yaml, sub_iface['l2xc']): msgs.append("sub-interface %s l2xc target %s cannot be an LCP" % (sub_ifname, sub_iface['l2xc']))