katello 3.14.1 → 3.15.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 (167) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
  3. data/app/controllers/katello/api/v2/products_bulk_actions_controller.rb +3 -3
  4. data/app/controllers/katello/api/v2/repositories_controller.rb +1 -1
  5. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +1 -1
  6. data/app/lib/actions/katello/content_view/publish.rb +2 -0
  7. data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -0
  8. data/app/lib/actions/katello/host/reassign.rb +1 -2
  9. data/app/lib/actions/katello/host/update_content_view.rb +1 -1
  10. data/app/lib/actions/katello/host/update_release_version.rb +1 -1
  11. data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -1
  12. data/app/lib/actions/katello/product/update_http_proxy.rb +1 -1
  13. data/app/lib/actions/katello/repository/clone_contents.rb +1 -1
  14. data/app/lib/actions/katello/repository/clone_to_environment.rb +2 -1
  15. data/app/lib/actions/katello/repository/create.rb +1 -1
  16. data/app/lib/actions/katello/repository/metadata_generate.rb +2 -8
  17. data/app/lib/actions/katello/repository/refresh_repository.rb +5 -1
  18. data/app/lib/actions/katello/repository/sync.rb +6 -1
  19. data/app/lib/actions/middleware/execute_if_contents_changed.rb +1 -1
  20. data/app/lib/actions/pulp/orchestration/repository/refresh_if_needed.rb +1 -1
  21. data/app/lib/actions/pulp/repository/clear.rb +1 -1
  22. data/app/lib/actions/pulp/repository/remove_units.rb +1 -1
  23. data/app/lib/actions/pulp3/abstract_async_task.rb +1 -2
  24. data/app/lib/actions/pulp3/capsule_content/generate_metadata.rb +1 -1
  25. data/app/lib/actions/pulp3/capsule_content/refresh_distribution.rb +2 -2
  26. data/app/lib/actions/pulp3/capsule_content/sync.rb +1 -1
  27. data/app/lib/actions/pulp3/content_migration.rb +17 -0
  28. data/app/lib/actions/pulp3/import_migration.rb +14 -0
  29. data/app/lib/actions/pulp3/orchestration/orphan_cleanup/remove_orphans.rb +4 -1
  30. data/app/lib/actions/pulp3/orchestration/repository/copy_all_units.rb +3 -3
  31. data/app/lib/actions/pulp3/orchestration/repository/create.rb +3 -1
  32. data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +0 -2
  33. data/app/lib/actions/pulp3/orchestration/repository/import_upload.rb +1 -1
  34. data/app/lib/actions/pulp3/orchestration/repository/refresh_if_needed.rb +18 -0
  35. data/app/lib/actions/pulp3/orchestration/repository/refresh_repos.rb +1 -1
  36. data/app/lib/actions/pulp3/orchestration/repository/remove_units.rb +1 -1
  37. data/app/lib/actions/pulp3/orchestration/repository/sync.rb +1 -1
  38. data/app/lib/actions/pulp3/orchestration/repository/upload_content.rb +1 -1
  39. data/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_distributions.rb +16 -0
  40. data/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_remotes.rb +16 -0
  41. data/app/lib/actions/pulp3/orphan_cleanup/delete_orphan_repository_versions.rb +1 -6
  42. data/app/lib/actions/pulp3/orphan_cleanup/remove_orphans.rb +15 -0
  43. data/app/lib/actions/pulp3/orphan_cleanup/remove_unneeded_repos.rb +2 -2
  44. data/app/lib/actions/pulp3/repository/create.rb +1 -1
  45. data/app/lib/actions/pulp3/repository/create_publication.rb +1 -1
  46. data/app/lib/actions/pulp3/repository/presenters/content_unit_presenter.rb +1 -0
  47. data/app/lib/actions/pulp3/repository/refresh_distribution.rb +4 -2
  48. data/app/lib/actions/pulp3/repository/save_version.rb +12 -8
  49. data/app/lib/actions/pulp3/repository/upload_file.rb +2 -2
  50. data/app/lib/katello/api/v2/rendering.rb +1 -0
  51. data/app/lib/katello/concerns/base_template_scope_extensions.rb +5 -1
  52. data/app/lib/katello/http_resource.rb +4 -1
  53. data/app/lib/katello/resources/registry.rb +9 -2
  54. data/app/models/katello/concerns/content_facet_host_extensions.rb +1 -0
  55. data/app/models/katello/concerns/organization_extensions.rb +4 -4
  56. data/app/models/katello/concerns/smart_proxy_extensions.rb +33 -7
  57. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +34 -12
  58. data/app/models/katello/content_view_docker_filter.rb +1 -1
  59. data/app/models/katello/content_view_version.rb +20 -47
  60. data/app/models/katello/glue/candlepin/owner.rb +4 -0
  61. data/app/models/katello/glue/candlepin/product.rb +12 -6
  62. data/app/models/katello/glue/pulp/repos.rb +6 -3
  63. data/app/models/katello/host/subscription_facet.rb +4 -5
  64. data/app/models/katello/ping.rb +3 -4
  65. data/app/models/katello/pool.rb +1 -1
  66. data/app/models/katello/pulp3/distribution_reference.rb +1 -1
  67. data/app/models/katello/repository.rb +14 -0
  68. data/app/models/katello/root_repository.rb +0 -2
  69. data/app/models/katello/subscription_status.rb +7 -0
  70. data/app/models/setting/content.rb +10 -3
  71. data/app/services/katello/candlepin/consumer.rb +1 -0
  72. data/app/services/katello/pulp/repository.rb +1 -1
  73. data/app/services/katello/pulp/repository/deb.rb +2 -0
  74. data/app/services/katello/pulp/repository/docker.rb +2 -0
  75. data/app/services/katello/pulp/repository/file.rb +2 -0
  76. data/app/services/katello/pulp/repository/yum.rb +9 -5
  77. data/app/services/katello/pulp3/ansible_collection.rb +1 -1
  78. data/app/services/katello/pulp3/api/ansible_collection.rb +46 -0
  79. data/app/services/katello/pulp3/api/core.rb +159 -0
  80. data/app/services/katello/pulp3/api/docker.rb +62 -0
  81. data/app/services/katello/pulp3/api/file.rb +54 -0
  82. data/app/services/katello/pulp3/api/yum.rb +54 -0
  83. data/app/services/katello/pulp3/distribution.rb +17 -0
  84. data/app/services/katello/pulp3/docker_blob.rb +1 -1
  85. data/app/services/katello/pulp3/docker_manifest.rb +1 -1
  86. data/app/services/katello/pulp3/docker_manifest_list.rb +1 -1
  87. data/app/services/katello/pulp3/docker_tag.rb +1 -1
  88. data/app/services/katello/pulp3/erratum.rb +109 -0
  89. data/app/services/katello/pulp3/file_unit.rb +1 -1
  90. data/app/services/katello/pulp3/migration.rb +71 -0
  91. data/app/services/katello/pulp3/migration_plan.rb +27 -0
  92. data/app/services/katello/pulp3/module_stream.rb +47 -0
  93. data/app/services/katello/pulp3/package_group.rb +66 -0
  94. data/app/services/katello/pulp3/pulp_content_unit.rb +9 -1
  95. data/app/services/katello/pulp3/repository.rb +118 -348
  96. data/app/services/katello/pulp3/repository/ansible_collection.rb +1 -29
  97. data/app/services/katello/pulp3/repository/docker.rb +23 -43
  98. data/app/services/katello/pulp3/repository/file.rb +1 -37
  99. data/app/services/katello/pulp3/repository/yum.rb +36 -37
  100. data/app/services/katello/pulp3/repository_mirror.rb +171 -0
  101. data/app/services/katello/pulp3/rpm.rb +143 -0
  102. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +92 -0
  103. data/app/services/katello/pulp3/smart_proxy_repository.rb +38 -9
  104. data/app/services/katello/pulp3/srpm.rb +74 -0
  105. data/app/services/katello/pulp3/yum_metadata_file.rb +20 -0
  106. data/app/services/katello/registration_manager.rb +12 -11
  107. data/app/services/katello/repository_type.rb +11 -3
  108. data/app/services/katello/repository_type_manager.rb +11 -0
  109. data/app/views/dashboard/_subscription_widget.html.erb +6 -1
  110. data/app/views/katello/api/v2/content_view_versions/base.json.rabl +4 -11
  111. data/app/views/katello/api/v2/docker_manifest_lists/show.json.rabl +2 -1
  112. data/app/views/katello/api/v2/docker_manifests/show.json.rabl +2 -1
  113. data/app/views/katello/api/v2/package_groups/show.json.rabl +1 -1
  114. data/app/views/katello/api/v2/packages/show.json.rabl +2 -1
  115. data/app/views/katello/api/v2/repositories/base.json.rabl +2 -0
  116. data/app/views/katello/api/v2/repositories/show.json.rabl +2 -1
  117. data/app/views/katello/api/v2/smart_proxies/pulp_info.json.rabl +2 -0
  118. data/app/views/katello/api/v2/subscription_facet/show.json.rabl +1 -1
  119. data/app/views/smart_proxies/plugins/_pulp3.html.erb +19 -0
  120. data/app/views/smart_proxies/pulp_status.html.erb +10 -0
  121. data/db/migrate/20190930192813_add_pulp3_hrefs_to_content_types.rb +10 -0
  122. data/db/migrate/20191204020703_migrate_distribution_reference_to_use_repo_id.rb +22 -0
  123. data/db/migrate/20191204214919_add_content_view_version_counts.rb +7 -0
  124. data/db/migrate/20191213161248_add_dmi_uuid_to_katello_subscription_facets.rb +6 -0
  125. data/db/migrate/20200109162354_drop_host_update_lock_setting.rb +5 -0
  126. data/db/seeds.d/104-proxy.rb +1 -1
  127. data/db/seeds.d/111-upgrade_tasks.rb +3 -1
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js +3 -2
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html +8 -3
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -2
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-available-content-views.html +1 -1
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/components/views/content-view-composite-content-views-list.html +1 -1
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/products-bulk-http-proxy-modal.html +3 -3
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +2 -2
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +2 -2
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +4 -1
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +1 -1
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
  139. data/lib/katello/engine.rb +25 -25
  140. data/lib/katello/plugin.rb +1 -1
  141. data/lib/katello/repository_types/ansible_collection.rb +1 -0
  142. data/lib/katello/repository_types/docker.rb +2 -1
  143. data/lib/katello/repository_types/file.rb +1 -1
  144. data/lib/katello/repository_types/yum.rb +29 -7
  145. data/lib/katello/tasks/pulp3_content_switchover.rake +21 -0
  146. data/lib/katello/tasks/pulp3_migration.rake +21 -0
  147. data/lib/katello/tasks/reset.rake +43 -16
  148. data/lib/katello/tasks/update_content_default_http_proxy.rake +3 -3
  149. data/lib/katello/tasks/upgrades/3.15/reindex_rpm_modular.rake +23 -0
  150. data/lib/katello/tasks/upgrades/3.15/set_sub_facet_dmi_uuid.rake +16 -0
  151. data/lib/katello/version.rb +1 -1
  152. data/package.json +9 -10
  153. data/webpack/components/WithOrganization/__snapshots__/withOrganization.test.js.snap +0 -63
  154. data/webpack/redux/actions/RedHatRepositories/helpers.js +5 -5
  155. data/webpack/redux/reducers/RedHatRepositories/repositorySetRepositories.js +17 -2
  156. data/webpack/scenes/RedHatRepositories/components/RepositorySet.js +1 -0
  157. data/webpack/scenes/RedHatRepositories/components/RepositorySetRepositories.js +1 -1
  158. data/webpack/scenes/RedHatRepositories/components/RepositorySetRepository/RepositorySetRepository.js +2 -3
  159. data/webpack/scenes/RedHatRepositories/components/__tests__/RepositorySetRepositories.test.js +44 -28
  160. data/webpack/scenes/RedHatRepositories/components/__tests__/__snapshots__/RepositorySetRepositories.test.js.snap +77 -45
  161. data/webpack/scenes/Subscriptions/UpstreamSubscriptions/__tests__/__snapshots__/UpstreamSubscriptionsPage.test.js.snap +2 -6
  162. data/webpack/scenes/Subscriptions/components/SubscriptionsTable/__tests__/__snapshots__/SubscriptionTypeFormatter.test.js.snap +0 -1
  163. data/webpack/test_setup.js +3 -1
  164. metadata +62 -24
  165. data/app/lib/actions/katello/host/update.rb +0 -84
  166. data/app/lib/actions/pulp3/repository/create_version.rb +0 -19
  167. data/app/views/katello/api/v2/smart_proxies/download_policy.json.rabl +0 -1
@@ -1,84 +0,0 @@
1
- module Actions
2
- module Katello
3
- module Host
4
- class Update < Actions::EntryAction
5
- middleware.use ::Actions::Middleware::RemoteAction
6
-
7
- def queue
8
- ::Katello::HOST_TASKS_QUEUE
9
- end
10
-
11
- def plan(host, consumer_params = nil)
12
- input[:hostname] = host.name
13
- action_subject host
14
- sequence do
15
- host.content_facet.save! if host.content_facet
16
-
17
- auto_attach_enabled_via_checkin = consumer_params.try(:[], 'autoheal')
18
-
19
- if host.subscription_facet
20
- consumer_params ||= host.subscription_facet.consumer_attributes
21
-
22
- host_uuid = consumer_params.dig(:facts, 'dmi.system.uuid')
23
- if ::Katello::Host::SubscriptionFacet.override_dmi_uuid?(host_uuid)
24
- # if host reported a dmi uuid to treat as a duplicate, override it with the stored host param
25
- override_value = host.subscription_facet.dmi_uuid_override&.value
26
- override_value ||= host.subscription_facet.update_dmi_uuid_override&.value
27
- consumer_params[:facts]['dmi.system.uuid'] = override_value
28
- end
29
-
30
- cp_update = plan_action(::Actions::Candlepin::Consumer::Update, host.subscription_facet.uuid, consumer_params)
31
- end
32
-
33
- if auto_attach_enabled_via_checkin
34
- plan_action(::Actions::Candlepin::Consumer::AutoAttachSubscriptions, :uuid => host.subscription_facet.uuid)
35
- end
36
-
37
- plan_self(:hostname => host.name, :consumer_params => consumer_params, :host_id => host.id,
38
- :dependency => cp_update.try(:output))
39
- end
40
- end
41
-
42
- def run
43
- User.as_anonymous_admin do
44
- host = ::Host.find(input[:host_id])
45
- if input[:consumer_params].try(:[], :facts)
46
- ::Katello::Host::SubscriptionFacet.update_facts(host, input[:consumer_params][:facts])
47
- end
48
- end
49
- end
50
-
51
- def finalize
52
- User.as_anonymous_admin do
53
- unless input[:consumer_params].blank?
54
- host = ::Host.find(input[:host_id])
55
- host.subscription_facet.update_from_consumer_attributes(input[:consumer_params])
56
- host.subscription_facet.save!
57
- input[:consumer_params][:facts] = 'TRIMMED' if input[:consumer_params].try(:[], :facts)
58
- end
59
- end
60
- end
61
-
62
- def resource_locks
63
- if Setting[:host_update_lock]
64
- :link
65
- else
66
- :update
67
- end
68
- end
69
-
70
- def rescue_strategy
71
- Dynflow::Action::Rescue::Skip
72
- end
73
-
74
- def humanized_name
75
- if input.try(:[], :hostname)
76
- _('Update for host %s') % input[:hostname]
77
- else
78
- _('Update for host')
79
- end
80
- end
81
- end
82
- end
83
- end
84
- end
@@ -1,19 +0,0 @@
1
- module Actions
2
- module Pulp3
3
- module Repository
4
- class CreateVersion < Pulp3::AbstractAsyncTask
5
- def plan(repository, smart_proxy)
6
- sequence do
7
- action = plan_self(:repository_id => repository.id, :smart_proxy_id => smart_proxy.id)
8
- plan_action(SaveVersion, repository, action.output[:pulp_tasks])
9
- end
10
- end
11
-
12
- def invoke_external_task
13
- repo = ::Katello::Repository.find(input[:repository_id])
14
- output[:response] = repo.backend_service(smart_proxy).create_version
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1 +0,0 @@
1
- attributes :download_policy