'Validate all subnets on the given network have been allocated from
the same subnet pool as new_subnetpool_id'

def _validate_network_subnetpools(self, network, new_subnetpool_id, ip_version):

    for subnet in network.subnets:
        if ((subnet.ip_version == ip_version) and (new_subnetpool_id != subnet.subnetpool_id)):
            raise n_exc.NetworkSubnetPoolAffinityError()
