def _GetPortList(range_list):
  """Creates list of singleton port numbers from list of ports and ranges."""
  ports = []
  for port_range in range_list:
    ports.extend(list(range(port_range.start, port_range.end + 1)))
  return sorted(ports)