katello 4.9.1 → 4.10.0.rc2

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 (308) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -7
  3. data/app/assets/javascripts/katello/locale/bn/katello.js +8967 -1
  4. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +8967 -0
  5. data/app/assets/javascripts/katello/locale/ca/katello.js +8967 -0
  6. data/app/assets/javascripts/katello/locale/cs/katello.js +8967 -1
  7. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +8969 -0
  8. data/app/assets/javascripts/katello/locale/de/katello.js +8991 -1
  9. data/app/assets/javascripts/katello/locale/de_AT/katello.js +8966 -0
  10. data/app/assets/javascripts/katello/locale/de_DE/katello.js +8967 -0
  11. data/app/assets/javascripts/katello/locale/el/katello.js +8967 -0
  12. data/app/assets/javascripts/katello/locale/en/katello.js +8967 -1
  13. data/app/assets/javascripts/katello/locale/en_GB/katello.js +8967 -0
  14. data/app/assets/javascripts/katello/locale/en_US/katello.js +8966 -0
  15. data/app/assets/javascripts/katello/locale/es/katello.js +8984 -1
  16. data/app/assets/javascripts/katello/locale/et_EE/katello.js +8966 -0
  17. data/app/assets/javascripts/katello/locale/fr/katello.js +9008 -1
  18. data/app/assets/javascripts/katello/locale/gl/katello.js +8967 -0
  19. data/app/assets/javascripts/katello/locale/gu/katello.js +8967 -1
  20. data/app/assets/javascripts/katello/locale/he_IL/katello.js +8967 -0
  21. data/app/assets/javascripts/katello/locale/hi/katello.js +8967 -1
  22. data/app/assets/javascripts/katello/locale/id/katello.js +8966 -0
  23. data/app/assets/javascripts/katello/locale/it/katello.js +8974 -1
  24. data/app/assets/javascripts/katello/locale/ja/katello.js +9004 -1
  25. data/app/assets/javascripts/katello/locale/ka/katello.js +8976 -1
  26. data/app/assets/javascripts/katello/locale/kn/katello.js +8967 -1
  27. data/app/assets/javascripts/katello/locale/ko/katello.js +8972 -1
  28. data/app/assets/javascripts/katello/locale/locale/katello.js +3070 -1
  29. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +8966 -0
  30. data/app/assets/javascripts/katello/locale/mr/katello.js +8967 -1
  31. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +8967 -0
  32. data/app/assets/javascripts/katello/locale/or/katello.js +8967 -1
  33. data/app/assets/javascripts/katello/locale/pa/katello.js +8967 -1
  34. data/app/assets/javascripts/katello/locale/pl/katello.js +8967 -0
  35. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +8966 -0
  36. data/app/assets/javascripts/katello/locale/pt/katello.js +8967 -1
  37. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +8984 -1
  38. data/app/assets/javascripts/katello/locale/ro/katello.js +8966 -0
  39. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +8966 -0
  40. data/app/assets/javascripts/katello/locale/ru/katello.js +8973 -1
  41. data/app/assets/javascripts/katello/locale/sl/katello.js +8967 -0
  42. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +8967 -0
  43. data/app/assets/javascripts/katello/locale/ta/katello.js +8967 -1
  44. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +8967 -0
  45. data/app/assets/javascripts/katello/locale/te/katello.js +8967 -1
  46. data/app/assets/javascripts/katello/locale/tr/katello.js +8967 -0
  47. data/app/assets/javascripts/katello/locale/vi/katello.js +8966 -0
  48. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +8966 -0
  49. data/app/assets/javascripts/katello/locale/zh/katello.js +8966 -0
  50. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +9004 -1
  51. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +8972 -1
  52. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -1
  53. data/app/controllers/katello/api/v2/alternate_content_sources_bulk_actions_controller.rb +22 -1
  54. data/app/controllers/katello/api/v2/api_controller.rb +0 -15
  55. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +13 -4
  56. data/app/controllers/katello/api/v2/host_errata_controller.rb +0 -12
  57. data/app/controllers/katello/api/v2/host_packages_controller.rb +0 -55
  58. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +1 -1
  59. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +0 -77
  60. data/app/controllers/katello/api/v2/organizations_controller.rb +2 -1
  61. data/app/controllers/katello/api/v2/products_controller.rb +4 -4
  62. data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +12 -5
  63. data/app/controllers/katello/api/v2/repositories_controller.rb +16 -17
  64. data/app/controllers/katello/api/v2/sync_controller.rb +0 -1
  65. data/app/controllers/katello/concerns/api/api_controller.rb +0 -10
  66. data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +7 -9
  67. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +1 -1
  68. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +14 -2
  69. data/app/lib/actions/katello/alternate_content_source/update.rb +1 -1
  70. data/app/lib/actions/katello/content_view/capsule_sync.rb +1 -1
  71. data/app/lib/actions/katello/content_view/incremental_updates.rb +3 -9
  72. data/app/lib/actions/katello/content_view_environment/destroy.rb +5 -3
  73. data/app/lib/actions/katello/content_view_version/destroy.rb +5 -1
  74. data/app/lib/actions/katello/content_view_version/republish_repositories.rb +8 -2
  75. data/app/lib/actions/katello/host/update_content_view.rb +4 -2
  76. data/app/lib/actions/katello/product/destroy.rb +15 -11
  77. data/app/lib/actions/katello/repository/capsule_sync.rb +1 -1
  78. data/app/lib/actions/katello/repository/destroy.rb +10 -2
  79. data/app/lib/actions/katello/repository/index_content.rb +0 -1
  80. data/app/lib/actions/katello/repository/sync.rb +1 -3
  81. data/app/lib/actions/katello/repository/update_metadata_sync.rb +1 -1
  82. data/app/lib/actions/katello/repository/verify_checksum.rb +2 -10
  83. data/app/lib/actions/pulp3/orchestration/repository/generate_metadata.rb +12 -5
  84. data/app/lib/katello/concerns/base_template_scope_extensions.rb +4 -9
  85. data/app/lib/katello/resources/cdn.rb +4 -0
  86. data/app/lib/katello/validators/alternate_content_source_products_validator.rb +1 -1
  87. data/app/models/katello/candlepin/repository_mapper.rb +1 -0
  88. data/app/models/katello/cdn_configuration.rb +4 -0
  89. data/app/models/katello/concerns/host_managed_extensions.rb +57 -4
  90. data/app/models/katello/content_view.rb +21 -3
  91. data/app/models/katello/content_view_component.rb +1 -1
  92. data/app/models/katello/content_view_version.rb +4 -0
  93. data/app/models/katello/docker_meta_tag.rb +3 -1
  94. data/app/models/katello/host/content_facet.rb +10 -8
  95. data/app/models/katello/kt_environment.rb +1 -1
  96. data/app/models/katello/ping.rb +1 -12
  97. data/app/models/katello/product_content.rb +14 -1
  98. data/app/models/katello/repository.rb +6 -1
  99. data/app/models/katello/root_repository.rb +2 -8
  100. data/app/services/katello/applicability/applicable_content_helper.rb +2 -2
  101. data/app/services/katello/registration_manager.rb +2 -12
  102. data/app/views/foreman/job_templates/configure_host_for_new_content_source.erb +25 -0
  103. data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +1 -1
  104. data/app/views/katello/api/v2/content_facet/show.json.rabl +0 -12
  105. data/app/views/katello/api/v2/content_view_components/show.json.rabl +4 -1
  106. data/app/views/katello/api/v2/content_views/base.json.rabl +6 -2
  107. data/app/views/katello/api/v2/products/show.json.rabl +3 -0
  108. data/app/views/katello/api/v2/repositories/base.json.rabl +18 -0
  109. data/app/views/katello/api/v2/repositories/show.json.rabl +0 -1
  110. data/app/views/katello/api/v2/repository_sets/show.json.rabl +2 -2
  111. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +4 -5
  112. data/app/views/overrides/activation_keys/_host_media_type_select.html.erb +11 -3
  113. data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +15 -7
  114. data/config/initializers/monkeys.rb +1 -0
  115. data/config/katello.yaml.example +0 -4
  116. data/config/routes/api/v2.rb +3 -0
  117. data/config/routes/overrides.rb +0 -11
  118. data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +1 -0
  119. data/db/migrate/20230609155411_add_custom_cdn_auth_enabled_to_katello_cdn_configurations.rb +5 -0
  120. data/db/migrate/20230710190626_remove_relative_path_limit.rb +5 -0
  121. data/db/migrate/20230717150442_change_change_content_source_job_template_name.rb +20 -0
  122. data/db/migrate/20230828143236_remove_katello_agent_dispatch_history.rb +15 -0
  123. data/db/seeds.d/111-upgrade_tasks.rb +1 -2
  124. data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -1
  125. data/engines/bastion_katello/README.md +2 -1
  126. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +4 -2
  127. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -2
  128. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html +8 -3
  129. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js +3 -44
  130. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-module-streams-modal.controller.js +0 -1
  131. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js +1 -65
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html +1 -3
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html +1 -6
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-applicable.controller.js +1 -1
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +1 -16
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +0 -1
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-actions.controller.js +0 -1
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-applicable.controller.js +2 -11
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +0 -2
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -39
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-debs-applicable.html +2 -2
  142. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +1 -4
  143. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +2 -4
  144. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +4 -6
  145. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-installed.html +1 -3
  146. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +0 -14
  147. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +1 -2
  148. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/file-content-views.controller.js +2 -1
  149. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/files/details/views/file-content-views.html +1 -1
  150. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +235 -521
  151. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details.controller.js +2 -0
  152. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +17 -4
  153. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +55 -6
  154. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +2 -2
  155. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-manage-packages.html +13 -2
  156. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +2 -2
  157. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/views/product-repositories.html +4 -1
  158. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +5 -0
  159. data/engines/bastion_katello/lib/bastion_katello/engine.rb +1 -3
  160. data/lib/katello/engine.rb +0 -18
  161. data/lib/katello/permission_creator.rb +1 -1
  162. data/lib/katello/plugin.rb +0 -25
  163. data/lib/katello/version.rb +1 -1
  164. data/lib/monkeys/remove_hidden_distribution.rb +383 -0
  165. data/locale/action_names.rb +3 -1
  166. data/locale/bn/katello.po +130 -39
  167. data/locale/bn_IN/katello.po +130 -39
  168. data/locale/ca/katello.po +130 -39
  169. data/locale/cs/katello.po +130 -39
  170. data/locale/cs_CZ/katello.po +130 -39
  171. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  172. data/locale/de/katello.po +134 -43
  173. data/locale/de_AT/katello.po +130 -39
  174. data/locale/de_DE/katello.po +130 -39
  175. data/locale/el/katello.po +130 -39
  176. data/locale/en/katello.po +130 -39
  177. data/locale/en_GB/katello.po +130 -39
  178. data/locale/en_US/katello.po +130 -39
  179. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  180. data/locale/es/katello.po +133 -42
  181. data/locale/et_EE/katello.po +130 -39
  182. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  183. data/locale/fr/katello.po +138 -47
  184. data/locale/gl/katello.po +130 -39
  185. data/locale/gu/katello.po +130 -39
  186. data/locale/he_IL/katello.po +130 -39
  187. data/locale/hi/katello.po +130 -39
  188. data/locale/id/katello.po +130 -39
  189. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  190. data/locale/it/katello.po +131 -40
  191. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  192. data/locale/ja/katello.po +138 -47
  193. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  194. data/locale/ka/katello.po +131 -40
  195. data/locale/katello.pot +805 -642
  196. data/locale/kn/katello.po +130 -39
  197. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  198. data/locale/ko/katello.po +131 -40
  199. data/locale/ml_IN/katello.po +130 -39
  200. data/locale/mr/katello.po +130 -39
  201. data/locale/nl_NL/katello.po +130 -39
  202. data/locale/or/katello.po +130 -39
  203. data/locale/pa/katello.po +130 -39
  204. data/locale/pl/katello.po +130 -39
  205. data/locale/pl_PL/katello.po +130 -39
  206. data/locale/pt/katello.po +130 -39
  207. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  208. data/locale/pt_BR/katello.po +133 -42
  209. data/locale/ro/katello.po +130 -39
  210. data/locale/ro_RO/katello.po +130 -39
  211. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  212. data/locale/ru/katello.po +131 -40
  213. data/locale/sl/katello.po +130 -39
  214. data/locale/sv_SE/katello.po +130 -39
  215. data/locale/ta/katello.po +130 -39
  216. data/locale/ta_IN/katello.po +130 -39
  217. data/locale/te/katello.po +130 -39
  218. data/locale/tr/katello.po +130 -39
  219. data/locale/vi/katello.po +130 -39
  220. data/locale/vi_VN/katello.po +130 -39
  221. data/locale/zh/katello.po +130 -39
  222. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  223. data/locale/zh_CN/katello.po +138 -47
  224. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  225. data/locale/zh_TW/katello.po +131 -40
  226. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +0 -5
  227. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/index.js +9 -3
  228. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +7 -54
  229. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/HostErrataActions.js +2 -11
  230. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesActions.js +1 -40
  231. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesConstants.js +0 -3
  232. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +5 -40
  233. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +6 -61
  234. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +5 -4
  235. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +0 -212
  236. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packageInstallModal.test.js +2 -157
  237. data/webpack/components/extensions/HostDetails/hostDetailsHelpers.js +0 -20
  238. data/webpack/containers/Application/config.js +5 -0
  239. data/webpack/scenes/ActivationKeys/Details/ActivationKeyActions.js +31 -0
  240. data/webpack/scenes/ActivationKeys/Details/ActivationKeyConstants.js +3 -0
  241. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.js +127 -0
  242. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetails.scss +37 -0
  243. data/webpack/scenes/ActivationKeys/Details/ActivationKeyDetailsSelectors.js +16 -0
  244. data/webpack/scenes/ActivationKeys/Details/__tests__/activationKeyDetails.test.js +117 -0
  245. data/webpack/scenes/ActivationKeys/Details/components/DeleteMenu.js +77 -0
  246. data/webpack/scenes/ActivationKeys/Details/components/DeleteModal.js +63 -0
  247. data/webpack/scenes/ActivationKeys/Details/components/EditModal.js +199 -0
  248. data/webpack/scenes/ActivationKeys/Details/index.js +3 -0
  249. data/webpack/scenes/AlternateContentSources/Create/Steps/AcsUrlPaths.js +1 -1
  250. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditCredentials.js +10 -5
  251. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditProducts.js +8 -3
  252. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditSmartProxies.js +8 -3
  253. data/webpack/scenes/AlternateContentSources/Details/EditModals/ACSEditURLPaths.js +1 -1
  254. data/webpack/scenes/AlternateContentSources/Details/__tests__/ACSEdits.test.js +2 -2
  255. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +1 -1
  256. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +37 -29
  257. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +53 -37
  258. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +7 -0
  259. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.fixtures.json +15 -6
  260. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +6 -5
  261. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/publishedContentViewDetails.fixtures.json +43 -197
  262. data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +1 -1
  263. data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +1 -1
  264. data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +2 -2
  265. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +1 -1
  266. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.fixtures.json +0 -98
  267. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +103 -1
  268. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersionsLatestEnvironment.fixtures.json +634 -0
  269. data/webpack/scenes/ContentViews/components/ContentViewSelect/helpers.js +1 -1
  270. data/webpack/scenes/Hosts/ChangeContentSource/actions.js +14 -12
  271. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceForm.js +45 -6
  272. data/webpack/scenes/Hosts/ChangeContentSource/components/ContentSourceTemplate.js +42 -7
  273. data/webpack/scenes/Hosts/ChangeContentSource/index.js +37 -10
  274. data/webpack/scenes/Hosts/ChangeContentSource/styles.scss +5 -0
  275. data/webpack/scenes/RedHatRepositories/__tests__/__snapshots__/RedHatRepositoriesPage.test.js.snap +0 -8
  276. data/webpack/scenes/RedHatRepositories/index.scss +1 -1
  277. data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +2 -2
  278. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +0 -8
  279. metadata +85 -80
  280. data/app/lib/actions/katello/agent/dispatch_history_presenter.rb +0 -64
  281. data/app/lib/actions/katello/agent_action.rb +0 -119
  282. data/app/lib/actions/katello/bulk_agent_action.rb +0 -34
  283. data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +0 -44
  284. data/app/lib/actions/katello/host/erratum/install.rb +0 -38
  285. data/app/lib/actions/katello/host/package/install.rb +0 -34
  286. data/app/lib/actions/katello/host/package/remove.rb +0 -48
  287. data/app/lib/actions/katello/host/package/update.rb +0 -42
  288. data/app/lib/actions/katello/host/package_group/install.rb +0 -30
  289. data/app/lib/actions/katello/host/package_group/remove.rb +0 -30
  290. data/app/lib/katello/agent/base_message.rb +0 -41
  291. data/app/lib/katello/agent/client_message_handler.rb +0 -69
  292. data/app/lib/katello/agent/connection.rb +0 -38
  293. data/app/lib/katello/agent/install_errata_message.rb +0 -25
  294. data/app/lib/katello/agent/install_package_group_message.rb +0 -25
  295. data/app/lib/katello/agent/install_package_message.rb +0 -28
  296. data/app/lib/katello/agent/remove_package_group_message.rb +0 -25
  297. data/app/lib/katello/agent/remove_package_message.rb +0 -28
  298. data/app/lib/katello/agent/update_package_message.rb +0 -33
  299. data/app/lib/katello/event_daemon/services/agent_event_receiver.rb +0 -59
  300. data/app/lib/katello/qpid/connection.rb +0 -149
  301. data/app/lib/katello/util/default_enablement_migrator.rb +0 -183
  302. data/app/models/katello/agent/dispatch_history.rb +0 -19
  303. data/app/models/katello/events/delete_host_agent_queue.rb +0 -19
  304. data/app/services/katello/agent/dispatcher.rb +0 -60
  305. data/app/views/foreman/job_templates/change_content_source.erb +0 -18
  306. data/app/views/katello/api/v2/sync/index.json.rabl +0 -1
  307. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +0 -8
  308. data/lib/katello/tasks/upgrades/4.9/update_custom_products_enablement.rake +0 -13
@@ -1,149 +0,0 @@
1
- require 'qpid_proton'
2
-
3
- module Katello
4
- module Qpid
5
- class Connection
6
- class Sender < ::Qpid::Proton::MessagingHandler
7
- def initialize(url, connection_options, address, messages)
8
- super()
9
- @url = url
10
- @connection_options = connection_options
11
- @address = address
12
- @messages = messages
13
- @sent = 0
14
- @confirmed = 0
15
- end
16
-
17
- def on_container_start(container)
18
- c = container.connect(@url, @connection_options)
19
- c.open_sender
20
- @receiver = c.open_receiver(@address) if @address
21
- end
22
-
23
- def on_sendable(sender)
24
- @messages.each do |msg|
25
- msg.reply_to = @receiver.remote_source.address if @receiver
26
- sender.send(msg)
27
- @sent += 1
28
- end
29
- ensure
30
- sender.close
31
- end
32
-
33
- def on_tracker_accept(tracker)
34
- @confirmed += 1
35
- if @confirmed == @sent
36
- tracker.connection.close
37
- end
38
- end
39
-
40
- def on_message(_delivery, message)
41
- opcode = message.properties['qmf.opcode']
42
- if opcode == '_exception'
43
- error_code = message.body.dig('_values', 'error_code')
44
- if error_code != 7 # not found
45
- error_message = message.body.dig('_values', 'error_text')
46
- fail(error_message)
47
- end
48
- end
49
- end
50
- end
51
-
52
- class Receiver < ::Qpid::Proton::MessagingHandler
53
- def initialize(url, connection_options, address, handler)
54
- super()
55
- @url = url
56
- @connection_options = connection_options.merge(
57
- idle_timeout: 30
58
- )
59
- @address = address
60
- @handler = handler
61
- end
62
-
63
- def on_container_start(container)
64
- c = container.connect(@url, @connection_options)
65
- c.open_receiver(@address)
66
- end
67
-
68
- def on_message(_delivery, message)
69
- received = Katello::Messaging::ReceivedMessage.new(body: message.body)
70
- @handler.handle(received)
71
- end
72
- end
73
-
74
- def initialize(url:, ssl_cert_file:, ssl_key_file:, ssl_ca_file:)
75
- @url = url
76
- ssl_domain = ::Qpid::Proton::SSLDomain.new(::Qpid::Proton::SSLDomain::MODE_CLIENT)
77
- ssl_domain.peer_authentication(::Qpid::Proton::SSLDomain::VERIFY_PEER_NAME)
78
- ssl_domain.credentials(ssl_cert_file, ssl_key_file, nil) if ssl_cert_file && ssl_key_file
79
- ssl_domain.trusted_ca_db(ssl_ca_file) if ssl_ca_file
80
- @connection_options = {
81
- ssl_domain: ssl_domain,
82
- sasl_allowed_mechs: 'external',
83
- virtual_host: URI.parse(url).host
84
- }
85
- end
86
-
87
- def delete_queue(queue_name)
88
- address = "qmf.default.direct"
89
- message = ::Qpid::Proton::Message.new
90
- message.subject = 'broker'
91
- message.address = address
92
- message.body = {
93
- '_object_id' => {
94
- '_object_name' => 'org.apache.qpid.broker:broker:amqp-broker'
95
- },
96
- '_method_name' => 'delete',
97
- '_arguments' => {
98
- 'strict' => true,
99
- 'name' => queue_name,
100
- 'type' => 'queue',
101
- 'properties' => {}
102
- }
103
- }
104
-
105
- message.properties = {
106
- 'qmf.opcode' => '_method_request',
107
- 'x-amqp-0-10.app-id' => 'qmf2',
108
- 'method' => 'request'
109
- }
110
-
111
- sender = Sender.new(@url, @connection_options, address, [message])
112
- with_connection(sender)
113
- end
114
-
115
- def send_messages(messages)
116
- qpid_messages = messages.map do |message|
117
- msg = ::Qpid::Proton::Message.new
118
- msg.body = message.to_s
119
- msg.address = message.recipient_address
120
- msg
121
- end
122
- sender = Sender.new(@url, @connection_options, nil, qpid_messages)
123
- with_connection(sender)
124
- end
125
-
126
- def receive_messages(address:, handler:)
127
- receiver = Receiver.new(@url, @connection_options, address, handler)
128
- with_connection(receiver)
129
- end
130
-
131
- def close
132
- @container&.stop
133
- end
134
-
135
- def open?
136
- (@container&.running || 0) > 0
137
- end
138
-
139
- private
140
-
141
- def with_connection(handler)
142
- @container = ::Qpid::Proton::Container.new(handler)
143
- @container.run
144
- ensure
145
- close
146
- end
147
- end
148
- end
149
- end
@@ -1,183 +0,0 @@
1
- module Katello
2
- module Util
3
- class DefaultEnablementMigrator # used in lib/katello/tasks/upgrades/4.9/update_custom_products_enablement.rake
4
- include ActionView::Helpers::TextHelper
5
-
6
- def execute!
7
- ds_errors = create_disabled_overrides_for_non_sca_org_hosts
8
- dsak_errors = create_disabled_overrides_for_non_sca_org_activation_keys
9
- ak_errors = create_activation_key_overrides
10
- consumer_errors = create_consumer_overrides
11
- cp_errors = update_enablement_in_candlepin
12
- kt_errors = update_enablement_in_katello
13
-
14
- total_errors = ds_errors + dsak_errors + ak_errors + consumer_errors + cp_errors + kt_errors
15
- finish_message = "Finished updating custom products enablement; #{total_errors == 0 ? "no errors" : "#{pluralize(total_errors, "error")}"}"
16
- Rails.logger.info finish_message
17
- Rails.logger.info("#{pluralize(ds_errors, "error")} updating disabled overrides for unsubscribed content; see log messages above") if ds_errors > 0
18
- Rails.logger.info("#{pluralize(dsak_errors, "error")} updating disabled overrides for unsubscribed content in activation keys; see log messages above") if dsak_errors > 0
19
- Rails.logger.info("#{pluralize(ak_errors, "error")} updating activation key overrides; see log messages above") if ak_errors > 0
20
- Rails.logger.info("#{pluralize(consumer_errors, "error")} updating consumer overrides; see log messages above") if consumer_errors > 0
21
- Rails.logger.info("#{pluralize(cp_errors, "error")} updating default enablement in Candlepin; see log messages above") if cp_errors > 0
22
- Rails.logger.info("#{pluralize(kt_errors, "error")} updating default enablement in Katello; see log messages above") if kt_errors > 0
23
- end
24
-
25
- def create_disabled_overrides_for_non_sca(consumable:)
26
- content_finder = ::Katello::ProductContentFinder.new(
27
- match_subscription: false,
28
- match_environment: false,
29
- consumable: consumable
30
- )
31
- subscribed_content_finder = ::Katello::ProductContentFinder.new(
32
- match_subscription: true,
33
- match_environment: false,
34
- consumable: consumable
35
- )
36
- unsubscribed_content = content_finder.custom_content_labels - subscribed_content_finder.custom_content_labels
37
- new_overrides = unsubscribed_content.map do |repo_label|
38
- ::Katello::ContentOverride.new(
39
- repo_label,
40
- { name: "enabled", value: "0" } # Override to disabled
41
- )
42
- end
43
- return if new_overrides.blank?
44
- if consumable.is_a? ::Katello::Host::SubscriptionFacet
45
- ::Katello::Resources::Candlepin::Consumer.update_content_overrides(
46
- consumable.uuid,
47
- new_overrides.map(&:to_entitlement_hash)
48
- )
49
- else
50
- ::Katello::Resources::Candlepin::ActivationKey.update_content_overrides(
51
- consumable.cp_id,
52
- new_overrides.map(&:to_entitlement_hash)
53
- )
54
- end
55
- end
56
-
57
- def create_disabled_overrides_for_non_sca_org_hosts
58
- errors = 0
59
- Organization.all.each do |org|
60
- next if org.simple_content_access? # subscription attachment is meaningless with SCA
61
- Rails.logger.info("Creating disabled overrides for unsubscribed content in org #{org.name}")
62
- hosts_to_update = org.hosts.joins(:subscription_facet).where.not("#{Katello::Host::SubscriptionFacet.table_name}.host_id" => nil)
63
- hosts_to_update.each do |host|
64
- create_disabled_overrides_for_non_sca(consumable: host.subscription_facet)
65
- rescue => e
66
- errors += 1
67
- Rails.logger.info("Failed to update host #{host.name}: #{e.message}")
68
- end
69
- rescue => e
70
- errors += 1
71
- Rails.logger.info("Error while creating host overrides: #{e.message}")
72
- end
73
- errors
74
- end
75
-
76
- def create_disabled_overrides_for_non_sca_org_activation_keys
77
- errors = 0
78
- Organization.all.each do |org|
79
- next if org.simple_content_access? # subscription attachment is meaningless with SCA
80
- Rails.logger.info("Creating disabled overrides for unsubscribed content in activation keys in org #{org.name}")
81
- aks_to_update = org.activation_keys
82
- aks_to_update.each do |ak|
83
- create_disabled_overrides_for_non_sca(consumable: ak)
84
- rescue => e
85
- errors += 1
86
- Rails.logger.info("Failed to update activation key #{activation key.name}: #{e.message}")
87
- end
88
- rescue => e
89
- errors += 1
90
- Rails.logger.info("Error while creating non-SCA activation key overrides: #{e.message}")
91
- end
92
- errors
93
- end
94
-
95
- def create_overrides(consumable_id:, candlepin_resource:, all_repos:)
96
- repos_with_existing_overrides = candlepin_resource.content_overrides(consumable_id).map do |override|
97
- override[:contentLabel]
98
- end
99
- new_overrides = (all_repos - repos_with_existing_overrides).map do |repo_label|
100
- ::Katello::ContentOverride.new(
101
- repo_label,
102
- { name: "enabled", value: "1" } # Override to enabled
103
- )
104
- end
105
- return if new_overrides.blank?
106
-
107
- candlepin_resource.update_content_overrides(
108
- consumable_id,
109
- new_overrides.map(&:to_entitlement_hash)
110
- )
111
- end
112
-
113
- def create_activation_key_overrides
114
- Rails.logger.info "Creating content overrides for all activation keys"
115
- ak_errors = 0
116
- cp_aks_to_update = ::Katello::Resources::Candlepin::ActivationKey.get.map { |ak| ak['id'] }
117
- Organization.all.each do |org|
118
- all_repos = ::Katello::RootRepository.custom.in_organization(org).map(&:custom_content_label) # update all custom repos
119
-
120
- org_aks_to_update = ::Katello::ActivationKey.where(organization: org, cp_id: cp_aks_to_update)
121
- org_aks_to_update.each do |ak|
122
- Rails.logger.info "Updating activation key #{ak.name}"
123
- create_overrides(consumable_id: ak.cp_id, candlepin_resource: ::Katello::Resources::Candlepin::ActivationKey, all_repos: all_repos)
124
- rescue => e
125
- ak_errors += 1
126
- Rails.logger.info("Failed to update activation key #{ak.name}: #{e.message}")
127
- end
128
- rescue => e
129
- ak_errors += 1
130
- Rails.logger.info("Error while creating activation key overrides: #{e.message}")
131
- end
132
- ak_errors
133
- end
134
-
135
- def create_consumer_overrides
136
- consumer_errors = 0
137
- Rails.logger.info "Creating content overrides for all Candlepin consumers"
138
- consumers_to_update = ::Katello::Resources::Candlepin::Consumer.all_uuids
139
- # ["Default_Organization_Custom_Custom_Repo", "Default_Organization_TestProd2_TestRepo2"]
140
- all_repos = ::Katello::RootRepository.custom.map(&:custom_content_label) # update all custom repos
141
-
142
- consumers_to_update.each do |consumer_uuid|
143
- Rails.logger.info "Updating consumer #{consumer_uuid}"
144
- create_overrides(consumable_id: consumer_uuid, candlepin_resource: ::Katello::Resources::Candlepin::Consumer, all_repos: all_repos)
145
- rescue => e
146
- consumer_errors += 1
147
- Rails.logger.info("Failed to update consumer #{consumer_uuid}: #{e.message}")
148
- end
149
- Rails.logger.info("Updated #{pluralize(consumers_to_update.count, 'consumer')} and #{pluralize(all_repos.count, 'repo')}")
150
- consumer_errors
151
- end
152
-
153
- def update_enablement_in_candlepin
154
- cp_errors = 0
155
- Rails.logger.info "Updating custom products enablement in Candlepin"
156
- ::Katello::ProductContent.custom.each do |product_content|
157
- ::Katello::Resources::Candlepin::Product.add_content(
158
- product_content.product.organization.label,
159
- product_content.product.cp_id,
160
- product_content.content.cp_content_id,
161
- ::Actions::Candlepin::Product::ContentAdd::DEFAULT_ENABLEMENT
162
- )
163
- rescue => e
164
- cp_errors += 1
165
- Rails.logger.info("Failed to update ProductContent #{product_content.id}: #{e.message}")
166
- end
167
- cp_errors
168
- end
169
-
170
- def update_enablement_in_katello
171
- kt_errors = 0
172
- Rails.logger.info "Updating custom products enablement in Katello"
173
- ::Katello::ProductContent.custom.each do |product_content|
174
- product_content.set_enabled_from_candlepin!
175
- rescue => e
176
- kt_errors += 1
177
- Rails.logger.info("Failed to update ProductContent #{product_content.id}: #{e.message}")
178
- end
179
- kt_errors
180
- end
181
- end
182
- end
183
- end
@@ -1,19 +0,0 @@
1
- module Katello
2
- module Agent
3
- class DispatchHistory < Katello::Model
4
- self.table_name = 'katello_agent_dispatch_histories'
5
-
6
- belongs_to :host, :class_name => "::Host::Managed"
7
-
8
- serialize :result, Hash
9
-
10
- def accepted?
11
- accepted_at.present?
12
- end
13
-
14
- def finished?
15
- result.present?
16
- end
17
- end
18
- end
19
- end
@@ -1,19 +0,0 @@
1
- module Katello
2
- module Events
3
- class DeleteHostAgentQueue
4
- EVENT_TYPE = 'delete_host_agent_queue'.freeze
5
-
6
- attr_accessor :metadata
7
-
8
- def initialize(_host_id)
9
- yield(self) if block_given?
10
- end
11
-
12
- def run
13
- if metadata[:queue_name]
14
- Katello::Agent::Dispatcher.delete_client_queue(queue_name: metadata[:queue_name])
15
- end
16
- end
17
- end
18
- end
19
- end
@@ -1,60 +0,0 @@
1
- module Katello
2
- module Agent
3
- class Dispatcher
4
- @supported_messages = {}
5
-
6
- def self.register_message(name, klass)
7
- @supported_messages[name] = klass
8
- end
9
-
10
- register_message(:install_package, Katello::Agent::InstallPackageMessage)
11
- register_message(:remove_package, Katello::Agent::RemovePackageMessage)
12
- register_message(:update_package, Katello::Agent::UpdatePackageMessage)
13
- register_message(:install_errata, Katello::Agent::InstallErrataMessage)
14
- register_message(:install_package_group, Katello::Agent::InstallPackageGroupMessage)
15
- register_message(:remove_package_group, Katello::Agent::RemovePackageGroupMessage)
16
-
17
- def self.dispatch(message_type, histories, args)
18
- message_class = @supported_messages[message_type]
19
- fail("Unsupported message type: #{message_type}") unless message_class
20
-
21
- messages = histories.map do |history|
22
- message = message_class.new(**args.merge(consumer_id: history.host.subscription_facet.uuid))
23
- message.dispatch_history_id = history.id
24
- message.recipient_address = settings[:client_queue_format] % history.host.subscription_facet.uuid
25
- message.reply_to = settings[:event_queue_name]
26
- message
27
- end
28
-
29
- connection = Connection.new
30
- connection.send_messages(messages)
31
-
32
- histories
33
- end
34
-
35
- def self.create_histories(host_ids:)
36
- histories = host_ids.map do |id|
37
- Katello::Agent::DispatchHistory.new(host_id: id)
38
- end
39
-
40
- Katello::Agent::DispatchHistory.import(histories)
41
-
42
- histories
43
- end
44
-
45
- def self.delete_client_queue(queue_name:)
46
- connection = Connection.new
47
- connection.delete_client_queue(queue_name)
48
- end
49
-
50
- def self.host_queue_name(host)
51
- uuid = host.content_facet.uuid
52
- settings[:client_queue_format] % uuid
53
- end
54
-
55
- def self.settings
56
- SETTINGS[:katello][:agent]
57
- end
58
- end
59
- end
60
- end
@@ -1,18 +0,0 @@
1
- <%#
2
- kind: job_template
3
- name: Change content source
4
- job_category: Katello
5
- model: JobTemplate
6
- provider_type: script
7
- description_format: Configure subscription manager to new content source
8
- feature: katello_change_content_source
9
- %>
10
- #!/bin/sh
11
-
12
- <%= change_content_source(@host, foreman_server_ca_cert) %>
13
-
14
- if [ -f /etc/yggdrasil/config.toml ]; then
15
- cp /etc/yggdrasil/config.toml /etc/yggdrasil/config.toml.bak
16
- export YGGDRASIL_RESTART_DELAY=10
17
- <%= snippet 'remote_execution_pull_setup' %>
18
- fi
@@ -1 +0,0 @@
1
- extends 'katello/api/v2/common/async'
@@ -1,8 +0,0 @@
1
- <section>
2
- <p bst-alert="warning" >
3
- <span translate>
4
- Katello-agent is deprecated and will be removed in a future release.
5
- </span>
6
- </p>
7
- </section>
8
-
@@ -1,13 +0,0 @@
1
- namespace :katello do
2
- namespace :upgrades do
3
- namespace '4.9' do
4
- desc "Update custom products enablement"
5
- task :update_custom_products_enablement => ['environment'] do
6
- if ::Katello::ProductContent.custom.where(enabled: true).exists?
7
- migrator = Katello::Util::DefaultEnablementMigrator.new
8
- migrator.execute!
9
- end
10
- end
11
- end
12
- end
13
- end