Add TAP syntax/semantic validator
This commit is contained in:
@ -33,6 +33,7 @@ from config.bondethernet import validate_bondethernets
|
||||
from config.interface import validate_interfaces
|
||||
from config.bridgedomain import validate_bridgedomains
|
||||
from config.vxlan_tunnel import validate_vxlan_tunnels
|
||||
from config.tap import validate_taps
|
||||
|
||||
from yamale.validators import DefaultValidators, Validator
|
||||
|
||||
@ -136,6 +137,12 @@ class Validator(object):
|
||||
if not rv:
|
||||
ret_rv = False
|
||||
|
||||
rv, msgs = validate_taps(yaml)
|
||||
if msgs:
|
||||
ret_msgs.extend(msgs)
|
||||
if not rv:
|
||||
ret_rv = False
|
||||
|
||||
if ret_rv:
|
||||
self.logger.debug("Semantics correctly validated")
|
||||
return ret_rv, ret_msgs
|
||||
|
Reference in New Issue
Block a user