def cidr_to_dict(cidr):
    from .. import validators
    cidr = validators.validate_cidr(cidr)
    return {
        'network_address': cidr.network_address,
        'prefix_length': cidr.prefixlen,
    }


#: Namedtuple for resultant items from ``parse_set_query()``
Take a cidr and return it as a dictionary.
dataset/ETHPy150Open dropbox/nsot/nsot/util/core.py/cidr_to_dict