@classmethod
    def _update_range_from_cidr(
            cls, instance, cidr, use_gateway=False):
        first_idx = 2 if use_gateway else 1
        new_cidr = IPNetwork(cidr)
        ip_range = (str(new_cidr[first_idx]), str(new_cidr[-2]))
        cls._set_ip_ranges(instance, [ip_range])
Update network ranges for CIDR.
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/extensions/network_manager/objects/network_group.py/NetworkGroup._update_range_from_cidr