def is_cidr_host(cidr):
    if '/' not in str(cidr):
        raise ValueError("cidr doesn't contain a '/'")
    net = netaddr.IPNetwork(cidr)
    if net.version == 4:
        return net.prefixlen == n_const.IPv4_BITS
    return net.prefixlen == n_const.IPv6_BITS
Determines if the cidr passed in represents a single host network
dataset/ETHPy150Open openstack/neutron/neutron/common/utils.py/is_cidr_host