Only loop over loopbacks if they are present in the config
This commit is contained in:
@ -20,7 +20,10 @@ def loopback(args, yaml):
|
|||||||
logger = logging.getLogger('vppcfg.validator')
|
logger = logging.getLogger('vppcfg.validator')
|
||||||
logger.addHandler(NullHandler())
|
logger.addHandler(NullHandler())
|
||||||
|
|
||||||
|
if not 'loopbacks' in yaml:
|
||||||
|
return result, msgs
|
||||||
|
|
||||||
logger.debug("Validating loopbacks...")
|
logger.debug("Validating loopbacks...")
|
||||||
for ifname, iface in yaml['loopbacks'].items():
|
for ifname, iface in yaml['loopbacks'].items():
|
||||||
logger.debug("loopbacks %s" % iface)
|
logger.debug("loopback %s" % iface)
|
||||||
return result, msgs
|
return result, msgs
|
||||||
|
Reference in New Issue
Block a user