def service_description_for_host(host)
      response = self.class.get(@base_uri + "config/host/#{host}?format=json",
                                basic_auth: @auth, verify: false)
      raise ApiError unless response.code == 200
      host_config = JSON.parse!(response.body)
      if host_config['services'].nil?
        services = []
      else
        services = host_config['services'].map { |s| s['service_description'] }
      end
      host_config['hostgroups'].each do |hg|
        services += hostgroup_services(hg)
      end
      services.nil? ? [] : services
    end
def service_description_for_host(host)
      response = self.class.get(@base_uri + "config/host/#{host}?format=json",
                                basic_auth: @auth, verify: false)
      raise ApiError unless response.code == 200
      host_config = JSON.parse!(response.body)
      if host_config['services'].nil?
        services = []
      else
        services = host_config['services'].map { |s| s['service_description'] }
      end
      host_config['hostgroups'].each do |hg|
        services += hostgroup_services(hg)
      end
      services.nil? ? [] : services
    end
TODO: split hostgroup_info into better re-usable code