def _get_matching_hosts(self, host_type, count):
    hosts = self.get_hosts()
    return [{'id': h['id'], 'role': host_type} for h in hosts if (host_type in h['requested_hostname'])][:count]
def _get_matching_hosts(self, host_type, count):
    hosts = self.get_hosts()
    return [{'id': h['id'], 'role': host_type} for h in hosts if (host_type in h['requested_hostname'])][:count]