'Get all hosts by paging through the results'

def _get_hosts(self):

    limit = self.cloudforms_limit
    page = 0
    last_page = False
    results = []
    while (not last_page):
        offset = (page * limit)
        ret = self._get_json(('%s/api/vms?offset=%s&limit=%s&expand=resources,tags,hosts,&attributes=ipaddresses' % (self.cloudforms_url, offset, limit)))
        results += ret['resources']
        if (ret['subcount'] < limit):
            last_page = True
        page += 1
    return results
