'check if there is a subnet within the network with dhcp enabled.'

def _enable_dhcp(self):

    for subnet in self.network.subnets:
        if subnet.enable_dhcp:
            return True
    return False
