def select_host_ids(self):
    """Select the IDs of all the hosts.

    :return: A dict of host names to IDs.
    """
    return dict((str(x[1]), int(x[0]))
                for x in self.hosts.select().execute().fetchall())