def get_ip_range(oms_spec, key): if key in oms_spec: start, end = oms_spec[key].split('-') return iter_iprange(start, end)