Make code match documentation :-)
Bridge Domains must be [1,16M), Loopbacks must be [0,4096). Loopbacks should be allowed to have an address without an LCP. => Reuse the unittest file for the bounds check for loopbacks. => Add a new unittest file for the bounds check for bridgedomains.
This commit is contained in:
@ -99,6 +99,10 @@ def validate_bridgedomains(yaml):
|
||||
if instance == 0:
|
||||
msgs.append("bridgedomain %s is reserved" % ifname)
|
||||
result = False
|
||||
elif instance > 16777215:
|
||||
msgs.append("bridgedomain %s has instance %d which is too large" % (ifname, instance))
|
||||
result = False
|
||||
|
||||
if 'bvi' in iface:
|
||||
bviname = iface['bvi']
|
||||
if (None,None) == loopback.get_by_name(yaml, bviname):
|
||||
|
Reference in New Issue
Block a user