katello 4.0.0.rc1 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/katello/katello.scss +0 -72
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +4 -6
- data/app/controllers/katello/api/v2/content_exports_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +3 -3
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/errata_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_errata_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_packages_controller.rb +6 -6
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/organizations_controller.rb +0 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +3 -3
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +1 -1
- data/app/controllers/katello/concerns/api/v2/authorization.rb +14 -1
- data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +1 -2
- data/app/helpers/katello/concerns/smart_proxy_helper_extensions.rb +15 -20
- data/app/helpers/katello/katello_urls_helper.rb +2 -2
- data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +64 -0
- data/app/lib/actions/katello/agent_action.rb +116 -0
- data/app/lib/actions/katello/bulk_agent_action.rb +34 -0
- data/app/lib/actions/katello/content_view/promote.rb +25 -0
- data/app/lib/actions/katello/content_view/publish.rb +29 -0
- data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +1 -1
- data/app/lib/actions/katello/host/erratum/install.rb +8 -26
- data/app/lib/actions/katello/host/package/install.rb +8 -21
- data/app/lib/actions/katello/host/package/remove.rb +8 -20
- data/app/lib/actions/katello/host/package/update.rb +9 -22
- data/app/lib/actions/katello/host/package_group/install.rb +8 -21
- data/app/lib/actions/katello/host/package_group/remove.rb +8 -20
- data/app/lib/actions/katello/jail_concern/content_view.rb +30 -0
- data/app/lib/actions/katello/jail_concern/organization.rb +30 -0
- data/app/lib/actions/katello/repository/sync.rb +59 -0
- data/app/lib/actions/pulp/consumer.rb +0 -11
- data/app/lib/actions/pulp3/content_migration_reset.rb +22 -0
- data/app/lib/katello/agent/base_message.rb +38 -0
- data/app/lib/katello/agent/client_message_handler.rb +69 -0
- data/app/lib/katello/agent/connection.rb +38 -0
- data/app/lib/katello/agent/install_errata_message.rb +25 -0
- data/app/lib/katello/agent/install_package_group_message.rb +25 -0
- data/app/lib/katello/agent/install_package_message.rb +28 -0
- data/app/lib/katello/agent/remove_package_group_message.rb +25 -0
- data/app/lib/katello/agent/remove_package_message.rb +28 -0
- data/app/lib/katello/agent/update_package_message.rb +25 -0
- data/app/lib/katello/concerns/base_template_scope_extensions.rb +3 -2
- data/app/lib/katello/event_daemon/monitor.rb +1 -0
- data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +59 -0
- data/app/lib/katello/messaging/received_message.rb +1 -1
- data/app/lib/katello/qpid/connection.rb +147 -0
- data/app/models/katello/agent/dispatch_history.rb +19 -0
- data/app/models/katello/concerns/host_managed_extensions.rb +3 -0
- data/app/models/katello/concerns/hostgroup_extensions.rb +1 -1
- data/app/models/katello/concerns/redhat_extensions.rb +5 -8
- data/app/models/katello/concerns/smart_proxy_extensions.rb +29 -1
- data/app/models/katello/content_view.rb +13 -7
- data/app/models/katello/content_view_version_export_history.rb +7 -6
- data/app/models/katello/events/delete_host_agent_queue.rb +19 -0
- data/app/models/katello/glue/pulp/repo.rb +6 -12
- data/app/models/katello/host/content_facet.rb +9 -31
- data/app/models/katello/host/info_provider.rb +0 -2
- data/app/models/katello/ping.rb +48 -20
- data/app/models/katello/repository.rb +2 -2
- data/app/models/katello/root_repository.rb +1 -1
- data/app/models/setting/content.rb +0 -2
- data/app/services/katello/agent/dispatcher.rb +60 -0
- data/app/services/katello/applicability/applicable_content_helper.rb +8 -6
- data/app/services/katello/candlepin_event_listener.rb +1 -0
- data/app/services/katello/event_monitor/poller_thread.rb +1 -0
- data/app/services/katello/managed_content_medium_provider.rb +4 -4
- data/app/services/katello/pulp/repository/yum.rb +1 -1
- data/app/services/katello/pulp3/erratum.rb +2 -1
- data/app/services/katello/pulp3/migration.rb +44 -6
- data/app/services/katello/pulp3/migration_plan.rb +2 -2
- data/app/services/katello/pulp3/repository.rb +34 -9
- data/app/services/katello/pulp3/repository/apt.rb +1 -2
- data/app/services/katello/pulp3/repository/yum.rb +2 -2
- data/app/services/katello/pulp3/task_group.rb +3 -0
- data/app/services/katello/registration_manager.rb +10 -0
- data/app/services/katello/ui_notifications/pulp/proxy_disk_space.rb +2 -5
- data/app/views/katello/sync_management/_products.html.erb +1 -1
- data/app/views/smart_proxies/_disk_usage.html.erb +6 -4
- data/db/migrate/20210122200618_create_katello_agent_dispatch_history.rb +11 -0
- data/db/migrate/20210125161911_delete_erratum_install_batch_size_setting.rb +5 -0
- data/db/migrate/20210208213920_add_available_module_stream_context.rb +8 -0
- data/db/migrate/20210218214048_change_default_content_view_version_export_history.rb +5 -0
- data/db/seeds.d/111-upgrade_tasks.rb +0 -12
- data/engines/bastion/app/assets/javascripts/bastion/auth/authorization.service.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-advanced-sync-modal.html +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +3 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-start-date.directive.js +21 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscription-type.directive.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-start-date.html +2 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/subscription-type.html +18 -0
- data/lib/katello/engine.rb +21 -10
- data/lib/katello/plugin.rb +7 -3
- data/lib/katello/tasks/clean_backend_objects.rake +0 -25
- data/lib/katello/tasks/pulp3_migration.rake +5 -1
- data/lib/katello/tasks/pulp3_migration_reset.rake +26 -0
- data/lib/katello/tasks/reset.rake +0 -15
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +24 -28
- data/locale/bn/LC_MESSAGES/katello.mo +0 -0
- data/locale/bn/katello.edit.po +8542 -0
- data/locale/bn/katello.po +135 -99
- data/locale/bn/katello.po.time_stamp +0 -0
- data/locale/cs/LC_MESSAGES/katello.mo +0 -0
- data/locale/cs/katello.edit.po +8444 -0
- data/locale/cs/katello.po +135 -98
- data/locale/cs/katello.po.time_stamp +0 -0
- data/locale/de/LC_MESSAGES/katello.mo +0 -0
- data/locale/de/katello.edit.po +8351 -0
- data/locale/de/katello.po +136 -100
- data/locale/de/katello.po.time_stamp +0 -0
- data/locale/en/LC_MESSAGES/katello.mo +0 -0
- data/locale/en/katello.edit.po +8165 -0
- data/locale/en/katello.po +135 -98
- data/locale/en/katello.po.time_stamp +0 -0
- data/locale/es/LC_MESSAGES/katello.mo +0 -0
- data/locale/es/katello.edit.po +8313 -0
- data/locale/es/katello.po +136 -100
- data/locale/es/katello.po.time_stamp +0 -0
- data/locale/fr/LC_MESSAGES/katello.mo +0 -0
- data/locale/fr/katello.edit.po +8363 -0
- data/locale/fr/katello.po +136 -99
- data/locale/fr/katello.po.time_stamp +0 -0
- data/locale/gu/LC_MESSAGES/katello.mo +0 -0
- data/locale/gu/katello.edit.po +8544 -0
- data/locale/gu/katello.po +135 -99
- data/locale/gu/katello.po.time_stamp +0 -0
- data/locale/hi/LC_MESSAGES/katello.mo +0 -0
- data/locale/hi/katello.edit.po +8541 -0
- data/locale/hi/katello.po +135 -99
- data/locale/hi/katello.po.time_stamp +0 -0
- data/locale/it/LC_MESSAGES/katello.mo +0 -0
- data/locale/it/katello.edit.po +8300 -0
- data/locale/it/katello.po +136 -99
- data/locale/it/katello.po.time_stamp +0 -0
- data/locale/ja/LC_MESSAGES/katello.mo +0 -0
- data/locale/ja/katello.edit.po +8329 -0
- data/locale/ja/katello.po +136 -99
- data/locale/ja/katello.po.time_stamp +0 -0
- data/locale/katello.pot +756 -697
- data/locale/kn/LC_MESSAGES/katello.mo +0 -0
- data/locale/kn/katello.edit.po +8542 -0
- data/locale/kn/katello.po +135 -99
- data/locale/kn/katello.po.time_stamp +0 -0
- data/locale/ko/LC_MESSAGES/katello.mo +0 -0
- data/locale/ko/katello.edit.po +8296 -0
- data/locale/ko/katello.po +136 -99
- data/locale/ko/katello.po.time_stamp +0 -0
- data/locale/mr/LC_MESSAGES/katello.mo +0 -0
- data/locale/mr/katello.edit.po +8506 -0
- data/locale/mr/katello.po +135 -99
- data/locale/mr/katello.po.time_stamp +0 -0
- data/locale/or/LC_MESSAGES/katello.mo +0 -0
- data/locale/or/katello.edit.po +8542 -0
- data/locale/or/katello.po +135 -99
- data/locale/or/katello.po.time_stamp +0 -0
- data/locale/pa/LC_MESSAGES/katello.mo +0 -0
- data/locale/pa/katello.edit.po +8528 -0
- data/locale/pa/katello.po +135 -99
- data/locale/pa/katello.po.time_stamp +0 -0
- data/locale/pt/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt/katello.edit.po +8259 -0
- data/locale/pt/katello.po +135 -99
- data/locale/pt/katello.po.time_stamp +0 -0
- data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
- data/locale/pt_BR/katello.edit.po +8296 -0
- data/locale/pt_BR/katello.po +136 -99
- data/locale/pt_BR/katello.po.time_stamp +0 -0
- data/locale/ru/LC_MESSAGES/katello.mo +0 -0
- data/locale/ru/katello.edit.po +8316 -0
- data/locale/ru/katello.po +136 -99
- data/locale/ru/katello.po.time_stamp +0 -0
- data/locale/ta/LC_MESSAGES/katello.mo +0 -0
- data/locale/ta/katello.edit.po +8540 -0
- data/locale/ta/katello.po +135 -99
- data/locale/ta/katello.po.time_stamp +0 -0
- data/locale/te/LC_MESSAGES/katello.mo +0 -0
- data/locale/te/katello.edit.po +8540 -0
- data/locale/te/katello.po +135 -99
- data/locale/te/katello.po.time_stamp +0 -0
- data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_CN/katello.edit.po +8295 -0
- data/locale/zh_CN/katello.po +136 -99
- data/locale/zh_CN/katello.po.time_stamp +0 -0
- data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
- data/locale/zh_TW/katello.edit.po +8427 -0
- data/locale/zh_TW/katello.po +136 -100
- data/locale/zh_TW/katello.po.time_stamp +0 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +2 -2
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +7 -2
- data/webpack/scenes/Subscriptions/Manifest/index.js +1 -0
- metadata +106 -45
- data/app/lib/actions/pulp/consumer/abstract_content_action.rb +0 -71
- data/app/lib/actions/pulp/consumer/content_install.rb +0 -43
- data/app/lib/actions/pulp/consumer/content_uninstall.rb +0 -26
- data/app/lib/actions/pulp/consumer/content_update.rb +0 -32
- data/db/functions/empty_v01.sql +0 -7
- data/db/functions/evr_trigger_v01.sql +0 -9
- data/db/functions/isalpha_v01.sql +0 -11
- data/db/functions/isalphanum_v01.sql +0 -12
- data/db/functions/isdigit_v01.sql +0 -10
- data/db/functions/rpmver_array_v01.sql +0 -60
- data/lib/katello/tasks/upgrades/3.10/clear_invalid_repo_credentials.rake +0 -27
- data/lib/katello/tasks/upgrades/3.11/import_yum_metadata_file.rake +0 -12
- data/lib/katello/tasks/upgrades/3.11/update_puppet_repos.rake +0 -29
- data/lib/katello/tasks/upgrades/3.12/remove_pulp2_notifier.rake +0 -13
- data/lib/katello/tasks/upgrades/3.13/republish_deb_metadata.rake +0 -22
- data/lib/katello/tasks/upgrades/3.15/reindex_rpm_modular.rake +0 -23
- data/lib/katello/tasks/upgrades/3.15/set_sub_facet_dmi_uuid.rake +0 -16
- data/lib/katello/tasks/upgrades/3.16/update_applicable_el8_hosts.rake +0 -29
- data/lib/katello/tasks/upgrades/3.18/add_cvv_export_history_metadata.rb +0 -18
- data/lib/katello/tasks/upgrades/3.8/clear_checksum_type.rake +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02ff428534ded98d248efb23e9684364f8930cb1175c25a70ad3529963e435a0
|
4
|
+
data.tar.gz: 680e66df3f38df78a5feface53e92cc4129cc4a847fbd5e344ab63e5dd6bfd40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32ccbc77851e99ff2e16ebb36219871a0e086f86f60da1d3265e26cddbfdb7563c1363fc72ba5d3db34fb8360eb01ddb678fc882a41a16e635397631ab6b767e
|
7
|
+
data.tar.gz: 882219885a8aa1dd105a6b24a630092984d462fcac3a2030fa8fb3e6c112225ac48b00e746f7194bbb4e5ff2fb1d8766610b65434e0555958b4b251668be4cf6
|
@@ -163,78 +163,6 @@ input:focus {
|
|
163
163
|
@extend .status_exclamation_icon;
|
164
164
|
}
|
165
165
|
|
166
|
-
/* BUTTONS */
|
167
|
-
input[type='submit'], button, .button {
|
168
|
-
font-size: 10px;
|
169
|
-
display: inline-block;
|
170
|
-
vertical-align: bottom;
|
171
|
-
background: -moz-linear-gradient(top, #f9f9f9, #f0f0f0, #e5e5e5, #e9e9e9);
|
172
|
-
background: -webkit-gradient(linear, left top, left bottom, from(#f9f9f9), color-stop(0.9, #e5e5e5), to(#e9e9e9));
|
173
|
-
box-shadow: none;
|
174
|
-
border: 1px solid darken($stroke_color, 20%);
|
175
|
-
color: #221e1f;
|
176
|
-
cursor: pointer;
|
177
|
-
padding: 4px 8px;
|
178
|
-
border-radius: 5px;
|
179
|
-
text-shadow: 0 1px 0 rgba($white_color, 1);
|
180
|
-
min-height: 14px;
|
181
|
-
.nomargin {
|
182
|
-
margin: 0;
|
183
|
-
}
|
184
|
-
&:hover {
|
185
|
-
background: -moz-linear-gradient(top, $white_color, $white_color, #cfcfcf);
|
186
|
-
background: -webkit-gradient(linear, left top, left bottom, from($white_color), color-stop(0.6, $white_color), to(#cfcfcf));
|
187
|
-
box-shadow: 0 1px 2px rgba(0,0,0,0.5);
|
188
|
-
text-decoration: none;
|
189
|
-
color: black;
|
190
|
-
}
|
191
|
-
&:active {
|
192
|
-
background: -moz-linear-gradient(top, #c2c3c0, #e4e5e4);
|
193
|
-
background: -webkit-gradient(linear, left top, left bottom, from(#c2c3c0), to(#e4e5e4));
|
194
|
-
box-shadow: none;
|
195
|
-
text-decoration: none;
|
196
|
-
}
|
197
|
-
&:focus {
|
198
|
-
text-decoration: none;
|
199
|
-
color: #000;
|
200
|
-
border-width: 2px;
|
201
|
-
}
|
202
|
-
&.dialogbutton {
|
203
|
-
float: right;
|
204
|
-
margin-left: 3px;
|
205
|
-
margin: 40px 4px 4px;
|
206
|
-
}
|
207
|
-
&.formbutton {
|
208
|
-
display: inline-block;
|
209
|
-
margin-left: 3px;
|
210
|
-
margin: 40px 4px 4px;
|
211
|
-
}
|
212
|
-
&.actionlink {
|
213
|
-
margin: 40px 0 0;
|
214
|
-
}
|
215
|
-
&.disabled, &[disabled] {
|
216
|
-
cursor: default;
|
217
|
-
background: transparent;
|
218
|
-
opacity: 0.4;
|
219
|
-
|
220
|
-
&:hover {
|
221
|
-
background: transparent;
|
222
|
-
box-shadow: none;
|
223
|
-
}
|
224
|
-
}
|
225
|
-
&.iconbutton {
|
226
|
-
display: inline-block;
|
227
|
-
}
|
228
|
-
&.tiny {
|
229
|
-
padding: 4px;
|
230
|
-
margin: 0;
|
231
|
-
&:active, &:focus {
|
232
|
-
margin: 0;
|
233
|
-
padding: 3px;
|
234
|
-
}
|
235
|
-
}
|
236
|
-
}
|
237
|
-
|
238
166
|
table {
|
239
167
|
border-collapse: collapse;
|
240
168
|
border: 1px solid $stroke_color;
|
@@ -167,11 +167,9 @@ module Katello
|
|
167
167
|
end
|
168
168
|
|
169
169
|
if (manifest_response = redirect_client { Resources::Registry::Proxy.get(@_request.fullpath, headers) })
|
170
|
-
#
|
171
|
-
logger.debug filter_sensitive_data(manifest_response)
|
170
|
+
#for some requests, we get a redirect, but for others we get the actual manifest in response
|
172
171
|
results = JSON.parse(manifest_response)
|
173
|
-
|
174
|
-
response.header['Docker-Content-Digest'] = "sha256:#{Digest::SHA256.hexdigest(manifest_response)}"
|
172
|
+
response.header['Docker-Content-Digest'] = manifest_response.headers[:docker_content_digest]
|
175
173
|
# https://docs.docker.com/registry/spec/manifest-v2-2/
|
176
174
|
# If its v2 schema 2 only the mediaType attribute will be present in the manifest
|
177
175
|
media_type = results['mediaType']
|
@@ -184,8 +182,8 @@ module Katello
|
|
184
182
|
'application/vnd.docker.distribution.manifest.v1+prettyjws'
|
185
183
|
end
|
186
184
|
end
|
187
|
-
|
188
|
-
render json: manifest_response
|
185
|
+
response.headers['Content-Type'] = media_type
|
186
|
+
render json: manifest_response
|
189
187
|
end
|
190
188
|
end
|
191
189
|
|
@@ -29,7 +29,7 @@ module Katello
|
|
29
29
|
|
30
30
|
api :GET, "/content_exports/api_status", N_("true if the export api is pulp3 ready and usable. This API is intended for use by hammer-cli only.")
|
31
31
|
def api_status
|
32
|
-
::Foreman::Deprecation.api_deprecation_warning("/content_exports/api_status is being deprecated and will be removed in
|
32
|
+
::Foreman::Deprecation.api_deprecation_warning("/content_exports/api_status is being deprecated and will be removed in Katello 4.1.")
|
33
33
|
render json: { api_usable: SmartProxy.pulp_primary.pulp3_repository_type_support?(Katello::Repository::YUM_TYPE) }, status: :ok
|
34
34
|
end
|
35
35
|
|
@@ -9,7 +9,7 @@ module Katello
|
|
9
9
|
param :content_view_id, :number, :desc => N_("content view identifier"), :required => true
|
10
10
|
param :name, String, :desc => N_("name of the puppet module")
|
11
11
|
param :author, String, :desc => N_("author of the puppet module")
|
12
|
-
param :uuid, String, :desc => N_("uuid of the puppet module")
|
12
|
+
param :uuid, String, :desc => N_("uuid of the puppet module")
|
13
13
|
param_group :search, ::Katello::Api::V2::ApiController
|
14
14
|
add_scoped_search_description_for(ContentViewPuppetModule)
|
15
15
|
def index
|
@@ -22,7 +22,7 @@ module Katello
|
|
22
22
|
param :name, String, :desc => N_("name of the puppet module")
|
23
23
|
param :author, String, :desc => N_("author of the puppet module")
|
24
24
|
param :id, String, :desc => N_("the id of the puppet module to associate")
|
25
|
-
param :uuid, String, :desc => N_("the uuid of the puppet module to associate")
|
25
|
+
param :uuid, String, :desc => N_("the uuid of the puppet module to associate")
|
26
26
|
def create
|
27
27
|
params[:content_view_puppet_module][:uuid] ||= PuppetModule.find(params[:id]).try(:pulp_id) if params[:id]
|
28
28
|
respond resource: ContentViewPuppetModule.create!(puppet_module_params.merge(content_view: @view))
|
@@ -41,7 +41,7 @@ module Katello
|
|
41
41
|
param :id, :number, :desc => N_("puppet module ID"), :required => true
|
42
42
|
param :name, String, :desc => N_("name of the puppet module")
|
43
43
|
param :author, String, :desc => N_("author of the puppet module")
|
44
|
-
param :uuid, String, :desc => N_("the uuid of the puppet module to associate")
|
44
|
+
param :uuid, String, :desc => N_("the uuid of the puppet module to associate")
|
45
45
|
def update
|
46
46
|
@puppet_module.update!(puppet_module_params)
|
47
47
|
respond :resource => @puppet_module
|
@@ -95,7 +95,7 @@ module Katello
|
|
95
95
|
fail HttpErrors::BadRequest, _("Invalid usage for Pulp 3 repositories. "\
|
96
96
|
"Use hammer content-export for Yum repositories")
|
97
97
|
end
|
98
|
-
::Foreman::Deprecation.api_deprecation_warning("
|
98
|
+
::Foreman::Deprecation.api_deprecation_warning("Pulp 2 export is deprecated and will not work as of Katello 4.0. To export using Pulp 3, use hammer content-export version.")
|
99
99
|
if params[:export_to_iso].blank? && params[:iso_mb_size].present?
|
100
100
|
fail HttpErrors::BadRequest, _("ISO export must be enabled when specifying ISO size")
|
101
101
|
end
|
@@ -62,7 +62,7 @@ module Katello
|
|
62
62
|
collection
|
63
63
|
end
|
64
64
|
|
65
|
-
api :GET, "/content_view_versions/:id/available_errata", N_("Return errata that can be added to the Content View Version via an Incremental Update"), :deprecated => true
|
65
|
+
api :GET, "/content_view_versions/:id/available_errata", N_("Return errata that can be added to the Content View Version via an Incremental Update. Will be removed in Katello 4.1."), :deprecated => true
|
66
66
|
param :id, :number, :desc => N_("Content View Version identifier"), :required => true
|
67
67
|
param :organization_id, :number, :desc => N_("Organization identifier")
|
68
68
|
param :content_view_filter_id, :number, :desc => N_("Content View Filter identifier")
|
@@ -51,11 +51,11 @@ module Katello
|
|
51
51
|
|
52
52
|
api :PUT, "/hosts/:host_id/errata/apply", N_("Schedule errata for installation")
|
53
53
|
param :host_id, :number, :desc => N_("Host ID"), :required => true
|
54
|
-
param :errata_ids, Array, :desc => N_("List of Errata ids to install"), :required => false, :deprecated => true
|
54
|
+
param :errata_ids, Array, :desc => N_("List of Errata ids to install. Will be removed in Katello 4.1."), :required => false, :deprecated => true
|
55
55
|
|
56
56
|
param_group :bulk_errata_ids
|
57
57
|
def apply
|
58
|
-
task = async_task(::Actions::Katello::Host::Erratum::Install, @host, @errata_ids)
|
58
|
+
task = async_task(::Actions::Katello::Host::Erratum::Install, @host, content: @errata_ids)
|
59
59
|
respond_for_async :resource => task
|
60
60
|
end
|
61
61
|
|
@@ -33,14 +33,14 @@ module Katello
|
|
33
33
|
def install
|
34
34
|
if params[:packages]
|
35
35
|
packages = validate_package_list_format(params[:packages])
|
36
|
-
task = async_task(::Actions::Katello::Host::Package::Install, @host, packages)
|
36
|
+
task = async_task(::Actions::Katello::Host::Package::Install, @host, content: packages)
|
37
37
|
respond_for_async :resource => task
|
38
38
|
return
|
39
39
|
end
|
40
40
|
|
41
41
|
if params[:groups]
|
42
42
|
groups = extract_group_names(params[:groups])
|
43
|
-
task = async_task(::Actions::Katello::Host::PackageGroup::Install, @host, groups)
|
43
|
+
task = async_task(::Actions::Katello::Host::PackageGroup::Install, @host, content: groups)
|
44
44
|
respond_for_async :resource => task
|
45
45
|
end
|
46
46
|
end
|
@@ -51,7 +51,7 @@ module Katello
|
|
51
51
|
def upgrade
|
52
52
|
if params[:packages]
|
53
53
|
packages = validate_package_list_format(params[:packages])
|
54
|
-
task = async_task(::Actions::Katello::Host::Package::Update, @host, packages)
|
54
|
+
task = async_task(::Actions::Katello::Host::Package::Update, @host, content: packages)
|
55
55
|
respond_for_async :resource => task
|
56
56
|
end
|
57
57
|
end
|
@@ -59,7 +59,7 @@ module Katello
|
|
59
59
|
api :PUT, "/hosts/:host_id/packages/upgrade_all", N_("Update packages remotely")
|
60
60
|
param :host_id, :number, :required => true, :desc => N_("ID of the host")
|
61
61
|
def upgrade_all
|
62
|
-
task = async_task(::Actions::Katello::Host::Package::Update, @host, [])
|
62
|
+
task = async_task(::Actions::Katello::Host::Package::Update, @host, content: [])
|
63
63
|
respond_for_async :resource => task
|
64
64
|
end
|
65
65
|
|
@@ -69,14 +69,14 @@ module Katello
|
|
69
69
|
def remove
|
70
70
|
if params[:packages]
|
71
71
|
packages = validate_package_list_format(params[:packages])
|
72
|
-
task = async_task(::Actions::Katello::Host::Package::Remove, @host, packages)
|
72
|
+
task = async_task(::Actions::Katello::Host::Package::Remove, @host, content: packages)
|
73
73
|
respond_for_async :resource => task
|
74
74
|
return
|
75
75
|
end
|
76
76
|
|
77
77
|
if params[:groups]
|
78
78
|
groups = extract_group_names(params[:groups])
|
79
|
-
task = async_task(::Actions::Katello::Host::PackageGroup::Remove, @host, groups)
|
79
|
+
task = async_task(::Actions::Katello::Host::PackageGroup::Remove, @host, content: groups)
|
80
80
|
respond_for_async :resource => task
|
81
81
|
end
|
82
82
|
end
|
@@ -365,7 +365,7 @@ module Katello
|
|
365
365
|
if params[:action] == :update_content && params[:update_all]
|
366
366
|
content = []
|
367
367
|
end
|
368
|
-
task = async_task(
|
368
|
+
task = async_task(Actions::Katello::BulkAgentAction, PARAM_ACTIONS[params[:action]][params[:content_type]], @hosts, content: content)
|
369
369
|
respond_for_async :resource => task
|
370
370
|
end
|
371
371
|
end
|
@@ -22,7 +22,6 @@ module Katello
|
|
22
22
|
param :smart_proxy_ids, Array, N_("Smart proxy IDs"), :required => false
|
23
23
|
param :compute_resource_ids, Array, N_("Compute resource IDs"), :required => false
|
24
24
|
param :medium_ids, Array, N_("Medium IDs"), :required => false
|
25
|
-
param :config_template_ids, Array, N_("Provisioning template IDs"), :required => false # FIXME: deprecated
|
26
25
|
param :ptable_ids, Array, N_("Partition template IDs"), :required => false
|
27
26
|
param :provisioning_template_ids, Array, N_("Provisioning template IDs"), :required => false
|
28
27
|
param :domain_ids, Array, N_("Domain IDs"), :required => false
|
@@ -52,9 +52,9 @@ module Katello
|
|
52
52
|
param :upstream_password, String, :desc => N_("Password of the upstream repository user used for authentication")
|
53
53
|
param :ostree_upstream_sync_policy, ::Katello::RootRepository::OSTREE_UPSTREAM_SYNC_POLICIES, :desc => N_("policies for syncing upstream ostree repositories")
|
54
54
|
param :ostree_upstream_sync_depth, :number, :desc => N_("if a custom sync policy is chosen for ostree repositories then a 'depth' value must be provided")
|
55
|
-
param :deb_releases, String, :desc => N_("
|
56
|
-
param :deb_components, String, :desc => N_("
|
57
|
-
param :deb_architectures, String, :desc => N_("
|
55
|
+
param :deb_releases, String, :desc => N_("whitespace-separated list of releases to be synced from deb-archive")
|
56
|
+
param :deb_components, String, :desc => N_("whitespace-separated list of repo components to be synced from deb-archive")
|
57
|
+
param :deb_architectures, String, :desc => N_("whitespace-separated list of architectures to be synced from deb-archive")
|
58
58
|
param :ignorable_content, Array, :desc => N_("List of content units to ignore while syncing a yum repository. Must be subset of %s") % RootRepository::IGNORABLE_CONTENT_UNIT_TYPES.join(",")
|
59
59
|
param :ansible_collection_requirements, String, :desc => N_("Contents of requirement yaml file to sync from URL")
|
60
60
|
param :http_proxy_policy, ::Katello::RootRepository::HTTP_PROXY_POLICIES, :desc => N_("policies for HTTP proxy for content sync")
|
@@ -126,7 +126,7 @@ module Katello
|
|
126
126
|
end
|
127
127
|
|
128
128
|
def deprecated
|
129
|
-
::Foreman::Deprecation.api_deprecation_warning("
|
129
|
+
::Foreman::Deprecation.api_deprecation_warning("This will be removed in Katello 4.2, Please see /api/v2/simple_content_access")
|
130
130
|
end
|
131
131
|
end
|
132
132
|
end
|
@@ -39,7 +39,20 @@ module Katello
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def throw_resource_not_found(name: resource_name, id: params[:id])
|
42
|
-
|
42
|
+
perms_message = "Potential missing permissions: " +
|
43
|
+
missing_permissions.map(&:name).join(', ')
|
44
|
+
fail HttpErrors::NotFound, _("Could not find %{name} resource with id %{id}. %{perms_message}") % {id: id, name: name, perms_message: perms_message}
|
45
|
+
end
|
46
|
+
|
47
|
+
def missing_permissions
|
48
|
+
missing_perms = ::Foreman::AccessControl.permissions_for_controller_action(path_to_authenticate)
|
49
|
+
|
50
|
+
# promote_or_remove_content_views_to_environments has a special relationship to promote_or_remove_content_views
|
51
|
+
if path_to_authenticate["controller"] == "katello/api/v2/content_view_versions" &&
|
52
|
+
path_to_authenticate["action"].in?(["promote", "remove_from_environment", "remove", "republish_repositories"])
|
53
|
+
missing_perms << ::Permission.find_by(name: "promote_or_remove_content_views_to_environments")
|
54
|
+
end
|
55
|
+
missing_perms
|
43
56
|
end
|
44
57
|
|
45
58
|
def throw_resources_not_found(name:, expected_ids: [])
|
@@ -26,8 +26,7 @@ module Katello
|
|
26
26
|
before_action :find_resource_and_status, :only => [:pulp_storage, :pulp_status]
|
27
27
|
|
28
28
|
def pulp_storage
|
29
|
-
|
30
|
-
@storage = pulp_connection.storage
|
29
|
+
@storage = @smart_proxy.pulp_disk_usage
|
31
30
|
respond_to do |format|
|
32
31
|
format.html { render :layout => false }
|
33
32
|
format.json { render :json => {:success => true, :message => @storage} }
|
@@ -2,20 +2,21 @@ module Katello
|
|
2
2
|
module Concerns
|
3
3
|
module SmartProxyHelperExtensions
|
4
4
|
def disks(storage)
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
5
|
+
storage.map do |values|
|
6
|
+
values['header'] = values['description']
|
7
|
+
values['available_percent'] = 100 - values['percentage']
|
8
|
+
values['size_status'] = storage_warning(values['free'])
|
9
|
+
values
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def humanize_bytes(bytes)
|
14
|
+
mb = bytes / 1024 / 1024
|
15
|
+
if mb < 1000
|
16
|
+
"#{mb} MB"
|
17
|
+
else
|
18
|
+
"#{mb / 1024} GB"
|
17
19
|
end
|
18
|
-
disks.group_by { |h| h['mounted'] }.map { |_, hs| hs.reduce(:merge) }
|
19
20
|
end
|
20
21
|
|
21
22
|
def boolean_to_icon(boolean)
|
@@ -24,12 +25,6 @@ module Katello
|
|
24
25
|
icon_text(icon, '', :kind => 'pficon')
|
25
26
|
end
|
26
27
|
|
27
|
-
def available_percent(percent_string)
|
28
|
-
used_percent = percent_string.delete('%').to_i
|
29
|
-
available_percent = 100 - used_percent
|
30
|
-
"#{available_percent}%"
|
31
|
-
end
|
32
|
-
|
33
28
|
def download_policies
|
34
29
|
policies = [
|
35
30
|
{
|
@@ -54,7 +49,7 @@ module Katello
|
|
54
49
|
end
|
55
50
|
|
56
51
|
def storage_warning(available)
|
57
|
-
gb_size = available.to_i /
|
52
|
+
gb_size = available.to_i / 1_073_741_824
|
58
53
|
case gb_size
|
59
54
|
when 0..1
|
60
55
|
"danger"
|
@@ -20,7 +20,7 @@ module Katello
|
|
20
20
|
"#{prefix}/pub/#{config}"
|
21
21
|
end
|
22
22
|
|
23
|
-
def repository_url(content_path,
|
23
|
+
def repository_url(content_path, _content_type = nil, schema = 'http')
|
24
24
|
return content_path if content_path =~ %r|^([\w\-\+]+)://|
|
25
25
|
url = if @host.content_source
|
26
26
|
"#{schema}://#{@host.content_source.hostname}"
|
@@ -33,7 +33,7 @@ module Katello
|
|
33
33
|
end
|
34
34
|
path = ::Katello::Glue::Pulp::Repos.repo_path_from_content_path(
|
35
35
|
@host.lifecycle_environment, content_path)
|
36
|
-
"#{url}/pulp/#{
|
36
|
+
"#{url}/pulp/content/#{path}"
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
module Actions
|
2
|
+
module Katello
|
3
|
+
module Agent
|
4
|
+
class DispatchHistoryPresenter
|
5
|
+
def initialize(dispatch_history, action_type)
|
6
|
+
@result = dispatch_history&.result&.with_indifferent_access
|
7
|
+
@action_type = action_type
|
8
|
+
end
|
9
|
+
|
10
|
+
def humanized_output
|
11
|
+
return if @result.empty?
|
12
|
+
|
13
|
+
result = package_result
|
14
|
+
|
15
|
+
if result[:message]
|
16
|
+
result[:message]
|
17
|
+
elsif result[:packages].any?
|
18
|
+
packages = result[:packages].map { |package| package[:qname] }
|
19
|
+
packages.sort.join("\n")
|
20
|
+
else
|
21
|
+
humanized_no_package
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def error_messages
|
26
|
+
messages = []
|
27
|
+
@result.each_value do |result|
|
28
|
+
if !result[:succeeded] && result.dig(:details, :message)
|
29
|
+
messages << result[:details][:message]
|
30
|
+
end
|
31
|
+
end
|
32
|
+
messages
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
|
37
|
+
def package_result
|
38
|
+
result = { packages: [] }
|
39
|
+
|
40
|
+
@result.each_value do |v|
|
41
|
+
if v[:succeeded]
|
42
|
+
result[:packages].concat(v[:details][:resolved] + v[:details][:deps])
|
43
|
+
break
|
44
|
+
else
|
45
|
+
result[:message] = v[:details][:message]
|
46
|
+
break
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
result
|
51
|
+
end
|
52
|
+
|
53
|
+
def humanized_no_package
|
54
|
+
case @action_type
|
55
|
+
when :content_install
|
56
|
+
_("No new packages installed")
|
57
|
+
when :content_uninstall
|
58
|
+
_("No packages removed")
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|