katello 4.12.1 → 4.13.0.rc1

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.

Files changed (222) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/locale/bn/katello.js +3365 -3350
  3. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +3136 -3121
  4. data/app/assets/javascripts/katello/locale/ca/katello.js +3588 -3576
  5. data/app/assets/javascripts/katello/locale/cs/katello.js +3499 -3487
  6. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +4186 -4186
  7. data/app/assets/javascripts/katello/locale/de/katello.js +5553 -5562
  8. data/app/assets/javascripts/katello/locale/de_AT/katello.js +3008 -2993
  9. data/app/assets/javascripts/katello/locale/de_DE/katello.js +3066 -3051
  10. data/app/assets/javascripts/katello/locale/el/katello.js +3376 -3370
  11. data/app/assets/javascripts/katello/locale/en/katello.js +3008 -2993
  12. data/app/assets/javascripts/katello/locale/en_GB/katello.js +3076 -3073
  13. data/app/assets/javascripts/katello/locale/en_US/katello.js +3008 -2993
  14. data/app/assets/javascripts/katello/locale/es/katello.js +5366 -5372
  15. data/app/assets/javascripts/katello/locale/et_EE/katello.js +3008 -2993
  16. data/app/assets/javascripts/katello/locale/fr/katello.js +5975 -5984
  17. data/app/assets/javascripts/katello/locale/gl/katello.js +3125 -3113
  18. data/app/assets/javascripts/katello/locale/gu/katello.js +3119 -3104
  19. data/app/assets/javascripts/katello/locale/he_IL/katello.js +3020 -3005
  20. data/app/assets/javascripts/katello/locale/hi/katello.js +3137 -3122
  21. data/app/assets/javascripts/katello/locale/id/katello.js +3008 -2993
  22. data/app/assets/javascripts/katello/locale/it/katello.js +4469 -4466
  23. data/app/assets/javascripts/katello/locale/ja/katello.js +5969 -5978
  24. data/app/assets/javascripts/katello/locale/ka/katello.js +5649 -5652
  25. data/app/assets/javascripts/katello/locale/kn/katello.js +3136 -3121
  26. data/app/assets/javascripts/katello/locale/ko/katello.js +4717 -4720
  27. data/app/assets/javascripts/katello/locale/locale/katello.js +1050 -1084
  28. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +3008 -2993
  29. data/app/assets/javascripts/katello/locale/mr/katello.js +3136 -3121
  30. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +3116 -3101
  31. data/app/assets/javascripts/katello/locale/or/katello.js +3137 -3122
  32. data/app/assets/javascripts/katello/locale/pa/katello.js +3136 -3121
  33. data/app/assets/javascripts/katello/locale/pl/katello.js +3210 -3195
  34. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +3008 -2993
  35. data/app/assets/javascripts/katello/locale/pt/katello.js +3009 -2994
  36. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +5362 -5368
  37. data/app/assets/javascripts/katello/locale/ro/katello.js +3008 -2993
  38. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +3008 -2993
  39. data/app/assets/javascripts/katello/locale/ru/katello.js +4638 -4641
  40. data/app/assets/javascripts/katello/locale/sl/katello.js +3051 -3036
  41. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +3156 -3144
  42. data/app/assets/javascripts/katello/locale/ta/katello.js +3365 -3350
  43. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +3121 -3106
  44. data/app/assets/javascripts/katello/locale/te/katello.js +3136 -3121
  45. data/app/assets/javascripts/katello/locale/tr/katello.js +3025 -3010
  46. data/app/assets/javascripts/katello/locale/vi/katello.js +3008 -2993
  47. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +3008 -2993
  48. data/app/assets/javascripts/katello/locale/zh/katello.js +3008 -2993
  49. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +5968 -5977
  50. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +4694 -4697
  51. data/app/controllers/katello/api/registry/registry_proxies_controller.rb +51 -124
  52. data/app/controllers/katello/api/rhsm/candlepin_dynflow_proxy_controller.rb +12 -20
  53. data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -4
  54. data/app/controllers/katello/api/v2/capsule_content_controller.rb +24 -0
  55. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +9 -2
  56. data/app/controllers/katello/api/v2/debs_controller.rb +1 -1
  57. data/app/controllers/katello/api/v2/errata_controller.rb +1 -1
  58. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +12 -4
  59. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +3 -3
  60. data/app/controllers/katello/api/v2/organizations_controller.rb +0 -11
  61. data/app/controllers/katello/api/v2/packages_controller.rb +1 -1
  62. data/app/controllers/katello/api/v2/repositories_controller.rb +18 -12
  63. data/app/controllers/katello/api/v2/repository_sets_controller.rb +2 -1
  64. data/app/controllers/katello/api/v2/simple_content_access_controller.rb +9 -22
  65. data/app/controllers/katello/concerns/api/v2/authorization.rb +1 -1
  66. data/app/helpers/katello/subscription_mailer_helper.rb +1 -1
  67. data/app/jobs/create_manifest_expire_soon_warning_notifications.rb +11 -0
  68. data/app/lib/actions/candlepin/owner/regenerate_upstream_identity_cert.rb +21 -0
  69. data/app/lib/actions/katello/capsule_content/sync.rb +1 -1
  70. data/app/lib/actions/katello/capsule_content/verify_checksum.rb +75 -0
  71. data/app/lib/actions/katello/content_view/promote.rb +1 -1
  72. data/app/lib/actions/katello/content_view/publish.rb +1 -1
  73. data/app/lib/actions/katello/content_view_version/verify_checksum.rb +29 -0
  74. data/app/lib/actions/katello/host/hypervisors_update.rb +1 -0
  75. data/app/lib/actions/katello/host/update_content_view.rb +2 -2
  76. data/app/lib/actions/katello/organization/manifest_import.rb +5 -0
  77. data/app/lib/actions/katello/organization/manifest_refresh.rb +3 -0
  78. data/app/lib/actions/katello/repository/metadata_generate.rb +7 -1
  79. data/app/lib/actions/katello/repository/remove_content.rb +1 -0
  80. data/app/lib/actions/katello/repository/sync.rb +2 -1
  81. data/app/lib/actions/katello/repository/upload_files.rb +1 -0
  82. data/app/lib/actions/pulp3/capsule_content/verify_checksum.rb +27 -0
  83. data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +7 -9
  84. data/app/lib/actions/pulp3/orchestration/content_view_version/syncable_export.rb +5 -4
  85. data/app/lib/katello/concerns/base_template_scope_extensions.rb +7 -2
  86. data/app/lib/katello/http_resource.rb +6 -1
  87. data/app/lib/katello/resources/candlepin/consumer.rb +1 -1
  88. data/app/lib/katello/resources/candlepin/upstream_consumer.rb +18 -6
  89. data/app/lib/katello/resources/candlepin/upstream_job.rb +1 -1
  90. data/app/lib/katello/resources/registry.rb +25 -0
  91. data/app/mailers/katello/subscription_mailer.rb +3 -6
  92. data/app/models/katello/concerns/organization_extensions.rb +42 -3
  93. data/app/models/katello/content_view.rb +28 -0
  94. data/app/models/katello/content_view_environment_content_facet.rb +4 -2
  95. data/app/models/katello/glue/provider.rb +19 -12
  96. data/app/models/katello/glue/pulp/repos.rb +3 -2
  97. data/app/models/katello/host/content_facet.rb +1 -1
  98. data/app/models/katello/host/subscription_facet.rb +1 -1
  99. data/app/models/katello/ping.rb +1 -1
  100. data/app/models/katello/repository.rb +27 -0
  101. data/app/models/katello/root_repository.rb +0 -4
  102. data/app/services/katello/content_unit_indexer.rb +9 -0
  103. data/app/services/katello/pulp3/alternate_content_source.rb +4 -6
  104. data/app/services/katello/pulp3/api/core.rb +13 -0
  105. data/app/services/katello/pulp3/api/yum.rb +11 -0
  106. data/app/services/katello/pulp3/docker_manifest.rb +5 -1
  107. data/app/services/katello/pulp3/repository/generic.rb +1 -1
  108. data/app/services/katello/pulp3/repository.rb +26 -6
  109. data/app/services/katello/pulp3/repository_mirror.rb +13 -12
  110. data/app/services/katello/pulp3/service_common.rb +2 -10
  111. data/app/services/katello/pulp3/smart_proxy_repository.rb +0 -2
  112. data/app/services/katello/ui_notifications/subscriptions/manifest_expire_soon_warning.rb +75 -0
  113. data/app/views/foreman/job_templates/update_package_-_katello_ansible_default.erb +5 -1
  114. data/app/views/foreman/job_templates/update_packages_by_search_query_-_katello_ansible_default.erb +2 -2
  115. data/app/views/foreman/job_templates/upload_profile.erb +16 -0
  116. data/app/views/katello/api/v2/content_view_filter_rules/show.json.rabl +9 -0
  117. data/app/views/katello/api/v2/docker_manifests/show.json.rabl +1 -0
  118. data/app/views/katello/api/v2/organizations/show.json.rabl +9 -1
  119. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +1 -1
  120. data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +15 -5
  121. data/config/routes/api/registry.rb +4 -8
  122. data/config/routes/api/v2.rb +2 -0
  123. data/db/migrate/20240423112842_add_fields_to_katello_docker_manifest.rb +8 -0
  124. data/db/migrate/20240502192021_change_katello_repository_rpms_id_seq_to_big_int.rb +9 -0
  125. data/db/seeds.d/109-katello-notification-blueprints.rb +6 -0
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-repository-sets.controller.js +3 -3
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-credentials/new/views/new-content-credential.html +2 -1
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-repository-sets.controller.js +3 -3
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +0 -15
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +8 -6
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +12 -10
  132. data/lib/katello/permission_creator.rb +3 -3
  133. data/lib/katello/permissions/registry_permissions.rb +4 -7
  134. data/lib/katello/plugin.rb +9 -8
  135. data/lib/katello/repository_types/ostree.rb +7 -0
  136. data/lib/katello/scheduled_jobs.rb +7 -1
  137. data/lib/katello/tasks/clean_backend_objects.rake +1 -1
  138. data/lib/katello/tasks/repository.rake +22 -0
  139. data/lib/katello/version.rb +1 -1
  140. data/locale/action_names.rb +4 -3
  141. data/locale/bn/katello.po +166 -151
  142. data/locale/bn_IN/katello.po +166 -151
  143. data/locale/ca/katello.po +166 -151
  144. data/locale/cs/katello.po +166 -151
  145. data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
  146. data/locale/cs_CZ/katello.po +172 -157
  147. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  148. data/locale/de/katello.po +178 -163
  149. data/locale/de_AT/katello.po +166 -151
  150. data/locale/de_DE/katello.po +166 -151
  151. data/locale/el/katello.po +166 -151
  152. data/locale/en/katello.po +166 -151
  153. data/locale/en_GB/katello.po +166 -151
  154. data/locale/en_US/katello.po +166 -151
  155. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  156. data/locale/es/katello.po +178 -163
  157. data/locale/et_EE/katello.po +166 -151
  158. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  159. data/locale/fr/katello.po +179 -164
  160. data/locale/gl/katello.po +166 -151
  161. data/locale/gu/katello.po +166 -151
  162. data/locale/he_IL/katello.po +166 -151
  163. data/locale/hi/katello.po +166 -151
  164. data/locale/id/katello.po +166 -151
  165. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  166. data/locale/it/katello.po +169 -154
  167. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  168. data/locale/ja/katello.po +179 -164
  169. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  170. data/locale/ka/katello.po +177 -162
  171. data/locale/katello.pot +1119 -1062
  172. data/locale/kn/katello.po +166 -151
  173. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  174. data/locale/ko/katello.po +174 -159
  175. data/locale/ml_IN/katello.po +166 -151
  176. data/locale/mr/katello.po +166 -151
  177. data/locale/nl_NL/katello.po +166 -151
  178. data/locale/or/katello.po +166 -151
  179. data/locale/pa/katello.po +166 -151
  180. data/locale/pl/katello.po +166 -151
  181. data/locale/pl_PL/katello.po +166 -151
  182. data/locale/pt/katello.po +166 -151
  183. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  184. data/locale/pt_BR/katello.po +178 -163
  185. data/locale/ro/katello.po +166 -151
  186. data/locale/ro_RO/katello.po +166 -151
  187. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  188. data/locale/ru/katello.po +171 -156
  189. data/locale/sl/katello.po +166 -151
  190. data/locale/sv_SE/katello.po +166 -151
  191. data/locale/ta/katello.po +166 -151
  192. data/locale/ta_IN/katello.po +166 -151
  193. data/locale/te/katello.po +166 -151
  194. data/locale/tr/katello.po +166 -151
  195. data/locale/vi/katello.po +166 -151
  196. data/locale/vi_VN/katello.po +166 -151
  197. data/locale/zh/katello.po +166 -151
  198. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  199. data/locale/zh_CN/katello.po +179 -164
  200. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  201. data/locale/zh_TW/katello.po +171 -156
  202. data/webpack/ForemanColumnExtensions/index.js +129 -0
  203. data/webpack/components/Table/TableWrapper.js +14 -0
  204. data/webpack/components/extensions/HostDetails/ActionsBar/index.js +1 -1
  205. data/webpack/components/extensions/Hosts/ActionsBar/index.js +20 -1
  206. data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCVModal/BulkChangeHostCVModal.js +220 -0
  207. data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCVModal/actions.js +23 -0
  208. data/webpack/components/extensions/Hosts/BulkActions/BulkChangeHostCVModal/index.js +25 -0
  209. data/webpack/components/extensions/Hosts/BulkActions/__tests__/bulkChangeHostCVModal.test.js +133 -0
  210. data/webpack/global_index.js +9 -0
  211. data/webpack/scenes/Hosts/ChangeContentSource/actions.js +3 -1
  212. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +62 -24
  213. data/webpack/scenes/Hosts/ChangeContentSource/index.js +24 -16
  214. data/webpack/scenes/RedHatRepositories/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +1 -0
  215. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +64 -5
  216. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/UpstreamSubscriptionsPage.js +16 -13
  217. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +14 -8
  218. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +1 -0
  219. data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +1 -1
  220. metadata +59 -41
  221. data/app/lib/actions/katello/host/upload_package_profile.rb +0 -45
  222. data/app/lib/actions/katello/host/upload_profiles.rb +0 -47
@@ -4,14 +4,16 @@ module Katello
4
4
  before_action :disable_strong_params
5
5
  before_action :confirm_settings
6
6
  before_action :confirm_push_settings, only: [:start_upload_blob, :upload_blob, :finish_upload_blob,
7
- :chunk_upload_blob, :push_manifest]
7
+ :push_manifest]
8
8
  skip_before_action :authorize
9
9
  before_action :optional_authorize, only: [:token, :catalog]
10
10
  before_action :registry_authorize, except: [:token, :v1_search, :catalog]
11
11
  before_action :authorize_repository_read, only: [:pull_manifest, :tags_list]
12
- before_action :authorize_repository_write, only: [:push_manifest]
12
+ # TODO: authorize_repository_write commented out until Katello indexes Pulp container push repositories.
13
+ # before_action :authorize_repository_write, only: [:start_upload_blob, :upload_blob, :finish_upload_blob,
14
+ # :push_manifest]
13
15
  skip_before_action :check_media_type, only: [:start_upload_blob, :upload_blob, :finish_upload_blob,
14
- :chunk_upload_blob, :push_manifest]
16
+ :push_manifest]
15
17
 
16
18
  wrap_parameters false
17
19
 
@@ -182,15 +184,8 @@ module Katello
182
184
  end
183
185
 
184
186
  def check_blob
185
- begin
186
- r = Resources::Registry::Proxy.get(@_request.fullpath, 'Accept' => request.headers['Accept'])
187
- response.header['Content-Length'] = "#{r.body.size}"
188
- rescue RestClient::NotFound
189
- digest_file = tmp_file("#{params[:digest][7..-1]}.tar")
190
- raise unless File.exist? digest_file
191
- response.header['Content-Length'] = "#{File.size digest_file}"
192
- end
193
- render json: {}
187
+ pulp_response = Resources::Registry::Proxy.get(@_request.fullpath, 'Accept' => request.headers['Accept'])
188
+ head pulp_response.code
194
189
  end
195
190
 
196
191
  def redirect_client
@@ -210,94 +205,67 @@ module Katello
210
205
  redirect_client { Resources::Registry::Proxy.get(@_request.fullpath, headers, max_redirects: 0) }
211
206
  end
212
207
 
213
- # FIXME: Reimplement for Pulp 3.
214
208
  def push_manifest
215
- repository = params[:repository]
216
- tag = params[:tag]
217
-
218
- manifest = create_manifest
219
- return if manifest.nil?
220
-
221
- begin
222
- files = get_manifest_files(repository, manifest)
223
- return if files.nil?
224
-
225
- tar_file = create_tar_file(files, repository, tag)
226
- return if tar_file.nil?
227
-
228
- digest = upload_manifest(tar_file)
229
- return if digest.nil?
230
-
231
- tag = upload_tag(digest, tag)
232
- return if tag.nil?
233
- ensure
234
- File.delete(tmp_file('manifest.json')) if File.exist? tmp_file('manifest.json')
209
+ headers = translated_headers_for_proxy
210
+ headers['Content-Type'] = request.headers['Content-Type'] if request.headers['Content-Type']
211
+ body = @_request.body.read
212
+ pulp_response = Resources::Registry::Proxy.put(@_request.fullpath, body, headers)
213
+ pulp_response.headers.each do |key, value|
214
+ response.header[key.to_s] = value
235
215
  end
236
-
237
- render json: {}
238
- end
239
-
240
- # FIXME: This is referring to a non-existent Pulp 2 server.
241
- # Pulp 3 container push support is needed instead.
242
- def pulp_content
243
- Katello.pulp_server.resources.content
216
+ head pulp_response.code
244
217
  end
245
218
 
246
219
  def start_upload_blob
247
- uuid = SecureRandom.hex(16)
248
- response.header['Location'] = "#{request_url}/v2/#{params[:repository]}/blobs/uploads/#{uuid}"
249
- response.header['Docker-Upload-UUID'] = uuid
250
- response.header['Range'] = '0-0'
251
- head 202
252
- end
220
+ headers = translated_headers_for_proxy
221
+ headers['Content-Type'] = request.headers['Content-Type'] if request.headers['Content-Type']
222
+ headers['Content-Length'] = request.headers['Content-Length'] if request.headers['Content-Length']
223
+ pulp_response = Resources::Registry::Proxy.post(@_request.fullpath, @_request.body, headers)
253
224
 
254
- def status_upload_blob
255
- response.header['Location'] = "#{request_url}/v2/#{params[:repository]}/blobs/uploads/#{params[:uuid]}"
256
- response.header['Range'] = "123"
257
- response.header['Docker-Upload-UUID'] = "123"
258
- render plain: '', status: :no_content
225
+ pulp_response.headers.each do |key, value|
226
+ response.header[key.to_s] = value
227
+ end
228
+ head pulp_response.code
259
229
  end
260
230
 
261
- def chunk_upload_blob
262
- response.header['Location'] = "#{request_url}/v2/#{params[:repository]}/blobs/uploads/#{params[:uuid]}"
263
- render plain: '', status: :accepted
231
+ def translated_headers_for_proxy
232
+ current_headers = {}
233
+ env = request.env.select do |key, _value|
234
+ key.match("^HTTP_.*")
235
+ end
236
+ env.each do |header|
237
+ current_headers[header[0].split('_')[1..-1].join('-')] = header[1]
238
+ end
239
+ current_headers
264
240
  end
265
241
 
266
242
  def upload_blob
267
- File.open(tmp_file("#{params[:uuid]}.tar"), 'ab', 0600) do |file|
268
- file.write request.body.read
243
+ headers = translated_headers_for_proxy
244
+ headers['Content-Type'] = request.headers['Content-Type'] if request.headers['Content-Type']
245
+ headers['Content-Range'] = request.headers['Content-Range'] if request.headers['Content-Range']
246
+ headers['Content-Length'] = request.headers['Content-Length'] if request.headers['Content-Length']
247
+ body = @_request.body.read
248
+ pulp_response = Resources::Registry::Proxy.patch(@_request.fullpath, body, headers)
249
+
250
+ pulp_response.headers.each do |key, value|
251
+ response.header[key.to_s] = value
269
252
  end
270
253
 
271
- # ???? true chunked data?
272
- if request.headers['Content-Range']
273
- render_error 'unprocessable_entity', :status => :unprocessable_entity
274
- end
275
-
276
- response.header['Location'] = "#{request_url}/v2/#{params[:repository]}/blobs/uploads/#{params[:uuid]}"
277
- response.header['Range'] = "1-#{request.body.size}"
278
- response.header['Docker-Upload-UUID'] = params[:uuid]
279
- head 204
254
+ head pulp_response.code
280
255
  end
281
256
 
282
257
  def finish_upload_blob
283
- # error by client if no params[:digest]
284
-
285
- uuid_file = tmp_file("#{params[:uuid]}.tar")
286
- digest_file = tmp_file("#{params[:digest][7..-1]}.tar")
287
-
288
- File.delete(digest_file) if File.exist? digest_file
289
- File.rename(uuid_file, digest_file)
290
-
291
- response.header['Location'] = "#{request_url}/v2/#{params[:repository]}/blobs/#{params[:digest]}"
292
- response.header['Docker-Content-Digest'] = params[:digest]
293
- response.header['Content-Range'] = "1-#{File.size(digest_file)}"
294
- response.header['Content-Length'] = "0"
295
- response.header['Docker-Upload-UUID'] = params[:uuid]
296
- head 201
297
- end
258
+ headers = translated_headers_for_proxy
259
+ headers['Content-Type'] = request.headers['Content-Type'] if request.headers['Content-Type']
260
+ headers['Content-Range'] = request.headers['Content-Range'] if request.headers['Content-Range']
261
+ headers['Content-Length'] = request.headers['Content-Length'] if request.headers['Content-Length']
262
+ pulp_response = Resources::Registry::Proxy.put(@_request.fullpath, @_request.body, headers)
263
+
264
+ pulp_response.headers.each do |key, value|
265
+ response.header[key.to_s] = value
266
+ end
298
267
 
299
- def cancel_upload_blob
300
- render plain: '', status: :ok
268
+ head pulp_response.code
301
269
  end
302
270
 
303
271
  def ping
@@ -411,47 +379,6 @@ module Katello
411
379
  tar_file
412
380
  end
413
381
 
414
- # FIXME: Reimplement for Pulp 3.
415
- def upload_manifest(tar_file)
416
- upload_id = pulp_content.create_upload_request['upload_id']
417
- filename = tmp_file(tar_file)
418
- uploads = []
419
-
420
- File.open(filename, 'rb') do |file|
421
- content = file.read
422
- pulp_content.upload_bits(upload_id, 0, content)
423
-
424
- uploads << {
425
- id: upload_id,
426
- name: filename,
427
- size: file.size,
428
- checksum: Digest::SHA256.hexdigest(content)
429
- }
430
- end
431
-
432
- File.delete(filename)
433
- task = sync_task(::Actions::Katello::Repository::ImportUpload,
434
- @repository, uploads, generate_metadata: true, sync_capsule: true)
435
- task.output['upload_results'][0]['digest']
436
- ensure
437
- pulp_content.delete_upload_request(upload_id) if upload_id
438
- end
439
-
440
- # FIXME: Reimplement for Pulp 3.
441
- def upload_tag(digest, tag)
442
- upload_id = pulp_content.create_upload_request['upload_id']
443
- uploads = [{
444
- id: upload_id,
445
- name: tag,
446
- digest: digest
447
- }]
448
- sync_task(::Actions::Katello::Repository::ImportUpload, @repository, uploads,
449
- :generate_metadata => true, :sync_capsule => true)
450
- tag
451
- ensure
452
- pulp_content.delete_upload_request(upload_id) if upload_id
453
- end
454
-
455
382
  def tmp_dir
456
383
  "#{Rails.root}/tmp"
457
384
  end
@@ -15,16 +15,12 @@ module Katello
15
15
  #param :id, String, :desc => N_("UUID of the consumer"), :required => true
16
16
  def upload_package_profile
17
17
  User.as_anonymous_admin do
18
- if Setting['upload_profiles_without_dynflow']
19
- uploader = ::Katello::Host::PackageProfileUploader.new(
20
- host: @host,
21
- profile_string: request.raw_post
22
- )
23
- uploader.upload
24
- uploader.trigger_applicability_generation
25
- else
26
- async_task(::Actions::Katello::Host::UploadPackageProfile, @host, request.raw_post)
27
- end
18
+ uploader = ::Katello::Host::PackageProfileUploader.new(
19
+ host: @host,
20
+ profile_string: request.raw_post
21
+ )
22
+ uploader.upload
23
+ uploader.trigger_applicability_generation
28
24
  end
29
25
  render :json => Resources::Candlepin::Consumer.get(@host.subscription_facet.uuid)
30
26
  end
@@ -33,16 +29,12 @@ module Katello
33
29
  param :id, String, :desc => N_("UUID of the consumer"), :required => true
34
30
  def upload_profiles
35
31
  User.as_anonymous_admin do
36
- if Setting['upload_profiles_without_dynflow']
37
- uploader = ::Katello::Host::ProfilesUploader.new(
38
- host: @host,
39
- profile_string: request.raw_post
40
- )
41
- uploader.upload
42
- uploader.trigger_applicability_generation
43
- else
44
- async_task(::Actions::Katello::Host::UploadProfiles, @host, request.raw_post)
45
- end
32
+ uploader = ::Katello::Host::ProfilesUploader.new(
33
+ host: @host,
34
+ profile_string: request.raw_post
35
+ )
36
+ uploader.upload
37
+ uploader.trigger_applicability_generation
46
38
  end
47
39
  render :json => Resources::Candlepin::Consumer.get(@host.subscription_facet.uuid)
48
40
  end
@@ -40,7 +40,7 @@ module Katello
40
40
  param :unlimited_hosts, :bool, :desc => N_("can the activation key have unlimited hosts")
41
41
  param :release_version, String, :desc => N_("content release version")
42
42
  param :service_level, String, :desc => N_("service level")
43
- param :auto_attach, :bool, :desc => N_("auto attach subscriptions upon registration")
43
+ param :auto_attach, :bool, :desc => N_("auto attach subscriptions upon registration"), deprecated: true
44
44
  param :purpose_usage, String, :desc => N_("Sets the system purpose usage")
45
45
  param :purpose_role, String, :desc => N_("Sets the system purpose usage")
46
46
  param :purpose_addons, Array, :desc => N_("Sets the system add-ons")
@@ -163,7 +163,11 @@ module Katello
163
163
  respond_for_show(:resource => @activation_key)
164
164
  end
165
165
 
166
- api :PUT, "/activation_keys/:id/add_subscriptions", N_("Attach a subscription")
166
+ def deprecate_entitlement_mode_endpoint
167
+ ::Foreman::Deprecation.api_deprecation_warning(N_("This endpoint is deprecated and will be removed in an upcoming release. Simple Content Access is the only supported content access mode."))
168
+ end
169
+
170
+ api :PUT, "/activation_keys/:id/add_subscriptions", N_("Attach a subscription"), deprecated: true
167
171
  param :id, :number, :desc => N_("ID of the activation key"), :required => true
168
172
  param :subscription_id, :number, :desc => N_("Subscription identifier"), :required => false
169
173
  param :quantity, :number, :desc => N_("Quantity of this subscription to add"), :required => false
@@ -172,6 +176,7 @@ module Katello
172
176
  param :quantity, :number, :desc => N_("Quantity of this subscriptions to add"), :required => false
173
177
  end
174
178
  def add_subscriptions
179
+ deprecate_entitlement_mode_endpoint
175
180
  if params[:subscriptions]
176
181
  params[:subscriptions].each { |subscription| @activation_key.subscribe(subscription[:id], subscription[:quantity]) }
177
182
  elsif params[:subscription_id]
@@ -181,13 +186,14 @@ module Katello
181
186
  respond_for_index(:collection => subscription_index, :template => 'subscriptions')
182
187
  end
183
188
 
184
- api :PUT, "/activation_keys/:id/remove_subscriptions", N_("Unattach a subscription")
189
+ api :PUT, "/activation_keys/:id/remove_subscriptions", N_("Unattach a subscription"), deprecated: true
185
190
  param :id, :number, :desc => N_("ID of the activation key"), :required => true
186
191
  param :subscription_id, String, :desc => N_("Subscription ID"), :required => false
187
192
  param :subscriptions, Array, :desc => N_("Array of subscriptions to add"), :required => false do
188
193
  param :id, String, :desc => N_("Subscription Pool uuid"), :required => false
189
194
  end
190
195
  def remove_subscriptions
196
+ deprecate_entitlement_mode_endpoint
191
197
  if params[:subscriptions]
192
198
  params[:subscriptions].each { |subscription| @activation_key.unsubscribe(subscription[:id]) }
193
199
  elsif params[:subscription_id]
@@ -229,7 +235,7 @@ module Katello
229
235
 
230
236
  api :GET, "/activation_keys/:id/product_content", N_("Show content available for an activation key")
231
237
  param :id, String, :desc => N_("ID of the activation key"), :required => true
232
- param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions")
238
+ param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions"), deprecated: true, default: true
233
239
  param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the activation key's content view version")
234
240
  param_group :search, Api::V2::ApiController
235
241
  def product_content
@@ -112,6 +112,30 @@ module Katello
112
112
  respond_for_async :resource => task
113
113
  end
114
114
 
115
+ api :POST, '/capsules/:id/content/verify_checksum', N_('Check for missing or corrupted artifacts, and attempt to redownload them.')
116
+ param :id, :number, :required => true, :desc => N_('Id of the smart proxy')
117
+ param :environment_id, Integer, :desc => N_('Id of the environment to limit verifying checksum on')
118
+ param :content_view_id, Integer, :desc => N_('Id of the content view to limit verifying checksum on')
119
+ param :repository_id, Integer, :desc => N_('Id of the repository to limit verifying checksum on')
120
+ def verify_checksum
121
+ find_capsule(false)
122
+ find_environment if params[:environment_id]
123
+ find_content_view if params[:content_view_id]
124
+ find_repository if params[:repository_id]
125
+
126
+ repair_options = {
127
+ :environment_id => @environment.try(:id),
128
+ :content_view_id => @content_view.try(:id),
129
+ :repository_id => @repository.try(:id)
130
+ }
131
+ repair_options[:environment_ids] = @capsule.lifecycle_environments&.pluck(:id) unless (@environment || @content_view || @repository)
132
+
133
+ task = async_task(::Actions::Katello::CapsuleContent::VerifyChecksum,
134
+ @capsule,
135
+ repair_options)
136
+ respond_for_async :resource => task
137
+ end
138
+
115
139
  protected
116
140
 
117
141
  def respond_for_lifecycle_environments_index(environments)
@@ -3,8 +3,8 @@ module Katello
3
3
  include ::Api::V2::BulkHostsExtension
4
4
  include Katello::Concerns::FilteredAutoCompleteSearch
5
5
 
6
- before_action :find_authorized_katello_resource, :only => [:show, :update, :promote, :destroy, :republish_repositories]
7
- before_action :find_content_view_from_version, :only => [:show, :update, :promote, :destroy, :republish_repositories]
6
+ before_action :find_authorized_katello_resource, :only => [:show, :update, :promote, :destroy, :republish_repositories, :verify_checksum]
7
+ before_action :find_content_view_from_version, :only => [:show, :update, :promote, :destroy, :republish_repositories, :verify_checksum]
8
8
  before_action :find_optional_readable_content_view, :only => [:index]
9
9
 
10
10
  before_action :find_environment, :only => [:index]
@@ -141,6 +141,13 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. New ver
141
141
  respond_for_async :resource => task
142
142
  end
143
143
 
144
+ api :POST, "/content_view_versions/:id/verify_checksum", N_("Verify checksum of repository contents in the content view version")
145
+ param :id, :number, :required => true, :desc => N_("Content view version identifier")
146
+ def verify_checksum
147
+ task = async_task(::Actions::Katello::ContentViewVersion::VerifyChecksum, @content_view_version)
148
+ respond_for_async :resource => task
149
+ end
150
+
144
151
  private
145
152
 
146
153
  def calculate_hosts_for_incremental(bulk_params, use_composites)
@@ -37,7 +37,7 @@ module Katello
37
37
  api :GET, "/repositories/:repository_id/debs", N_("List deb packages")
38
38
  param :organization_id, :number, :desc => N_("Organization identifier")
39
39
  param :content_view_version_id, :number, :desc => N_("Content View Version identifier")
40
- param :content_view_filter_id, :number, :desc => N_("Content View Filter identifier")
40
+ param :content_view_filter_id, :number, :desc => N_("Content View Filter identifier. Use to filter by ID")
41
41
  param :repository_id, :number, :desc => N_("Repository identifier")
42
42
  param :environment_id, :number, :desc => N_("Environment identifier")
43
43
  param :ids, Array, :desc => N_("Deb package identifiers to filter content by")
@@ -9,7 +9,7 @@ module Katello
9
9
  api :GET, "/errata", N_("List errata")
10
10
  param :organization_id, :number, :desc => N_("Organization identifier")
11
11
  param :content_view_version_id, :number, :desc => N_("Content View Version identifier")
12
- param :content_view_filter_id, :number, :desc => N_("Content View Filter identifier")
12
+ param :content_view_filter_id, :number, :desc => N_("Content View Filter identifier. Use to filter by ID")
13
13
  param :repository_id, :number, :desc => N_("Repository identifier")
14
14
  param :environment_id, :number, :desc => N_("Environment identifier")
15
15
  param :cve, String, :desc => N_("CVE identifier")
@@ -33,9 +33,14 @@ module Katello
33
33
  api_base_url "/api"
34
34
  end
35
35
 
36
- api :GET, "/hosts/:host_id/subscriptions", N_("List a host's subscriptions")
36
+ def deprecate_entitlement_mode_endpoint
37
+ ::Foreman::Deprecation.api_deprecation_warning(N_("This endpoint is deprecated and will be removed in an upcoming release. Simple Content Access is the only supported content access mode."))
38
+ end
39
+
40
+ api :GET, "/hosts/:host_id/subscriptions", N_("List a host's subscriptions"), deprecated: true
37
41
  param :host_id, Integer, :desc => N_("Id of the host"), :required => true
38
42
  def index
43
+ deprecate_entitlement_mode_endpoint
39
44
  @collection = index_response
40
45
  respond_for_index :collection => @collection
41
46
  end
@@ -47,9 +52,10 @@ module Katello
47
52
  full_result_response(presenter.subscriptions)
48
53
  end
49
54
 
50
- api :PUT, "/hosts/:host_id/subscriptions/auto_attach", N_("Trigger an auto-attach of subscriptions")
55
+ api :PUT, "/hosts/:host_id/subscriptions/auto_attach", N_("Trigger an auto-attach of subscriptions"), deprecated: true
51
56
  param :host_id, Integer, :desc => N_("Id of the host"), :required => true
52
57
  def auto_attach
58
+ deprecate_entitlement_mode_endpoint
53
59
  if @host.organization.simple_content_access?
54
60
  fail ::Katello::HttpErrors::BadRequest, _("This host's organization is in Simple Content Access mode. Auto-attach is disabled")
55
61
  end
@@ -111,13 +117,14 @@ module Katello
111
117
  rhsm_params
112
118
  end
113
119
 
114
- api :PUT, "/hosts/:host_id/subscriptions/remove_subscriptions"
120
+ api :PUT, "/hosts/:host_id/subscriptions/remove_subscriptions", N_("Remove subscriptions from a host"), deprecated: true
115
121
  param :host_id, Integer, :desc => N_("Id of the host"), :required => true
116
122
  param :subscriptions, Array, :desc => N_("Array of subscriptions to remove") do
117
123
  param :id, String, :desc => N_("Subscription Pool id"), :required => true
118
124
  param :quantity, Integer, :desc => N_("If specified, remove the first instance of a subscription with matching id and quantity"), :required => false
119
125
  end
120
126
  def remove_subscriptions
127
+ deprecate_entitlement_mode_endpoint
121
128
  #combine the quantities for duplicate pools into PoolWithQuantities objects
122
129
  pool_id_quantities = params.require(:subscriptions).inject({}) do |new_hash, subscription|
123
130
  new_hash[subscription['id']] ||= PoolWithQuantities.new(Pool.with_identifier(subscription['id']))
@@ -129,13 +136,14 @@ module Katello
129
136
  respond_for_index(:collection => index_response(reload_host: true), :template => "index")
130
137
  end
131
138
 
132
- api :PUT, "/hosts/:host_id/subscriptions/add_subscriptions", N_("Add a subscription to a host")
139
+ api :PUT, "/hosts/:host_id/subscriptions/add_subscriptions", N_("Add a subscription to a host"), deprecated: true
133
140
  param :host_id, Integer, :desc => N_("Id of the host"), :required => true
134
141
  param :subscriptions, Array, :desc => N_("Array of subscriptions to add"), :required => true do
135
142
  param :id, String, :desc => N_("Subscription Pool id"), :required => true
136
143
  param :quantity, :number, :desc => N_("Quantity of this subscriptions to add"), :required => true
137
144
  end
138
145
  def add_subscriptions
146
+ deprecate_entitlement_mode_endpoint
139
147
  if @host.organization.simple_content_access?
140
148
  fail ::Katello::HttpErrors::BadRequest, _("This host's organization is in Simple Content Access mode. Attaching subscriptions is disabled.")
141
149
  end
@@ -106,7 +106,7 @@ module Katello
106
106
  respond_for_async :resource => task
107
107
  end
108
108
 
109
- api :PUT, "/hosts/bulk/remove_subscriptions", N_("Remove subscriptions from one or more hosts")
109
+ api :PUT, "/hosts/bulk/remove_subscriptions", N_("Remove subscriptions from one or more hosts"), deprecated: true
110
110
  param_group :bulk_params
111
111
  param :subscriptions, Array, :desc => N_("Array of subscriptions to remove") do
112
112
  param :id, String, :desc => N_("Subscription Pool id"), :required => true
@@ -123,7 +123,7 @@ module Katello
123
123
  respond_for_async :resource => task
124
124
  end
125
125
 
126
- api :PUT, "/hosts/bulk/add_subscriptions", N_("Add subscriptions to one or more hosts")
126
+ api :PUT, "/hosts/bulk/add_subscriptions", N_("Add subscriptions to one or more hosts"), deprecated: true
127
127
  param_group :bulk_params
128
128
  param :subscriptions, Array, :desc => N_("Array of subscriptions to add"), :required => true do
129
129
  param :id, String, :desc => N_("Subscription Pool id"), :required => true
@@ -142,7 +142,7 @@ module Katello
142
142
  respond_for_async :resource => task
143
143
  end
144
144
 
145
- api :PUT, "/hosts/bulk/auto_attach", N_("Trigger an auto-attach of subscriptions on one or more hosts")
145
+ api :PUT, "/hosts/bulk/auto_attach", N_("Trigger an auto-attach of subscriptions on one or more hosts"), deprecated: true
146
146
  param_group :bulk_params
147
147
  def auto_attach
148
148
  task = async_task(::Actions::BulkAction, ::Actions::Katello::Host::AutoAttachSubscriptions, @hosts)
@@ -56,22 +56,11 @@ module Katello
56
56
  api :PUT, '/organizations/:id', N_('Update organization')
57
57
  param :id, :number, :desc => N_("organization ID"), :required => true
58
58
  param :redhat_repository_url, String, :desc => N_("Red Hat CDN URL"), deprecated: true
59
- param :simple_content_access, :bool, :desc => N_('Whether Simple Content Access should be enabled for the organization.'), :required => false, :default => true, deprecated: true
60
59
  param_group :resource
61
60
  def update
62
61
  if params[:redhat_repository_url]
63
62
  sync_task(::Actions::Katello::CdnConfiguration::Update, @organization.cdn_configuration, url: params[:redhat_repository_url])
64
63
  end
65
- unless params[:simple_content_access].nil?
66
- sca_param = ::Foreman::Cast.to_bool(params[:simple_content_access])
67
- if sca_param && !@taxonomy.simple_content_access?(cached: false)
68
- # user has requested SCA enable
69
- sync_task(::Actions::Katello::Organization::SimpleContentAccess::Enable, params[:id])
70
- elsif !sca_param && @taxonomy.simple_content_access?(cached: false)
71
- # user has requested SCA disable
72
- sync_task(::Actions::Katello::Organization::SimpleContentAccess::Disable, params[:id])
73
- end
74
- end
75
64
  super
76
65
  end
77
66
 
@@ -32,7 +32,7 @@ module Katello
32
32
  api :GET, "/repositories/:repository_id/:resource_id", N_("List :resource_id")
33
33
  param :organization_id, :number, :desc => N_("Organization identifier")
34
34
  param :content_view_version_id, :number, :desc => N_("Content View Version identifier")
35
- param :content_view_filter_id, :number, :desc => N_("Content View Filter identifier")
35
+ param :content_view_filter_id, :number, :desc => N_("Content View Filter identifier. Use to filter by ID")
36
36
  param :repository_id, :number, :desc => N_("Repository identifier")
37
37
  param :environment_id, :number, :desc => N_("Environment identifier")
38
38
  param :ids, Array, :desc => N_("Package identifiers to filter content by")
@@ -58,7 +58,7 @@ Pass [] to make repo available for clients regardless of OS version. Maximum len
58
58
  param :verify_ssl_on_sync, :bool, :desc => N_("if true, Katello will verify the upstream url's SSL certifcates are signed by a trusted CA")
59
59
  param :upstream_username, String, :desc => N_("Username of the upstream repository user used for authentication")
60
60
  param :upstream_password, String, :desc => N_("Password of the upstream repository user used for authentication")
61
- param :upstream_authentication_token, String, :desc => N_("Password of the upstream authentication token.")
61
+ param :upstream_authentication_token, String, :desc => N_("Upstream authentication token string for yum repositories.")
62
62
  param :deb_releases, String, :desc => N_("whitespace-separated list of releases to be synced from deb-archive")
63
63
  param :deb_components, String, :desc => N_("whitespace-separated list of repo components to be synced from deb-archive")
64
64
  param :deb_architectures, String, :desc => N_("whitespace-separated list of architectures to be synced from deb-archive")
@@ -576,13 +576,15 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
576
576
  end
577
577
 
578
578
  # rubocop:disable Metrics/CyclomaticComplexity
579
+ # rubocop:disable Metrics/PerceivedComplexity
579
580
  def repository_params
580
581
  keys = [:download_policy, :mirroring_policy, :sync_policy, :arch, :verify_ssl_on_sync, :upstream_password,
581
- :upstream_username, :download_concurrency, :upstream_authentication_token, :metadata_expire,
582
+ :upstream_username, :download_concurrency, :metadata_expire,
582
583
  {:os_versions => []}, :deb_releases, :deb_components, :deb_architectures, :description,
583
584
  :http_proxy_policy, :http_proxy_id, :retain_package_versions_count, {:ignorable_content => []}
584
585
  ]
585
586
  keys += [{:include_tags => []}, {:exclude_tags => []}, :docker_upstream_name] if params[:action] == 'create' || @repository&.docker?
587
+ keys += [:upstream_authentication_token] if params[:action] == 'create' || @repository&.yum?
586
588
  keys += [:ansible_collection_requirements, :ansible_collection_auth_url, :ansible_collection_auth_token] if params[:action] == 'create' || @repository&.ansible_collection?
587
589
  keys += [:label, :content_type] if params[:action] == "create"
588
590
 
@@ -614,27 +616,31 @@ Alternatively, use the 'force' parameter to regenerate metadata locally. On the
614
616
  credential_value
615
617
  end
616
618
 
617
- # rubocop:disable Metrics/PerceivedComplexity,Metrics/MethodLength
619
+ # rubocop:disable Metrics/MethodLength
618
620
  def construct_repo_from_params(repo_params) # rubocop:disable Metrics/AbcSize
619
621
  root = @product.add_repo(repo_params.slice(:label, :name, :description, :url, :content_type, :arch, :unprotected,
620
622
  :gpg_key, :ssl_ca_cert, :ssl_client_cert, :ssl_client_key,
621
623
  :checksum_type, :download_policy, :http_proxy_policy,
622
624
  :metadata_expire).to_h.with_indifferent_access)
623
- root.docker_upstream_name = repo_params[:docker_upstream_name] if repo_params[:docker_upstream_name]
624
- if root.docker?
625
- root.include_tags = repo_params.fetch(:include_tags, [])
626
- end
627
- root.exclude_tags = repo_params.fetch(:exclude_tags, ['*-source']) if root.docker?
628
625
  root.verify_ssl_on_sync = ::Foreman::Cast.to_bool(repo_params[:verify_ssl_on_sync]) if repo_params.key?(:verify_ssl_on_sync)
629
626
  root.mirroring_policy = repo_params[:mirroring_policy] || Katello::RootRepository::MIRRORING_POLICY_CONTENT
630
627
  root.upstream_username = repo_params[:upstream_username] if repo_params.key?(:upstream_username)
631
628
  root.upstream_password = repo_params[:upstream_password] if repo_params.key?(:upstream_password)
632
- root.upstream_authentication_token = repo_params[:upstream_authentication_token] if repo_params.key?(:upstream_authentication_token)
633
- root.ignorable_content = repo_params[:ignorable_content] if root.yum? && repo_params.key?(:ignorable_content)
634
629
  root.http_proxy_policy = repo_params[:http_proxy_policy] if repo_params.key?(:http_proxy_policy)
635
630
  root.http_proxy_id = repo_params[:http_proxy_id] if repo_params.key?(:http_proxy_id)
636
- root.os_versions = repo_params.fetch(:os_versions, []) if root.yum?
637
- root.retain_package_versions_count = repo_params[:retain_package_versions_count] if root.yum? && repo_params.key?(:retain_package_versions_count)
631
+
632
+ if root.yum?
633
+ root.upstream_authentication_token = repo_params[:upstream_authentication_token] if repo_params.key?(:upstream_authentication_token)
634
+ root.retain_package_versions_count = repo_params[:retain_package_versions_count] if repo_params.key?(:retain_package_versions_count)
635
+ root.ignorable_content = repo_params[:ignorable_content] if repo_params.key?(:ignorable_content)
636
+ root.os_versions = repo_params.fetch(:os_versions, [])
637
+ end
638
+
639
+ if root.docker?
640
+ root.docker_upstream_name = repo_params[:docker_upstream_name] if repo_params[:docker_upstream_name]
641
+ root.include_tags = repo_params.fetch(:include_tags, [])
642
+ root.exclude_tags = repo_params.fetch(:exclude_tags, ['*-source'])
643
+ end
638
644
 
639
645
  if root.generic?
640
646
  generic_remote_options = generic_remote_options_hash(repo_params)
@@ -29,7 +29,7 @@ module Katello
29
29
  param :with_custom, :bool, :required => false, :desc => N_("If true, return custom repository sets along with redhat repos. Will be ignored if repository_type is supplied.")
30
30
  param :activation_key_id, :number, :desc => N_("activation key identifier"), :required => false
31
31
  param :host_id, :number, :desc => N_("Id of the host"), :required => false
32
- param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions.")
32
+ param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions."), deprecated: true, default: true
33
33
  param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the host's or activation key's content view version and lifecycle environment.")
34
34
  param :status, [:enabled, :disabled, :overridden],
35
35
  :desc => N_("Limit content to enabled / disabled / overridden"),
@@ -225,6 +225,7 @@ module Katello
225
225
 
226
226
  def setup_params
227
227
  return unless params[:id]
228
+ params[:content_access_mode_all] = true
228
229
  if params[:entity] == :activation_key
229
230
  params[:activation_key_id] ||= params[:id]
230
231
  else