Class: Katello::Api::V2::UpstreamSubscriptionsController
- Inherits:
-
ApiController
- Object
- Api::V2::BaseController
- ApiController
- Katello::Api::V2::UpstreamSubscriptionsController
show all
- Defined in:
- app/controllers/katello/api/v2/upstream_subscriptions_controller.rb
Instance Method Summary
collapse
#check_katello_agent_not_disabled, #deprecate_katello_agent, #empty_search_query?, #full_result_response, #katello_agent_removal_release, #resource_class, #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
#index ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'app/controllers/katello/api/v2/upstream_subscriptions_controller.rb', line 24
def index
index_params = upstream_pool_params
pools = UpstreamPool.fetch_pools(index_params)
page = index_params[:page] || 1
collection = scoped_search_results(
query: pools[:pools],
subtotal: pools[:subtotal],
total: pools[:total],
page: page,
per_page: index_params[:per_page])
respond(collection: collection)
end
|
#ping ⇒ Object
74
75
76
77
78
79
80
81
|
# File 'app/controllers/katello/api/v2/upstream_subscriptions_controller.rb', line 74
def ping
render json: { status: 'OK' }
end
|