'Get the given hostgroup id.'

def find_hostgroup(self, groupname):

    url = '/hostgroup?range=[0-8191]'
    result = self.call(url, None, 'GET')
    self._assert_rest_result(result, _('Get    hostgroup    information    error.'))
    return self._get_id_from_result(result, groupname, 'NAME')
