Commit aa41502c authored by Mark Schouten's avatar Mark Schouten
Browse files

Complain about invalid fields in configuration

parent 5df45d28
......@@ -106,6 +106,11 @@ def Validate(document):
raise ValueError("Invalid value for lacp_rate")
def Interface(iface, iname):
known_fields = [ 'description', 'name', 'addresses', 'adminstate', 'mtu', 'ratelimit', 'slaves', 'type', 'vlanid', 'parent', 'bond-mode', 'miimon', 'lacp_rate' ]
for f in iface.keys():
if f not in known_fields:
raise ValueError("Invalid field in config for interface %s: %s" % (iname, f))
ret = {}
ret['name'] = iname
if iname == 'lo':
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment