Skip to content

Commit acd1505

Browse files
author
cfouant
committed
updated all references from system to content host
1 parent e946140 commit acd1505

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

app/controllers/katello/api/v2/systems_controller.rb

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ def organization_id_keys
4040
end
4141

4242
def_param_group :system do
43-
param :facts, Hash, :desc => N_("Key-value hash of system-specific facts"), :action_aware => true do
44-
param :fact, String, :desc => N_("Any number of facts about this system")
43+
param :facts, Hash, :desc => N_("Key-value hash of content host-specific facts"), :action_aware => true do
44+
param :fact, String, :desc => N_("Any number of facts about this content host")
4545
end
46-
param :installed_products, Array, :desc => N_("List of products installed on the system"), :action_aware => true
47-
param :name, String, :desc => N_("Name of the system"), :required => true, :action_aware => true
48-
param :type, String, :desc => N_("Type of the system, it should always be 'system'"), :required => true, :action_aware => true
46+
param :installed_products, Array, :desc => N_("List of products installed on the content host"), :action_aware => true
47+
param :name, String, :desc => N_("Name of the content host"), :required => true, :action_aware => true
48+
param :type, String, :desc => N_("Type of the content host, it should always be 'content host'"), :required => true, :action_aware => true
4949
param :service_level, String, :allow_nil => true, :desc => N_("A service level for auto-healing process, e.g. SELF-SUPPORT"), :action_aware => true
50-
param :location, String, :desc => N_("Physical location of the system")
50+
param :location, String, :desc => N_("Physical location of the content host")
5151
param :content_view_id, :identifier
5252
param :environment_id, :identifier
5353
end
5454

55-
api :GET, "/systems", N_("List systems")
56-
api :GET, "/organizations/:organization_id/systems", N_("List systems in an organization")
57-
api :GET, "/environments/:environment_id/systems", N_("List systems in environment")
58-
api :GET, "/host_collections/:host_collection_id/systems", N_("List systems in a host collection")
55+
api :GET, "/systems", N_("List content hosts")
56+
api :GET, "/organizations/:organization_id/systems", N_("List content hosts in an organization")
57+
api :GET, "/environments/:environment_id/systems", N_("List content hosts in environment")
58+
api :GET, "/host_collections/:host_collection_id/systems", N_("List content hosts in a host collection")
5959
param :name, String, :desc => N_("Filter content host by name")
6060
param :pool_id, String, :desc => N_("Filter content host by subscribed pool")
6161
param :uuid, String, :desc => N_("Filter content host by uuid")
@@ -89,20 +89,20 @@ def index
8989
end
9090

9191
api :POST, "/systems", N_("Register a content host")
92-
api :POST, "/environments/:environment_id/systems", N_("Register a system in environment")
93-
api :POST, "/host_collections/:host_collection_id/systems", N_("Register a system in environment")
94-
param :name, String, :desc => N_("Name of the system"), :required => true, :action_aware => true
95-
param :description, String, :desc => N_("Description of the system")
96-
param :location, String, :desc => N_("Physical location of the system")
97-
param :facts, Hash, :desc => N_("Key-value hash of system-specific facts"), :action_aware => true, :required => true do
98-
param :fact, String, :desc => N_("Any number of facts about this system")
92+
api :POST, "/environments/:environment_id/systems", N_("Register a content host in environment")
93+
api :POST, "/host_collections/:host_collection_id/systems", N_("Register a content host in environment")
94+
param :name, String, :desc => N_("Name of the content host"), :required => true, :action_aware => true
95+
param :description, String, :desc => N_("Description of the content host")
96+
param :location, String, :desc => N_("Physical location of the content host")
97+
param :facts, Hash, :desc => N_("Key-value hash of content host-specific facts"), :action_aware => true, :required => true do
98+
param :fact, String, :desc => N_("Any number of facts about this content host")
9999
end
100-
param :type, String, :desc => N_("Type of the system, it should always be 'system'"), :required => true, :action_aware => true
101-
param :guest_ids, Array, :desc => N_("IDs of the guests running on this system")
102-
param :installed_products, Array, :desc => N_("List of products installed on the system"), :action_aware => true
103-
param :release_ver, String, :desc => N_("Release version of the system")
100+
param :type, String, :desc => N_("Type of the content host, it should always be 'content host'"), :required => true, :action_aware => true
101+
param :guest_ids, Array, :desc => N_("IDs of the guests running on this content host")
102+
param :installed_products, Array, :desc => N_("List of products installed on the content host"), :action_aware => true
103+
param :release_ver, String, :desc => N_("Release version of the content host")
104104
param :service_level, String, :allow_nil => true, :desc => N_("A service level for auto-healing process, e.g. SELF-SUPPORT"), :action_aware => true
105-
param :last_checkin, String, :desc => N_("Last check-in time of this system")
105+
param :last_checkin, String, :desc => N_("Last check-in time of this content host")
106106
param :organization_id, :number, :desc => N_("Specify the organization"), :required => true
107107
param :environment_id, String, :desc => N_("Specify the environment")
108108
param :content_view_id, String, :desc => N_("Specify the content view")
@@ -116,19 +116,19 @@ def create
116116
end
117117

118118
api :PUT, "/systems/:id", N_("Update content host information")
119-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
120-
param :name, String, :desc => N_("Name of the system"), :required => true, :action_aware => true
121-
param :description, String, :desc => N_("Description of the system")
122-
param :location, String, :desc => N_("Physical location of the system")
123-
param :facts, Hash, :desc => N_("Key-value hash of system-specific facts"), :action_aware => true, :required => true do
124-
param :fact, String, :desc => N_("Any number of facts about this system")
119+
param :id, String, :desc => N_("UUID of the content host"), :required => true
120+
param :name, String, :desc => N_("Name of the content host"), :required => true, :action_aware => true
121+
param :description, String, :desc => N_("Description of the content host")
122+
param :location, String, :desc => N_("Physical location of the content host")
123+
param :facts, Hash, :desc => N_("Key-value hash of content host-specific facts"), :action_aware => true, :required => true do
124+
param :fact, String, :desc => N_("Any number of facts about this content host")
125125
end
126-
param :type, String, :desc => N_("Type of the system, it should always be 'system'"), :required => true, :action_aware => true
127-
param :guest_ids, Array, :desc => N_("IDs of the guests running on this system")
128-
param :installed_products, Array, :desc => N_("List of products installed on the system"), :action_aware => true
129-
param :release_ver, String, :desc => N_("Release version of the system")
126+
param :type, String, :desc => N_("Type of the content host, it should always be 'content host'"), :required => true, :action_aware => true
127+
param :guest_ids, Array, :desc => N_("IDs of the guests running on this content host")
128+
param :installed_products, Array, :desc => N_("List of products installed on the content host"), :action_aware => true
129+
param :release_ver, String, :desc => N_("Release version of the content host")
130130
param :service_level, String, :allow_nil => true, :desc => N_("A service level for auto-healing process, e.g. SELF-SUPPORT"), :action_aware => true
131-
param :last_checkin, String, :desc => N_("Last check-in time of this system")
131+
param :last_checkin, String, :desc => N_("Last check-in time of this content host")
132132
param :environment_id, String, :desc => N_("Specify the environment")
133133
param :content_view_id, String, :desc => N_("Specify the content view")
134134
def update
@@ -137,15 +137,15 @@ def update
137137
respond_for_update
138138
end
139139

140-
api :GET, "/systems/:id", N_("Show a system")
141-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
140+
api :GET, "/systems/:id", N_("Show a content host")
141+
param :id, String, :desc => N_("UUID of the content host"), :required => true
142142
def show
143143
@host_collections = @system.host_collections
144144
@custom_info = @system.custom_info
145145
respond
146146
end
147147

148-
api :GET, "/systems/:id/available_host_collections", N_("List host collections the system does not belong to")
148+
api :GET, "/systems/:id/available_host_collections", N_("List host collections the content host does not belong to")
149149
param_group :search, Api::V2::ApiController
150150
param :name, String, :desc => N_("host collection name to filter by")
151151
def available_host_collections
@@ -161,15 +161,15 @@ def available_host_collections
161161
respond_for_index(:collection => host_collections)
162162
end
163163

164-
api :DELETE, "/systems/:id", N_("Unregister a system")
165-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
164+
api :DELETE, "/systems/:id", N_("Unregister a content host")
165+
param :id, String, :desc => N_("UUID of the content host"), :required => true
166166
def destroy
167167
@system.destroy
168-
respond :message => _("Deleted system '%s'") % params[:id], :status => 204
168+
respond :message => _("Deleted content host '%s'") % params[:id], :status => 204
169169
end
170170

171-
api :GET, "/systems/:id/packages", N_("List packages installed on the system")
172-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
171+
api :GET, "/systems/:id/packages", N_("List packages installed on the content host")
172+
param :id, String, :desc => N_("UUID of the content host"), :required => true
173173
def package_profile
174174
packages = @system.simple_packages.sort { |a, b| a.name.downcase <=> b.name.downcase }
175175
response = {
@@ -181,14 +181,14 @@ def package_profile
181181
end
182182

183183
api :PUT, "/systems/:id/refresh_subscriptions", N_("Trigger a refresh of subscriptions, auto-attaching if enabled")
184-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
184+
param :id, String, :desc => N_("UUID of the content host"), :required => true
185185
def refresh_subscriptions
186186
@system.refresh_subscriptions
187187
respond_for_show(:resource => @system)
188188
end
189189

190-
api :GET, "/systems/:id/errata", N_("List errata available for the system")
191-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
190+
api :GET, "/systems/:id/errata", N_("List errata available for the content host")
191+
param :id, String, :desc => N_("UUID of the content host"), :required => true
192192
def errata
193193
errata = @system.errata
194194
response = {
@@ -200,8 +200,8 @@ def errata
200200
respond_for_index :collection => response
201201
end
202202

203-
api :GET, "/systems/:id/tasks", N_("List async tasks for the system")
204-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
203+
api :GET, "/systems/:id/tasks", N_("List async tasks for the content host")
204+
param :id, String, :desc => N_("UUID of the content host"), :required => true
205205
def tasks
206206
@system.refresh_tasks
207207

@@ -215,8 +215,8 @@ def tasks
215215
end
216216

217217
# TODO: break this mehtod up
218-
api :GET, "/environments/:environment_id/systems/report", N_("Get system reports for the environment")
219-
api :GET, "/organizations/:organization_id/systems/report", N_("Get system reports for the organization")
218+
api :GET, "/environments/:environment_id/systems/report", N_("Get content host reports for the environment")
219+
api :GET, "/organizations/:organization_id/systems/report", N_("Get content host reports for the organization")
220220
def report # rubocop:disable MethodLength
221221
data = @environment.nil? ? @organization.systems.readable : @environment.systems.readable
222222

@@ -246,9 +246,9 @@ def report # rubocop:disable MethodLength
246246
end
247247
end
248248

249-
api :GET, "/systems/:id/pools", N_("List pools a system is subscribed to")
250-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
251-
param :match_system, [true, false], :desc => N_("Match pools to system")
249+
api :GET, "/systems/:id/pools", N_("List pools a content host is subscribed to")
250+
param :id, String, :desc => N_("UUID of the content host"), :required => true
251+
param :match_system, [true, false], :desc => N_("Match pools to content host")
252252
param :match_installed, [true, false], :desc => N_("Match pools to installed")
253253
param :no_overlap, [true, false], :desc => N_("allow overlap")
254254
def pools
@@ -264,8 +264,8 @@ def pools
264264
respond_for_index :collection => response
265265
end
266266

267-
api :GET, "/systems/:id/releases", N_("Show releases available for the system")
268-
param :id, String, :desc => N_("UUID of the Content Host"), :required => true
267+
api :GET, "/systems/:id/releases", N_("Show releases available for the content host")
268+
param :id, String, :desc => N_("UUID of the content host"), :required => true
269269
desc <<-DESC
270270
A hint for choosing the right value for the releaseVer param
271271
DESC
@@ -282,7 +282,7 @@ def find_system
282282
@system = System.first(:conditions => { :uuid => params[:id] })
283283
if @system.nil?
284284
Resources::Candlepin::Consumer.get params[:id] # check with candlepin if system is Gone, raises RestClient::Gone
285-
fail HttpErrors::NotFound, _("Couldn't find system '%s'") % params[:id]
285+
fail HttpErrors::NotFound, _("Couldn't find content host '%s'") % params[:id]
286286
end
287287
end
288288

@@ -304,7 +304,7 @@ def find_host_collection
304304
def find_only_environment
305305
if !@environment && @organization && !params.key?(:environment_id)
306306
if @organization.kt_environments.empty?
307-
fail HttpErrors::BadRequest, _("Organization %{org} has the '%{env}' environment only. Please create an environment for system registration.") %
307+
fail HttpErrors::BadRequest, _("Organization %{org} has the '%{env}' environment only. Please create an environment for content host registration.") %
308308
{ :org => @organization.name, :env => "Library" }
309309
end
310310

@@ -317,7 +317,7 @@ def find_only_environment
317317
if current_user.default_environment && current_user.default_environment.organization == @organization
318318
@environment = current_user.default_environment
319319
else
320-
fail HttpErrors::BadRequest, _("Organization %s has more than one environment. Please specify target environment for system registration.") % @organization.name
320+
fail HttpErrors::BadRequest, _("Organization %s has more than one environment. Please specify target environment for content host registration.") % @organization.name
321321
end
322322
else
323323
if @environment = @organization.kt_environments.first

0 commit comments

Comments
 (0)