def _validate_cidr_overlap(self):
    region_networks = [IPNetwork(cidr) for cidr in self.region_cidrs.values()]
    all_networks = region_networks
    for i in xrange(len(all_networks)):
        for j in xrange((i + 1), len(all_networks)):
            left = all_networks[i]
            right = all_networks[j]
            if left.overlaps(right):
                raise YBOpsRuntimeError('IP blocks in the CIDRs overlap: {} - {}'.format(left, right))
def _validate_cidr_overlap(self):
    region_networks = [IPNetwork(cidr) for cidr in self.region_cidrs.values()]
    all_networks = region_networks
    for i in xrange(len(all_networks)):
        for j in xrange((i + 1), len(all_networks)):
            left = all_networks[i]
            right = all_networks[j]
            if left.overlaps(right):
                raise YBOpsRuntimeError('IP blocks in the CIDRs overlap: {} - {}'.format(left, right))