def cidr(cls, value): """ Convert a string to a network CIDR """ value = cls._standardize_cidr_format(value) value = ipaddress.IPv4Interface(value).network.exploded return value