raiseConfigError('DHCP range start IP "{0}" is not in subnet "{1}" specified in network "{2}."'.format(range['start'],subnet['network'],network['name']))
raiseConfigError('DHCP range stop IP "{0}" is not in subnet "{1}" specified in network "{2}."'.format(range['stop'],subnet['network'],network['name']))
# Stop address must be greater or equal to start address
raiseConfigError('Exclude IP "{0}" is outside of the DHCP lease network "{1}" under shared network "{2}".'.format(exclude,subnet['network'],network['name']))
# At least one DHCP address range or static-mapping required
active_mapping=False
if(len(subnet['range'])==0):
formappinginsubnet['static_mapping']:
# we need at least one active mapping
if(notactive_mapping)and(notmapping['disabled']):
active_mapping=True
else:
active_mapping=True
ifnotactive_mapping:
raiseConfigError('No DHCP address range or active static-mapping set for subnet "{0}".'.format(subnet['network']))
# Static IP address mappings require both an IP address and MAC address
formappinginsubnet['static_mapping']:
# Static IP address must be configured
ifnotmapping['ip_address']:
raiseConfigError('No static lease IP address specified for static mapping "{0}" under shared network name "{1}".'.format(mapping['name'],network['name']))
raiseConfigError('Static DHCP lease IP "{0}" under static mapping "{1}" in shared network "{2}" is outside DHCP lease network "{3}".'.format(mapping['ip_address'],mapping['name'],network['name'],subnet['network'],))
# Static mapping requires MAC address
ifnotmapping['mac_address']:
raiseConfigError('No static lease MAC address specified for static mapping "{0}" under shared network name "{1}".'.format(mapping['name'],network['name']))
#
# There must be one subnet connected to a real interface