Continue validation even after error occurs, catching as many errors as possible for the user

This commit is contained in:
Pim van Pelt
2022-03-13 09:58:29 +00:00
parent be102d5b6d
commit 9250e07aed
2 changed files with 0 additions and 2 deletions

View File

@ -30,7 +30,6 @@ def bondethernet(args, yaml):
if not interface.exists(yaml, member): if not interface.exists(yaml, member):
msgs.append("bondethernet %s member %s doesn't exist" % (ifname, member)) msgs.append("bondethernet %s member %s doesn't exist" % (ifname, member))
result = False result = False
continue
if interface.has_sub(yaml, member): if interface.has_sub(yaml, member):
msgs.append("bondethernet %s member %s has sub-interface(s)" % (ifname, member)) msgs.append("bondethernet %s member %s has sub-interface(s)" % (ifname, member))

View File

@ -120,7 +120,6 @@ def interface(args, yaml):
if ifname.startswith("BondEthernet") and not bondethernet.exists(yaml, ifname): if ifname.startswith("BondEthernet") and not bondethernet.exists(yaml, ifname):
msgs.append("interface %s does not exist in bondethernets" % ifname) msgs.append("interface %s does not exist in bondethernets" % ifname)
result = False result = False
continue
iface_lcp = has_lcp(yaml, ifname) iface_lcp = has_lcp(yaml, ifname)
iface_address = has_address(yaml, ifname) iface_address = has_address(yaml, ifname)