Class: Katello::Api::V2::HostErrataController
Constant Summary
collapse
- TYPES_FROM_PARAMS =
{
bugfix: Katello::Erratum::BUGZILLA, security: Katello::Erratum::SECURITY, enhancement: Katello::Erratum::ENHANCEMENT }.freeze
Concerns::FilteredAutoCompleteSearch::PAGE_SIZE
Instance Method Summary
collapse
#auto_complete_search
#check_katello_agent_not_disabled, #deprecate_katello_agent, #empty_search_query?, #full_result_response, #katello_agent_removal_release, #scoped_search, #skip_session
Methods included from Rendering
#respond_for_async, #respond_for_bulk_async, #respond_for_create, #respond_for_destroy, #respond_for_index, #respond_for_show, #respond_for_status, #respond_for_update, #respond_with_template, #respond_with_template_collection, #respond_with_template_resource, #try_specific_collection_template, #try_specific_resource_template
#api_version
Instance Method Details
#apply ⇒ Object
67
68
69
70
|
# File 'app/controllers/katello/api/v2/host_errata_controller.rb', line 67
def apply
task = async_task(::Actions::Katello::Host::Erratum::Install, @host, content: @errata_ids)
respond_for_async :resource => task
end
|
#index ⇒ Object
48
49
50
51
52
53
54
55
56
57
58
59
|
# File 'app/controllers/katello/api/v2/host_errata_controller.rb', line 48
def index
validate_index_params!
collection = scoped_search(index_relation, 'updated', 'desc', :resource_class => Erratum, :includes => [:cves])
@installable_errata_ids = []
if @host.content_facet
@installable_errata_ids = @host.content_facet.installable_errata.pluck("#{Katello::Erratum.table_name}.id")
end
respond_for_index :collection => collection
end
|
#resource_class ⇒ Object
24
25
26
|
# File 'app/controllers/katello/api/v2/host_errata_controller.rb', line 24
def resource_class
Erratum
end
|
#show ⇒ Object
75
76
77
78
79
|
# File 'app/controllers/katello/api/v2/host_errata_controller.rb', line 75
def show
errata = Erratum.find_by(:errata_id => params[:id])
fail HttpErrors::NotFound, _("Couldn't find errata ids '%s'") % params[:id] unless errata
respond_for_show :resource => errata
end
|