katello 4.11.1 → 4.12.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 (349) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/common/katello.global.js +1 -1
  3. data/app/assets/javascripts/katello/locale/bn/katello.js +76 -85
  4. data/app/assets/javascripts/katello/locale/bn_IN/katello.js +76 -85
  5. data/app/assets/javascripts/katello/locale/ca/katello.js +80 -86
  6. data/app/assets/javascripts/katello/locale/cs/katello.js +79 -85
  7. data/app/assets/javascripts/katello/locale/cs_CZ/katello.js +91 -88
  8. data/app/assets/javascripts/katello/locale/de/katello.js +97 -94
  9. data/app/assets/javascripts/katello/locale/de_AT/katello.js +76 -85
  10. data/app/assets/javascripts/katello/locale/de_DE/katello.js +76 -85
  11. data/app/assets/javascripts/katello/locale/el/katello.js +86 -86
  12. data/app/assets/javascripts/katello/locale/en/katello.js +76 -85
  13. data/app/assets/javascripts/katello/locale/en_GB/katello.js +88 -85
  14. data/app/assets/javascripts/katello/locale/en_US/katello.js +76 -85
  15. data/app/assets/javascripts/katello/locale/es/katello.js +94 -94
  16. data/app/assets/javascripts/katello/locale/et_EE/katello.js +76 -85
  17. data/app/assets/javascripts/katello/locale/fr/katello.js +97 -94
  18. data/app/assets/javascripts/katello/locale/gl/katello.js +80 -86
  19. data/app/assets/javascripts/katello/locale/gu/katello.js +76 -85
  20. data/app/assets/javascripts/katello/locale/he_IL/katello.js +76 -85
  21. data/app/assets/javascripts/katello/locale/hi/katello.js +76 -85
  22. data/app/assets/javascripts/katello/locale/id/katello.js +76 -85
  23. data/app/assets/javascripts/katello/locale/it/katello.js +89 -86
  24. data/app/assets/javascripts/katello/locale/ja/katello.js +97 -94
  25. data/app/assets/javascripts/katello/locale/ka/katello.js +92 -92
  26. data/app/assets/javascripts/katello/locale/kn/katello.js +76 -85
  27. data/app/assets/javascripts/katello/locale/ko/katello.js +91 -94
  28. data/app/assets/javascripts/katello/locale/locale/katello.js +1051 -1048
  29. data/app/assets/javascripts/katello/locale/ml_IN/katello.js +76 -85
  30. data/app/assets/javascripts/katello/locale/mr/katello.js +76 -85
  31. data/app/assets/javascripts/katello/locale/nl_NL/katello.js +76 -85
  32. data/app/assets/javascripts/katello/locale/or/katello.js +76 -85
  33. data/app/assets/javascripts/katello/locale/pa/katello.js +76 -85
  34. data/app/assets/javascripts/katello/locale/pl/katello.js +76 -85
  35. data/app/assets/javascripts/katello/locale/pl_PL/katello.js +76 -85
  36. data/app/assets/javascripts/katello/locale/pt/katello.js +76 -85
  37. data/app/assets/javascripts/katello/locale/pt_BR/katello.js +94 -94
  38. data/app/assets/javascripts/katello/locale/ro/katello.js +76 -85
  39. data/app/assets/javascripts/katello/locale/ro_RO/katello.js +76 -85
  40. data/app/assets/javascripts/katello/locale/ru/katello.js +91 -94
  41. data/app/assets/javascripts/katello/locale/sl/katello.js +76 -85
  42. data/app/assets/javascripts/katello/locale/sv_SE/katello.js +80 -86
  43. data/app/assets/javascripts/katello/locale/ta/katello.js +76 -85
  44. data/app/assets/javascripts/katello/locale/ta_IN/katello.js +76 -85
  45. data/app/assets/javascripts/katello/locale/te/katello.js +76 -85
  46. data/app/assets/javascripts/katello/locale/tr/katello.js +76 -85
  47. data/app/assets/javascripts/katello/locale/vi/katello.js +76 -85
  48. data/app/assets/javascripts/katello/locale/vi_VN/katello.js +76 -85
  49. data/app/assets/javascripts/katello/locale/zh/katello.js +76 -85
  50. data/app/assets/javascripts/katello/locale/zh_CN/katello.js +97 -94
  51. data/app/assets/javascripts/katello/locale/zh_TW/katello.js +91 -94
  52. data/app/assets/javascripts/katello/sync_management/index.js +0 -1
  53. data/app/assets/javascripts/katello/sync_management/sync_management.js +365 -308
  54. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +1 -0
  55. data/app/controllers/katello/api/v2/debs_controller.rb +4 -0
  56. data/app/controllers/katello/api/v2/host_debs_controller.rb +13 -1
  57. data/app/controllers/katello/api/v2/organizations_controller.rb +1 -3
  58. data/app/controllers/katello/api/v2/repositories_controller.rb +2 -8
  59. data/app/controllers/katello/concerns/api/v2/registration_commands_controller_extensions.rb +0 -1
  60. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +7 -3
  61. data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -17
  62. data/app/helpers/katello/concerns/dashboard_helper_extensions.rb +0 -20
  63. data/app/lib/actions/katello/content_view/publish.rb +3 -3
  64. data/app/lib/actions/katello/content_view_version/auto_create_products.rb +4 -4
  65. data/app/lib/actions/katello/content_view_version/auto_create_redhat_repositories.rb +5 -5
  66. data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +5 -5
  67. data/app/lib/actions/katello/content_view_version/import.rb +14 -13
  68. data/app/lib/actions/katello/content_view_version/import_library.rb +4 -4
  69. data/app/lib/actions/katello/content_view_version/import_repository.rb +3 -3
  70. data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +2 -2
  71. data/app/lib/actions/katello/host/hypervisors_update.rb +0 -1
  72. data/app/lib/actions/katello/organization/manifest_delete.rb +1 -1
  73. data/app/lib/actions/katello/organization/manifest_refresh.rb +16 -16
  74. data/app/lib/actions/katello/repository/sync.rb +2 -4
  75. data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +20 -15
  76. data/app/lib/actions/pulp3/orchestration/content_view_version/export_library.rb +17 -14
  77. data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +11 -11
  78. data/app/lib/actions/pulp3/orchestration/repository/upload_content.rb +18 -13
  79. data/app/lib/actions/pulp3/repository/import_upload.rb +13 -5
  80. data/app/lib/actions/pulp3/repository/save_artifact.rb +23 -12
  81. data/app/lib/katello/api/v2/error_handling.rb +1 -1
  82. data/app/lib/katello/lazy_accessor.rb +6 -6
  83. data/app/lib/katello/resources/candlepin/owner.rb +2 -2
  84. data/app/mailers/katello/errata_mailer.rb +3 -3
  85. data/app/models/katello/concerns/host_managed_extensions.rb +29 -76
  86. data/app/models/katello/concerns/hostgroup_extensions.rb +4 -2
  87. data/app/models/katello/concerns/organization_extensions.rb +1 -1
  88. data/app/models/katello/concerns/pulp_database_unit.rb +1 -1
  89. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +0 -27
  90. data/app/models/katello/content_view.rb +11 -6
  91. data/app/models/katello/content_view_version.rb +2 -0
  92. data/app/models/katello/deb.rb +8 -0
  93. data/app/models/katello/host/content_facet.rb +19 -14
  94. data/app/models/katello/host/subscription_facet.rb +0 -19
  95. data/app/models/katello/host_tracer.rb +9 -5
  96. data/app/models/katello/installed_deb.rb +1 -0
  97. data/app/models/katello/repository.rb +3 -2
  98. data/app/models/katello/trace_status.rb +6 -2
  99. data/app/overrides/add_organization_attributes.rb +0 -18
  100. data/app/presenters/katello/host_deb_presenter.rb +23 -0
  101. data/app/services/katello/candlepin/consumer.rb +0 -4
  102. data/app/services/katello/candlepin/event_handler.rb +6 -25
  103. data/app/services/katello/candlepin/message_handler.rb +1 -21
  104. data/app/services/katello/host/profiles_uploader.rb +17 -6
  105. data/app/services/katello/host_status_manager.rb +0 -22
  106. data/app/services/katello/organization_creator.rb +2 -2
  107. data/app/services/katello/pulp3/api/apt.rb +1 -1
  108. data/app/services/katello/pulp3/content_view_version/export.rb +2 -2
  109. data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +1 -0
  110. data/app/services/katello/pulp3/content_view_version/metadata_map.rb +3 -0
  111. data/app/services/katello/pulp3/repository/apt.rb +16 -6
  112. data/app/services/katello/registration_manager.rb +1 -13
  113. data/app/views/katello/api/v2/host_debs/base.json.rabl +2 -0
  114. data/app/views/katello/api/v2/hosts/base.json.rabl +9 -0
  115. data/app/views/katello/api/v2/subscription_facet/base_with_root.json.rabl +0 -3
  116. data/app/views/katello/api/v2/subscription_facet/show.json.rabl +3 -0
  117. data/app/views/katello/sync_management/index.html.erb +14 -13
  118. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +20 -16
  119. data/app/views/overrides/activation_keys/_host_synced_content_select.html.erb +6 -4
  120. data/app/views/overrides/organizations/_edit_override.html.erb +0 -12
  121. data/db/migrate/20131014225132_add_users_fields.rb +0 -1
  122. data/db/migrate/20150603045418_remove_user_fields.rb +0 -2
  123. data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +4 -22
  124. data/db/migrate/20160505181337_rename_katello_settings.rb +2 -2
  125. data/db/migrate/20200818192230_update_system_purpose_status.rb +9 -3
  126. data/db/migrate/20240111032511_add_index_to_host_installed_packages.rb +16 -0
  127. data/db/migrate/20240123120109_remove_pulp_export_destination_setting.rb +9 -0
  128. data/db/migrate/20240207191223_remove_entitlement_mode_host_statuses.rb +30 -0
  129. data/db/seeds.d/111-upgrade_tasks.rb +2 -1
  130. data/engines/bastion/app/assets/javascripts/bastion/bastion.js +0 -2
  131. data/engines/bastion/app/views/bastion/layouts/assets.html.erb +6 -2
  132. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +0 -4
  133. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +0 -1
  134. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +45 -29
  135. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +0 -10
  136. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +0 -1
  137. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +2 -21
  138. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +0 -5
  139. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +0 -7
  140. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +5 -5
  141. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +9 -1
  142. data/engines/bastion_katello/lib/bastion_katello/engine.rb +0 -6
  143. data/lib/katello/engine.rb +0 -3
  144. data/lib/katello/plugin.rb +2 -11
  145. data/lib/katello/tasks/rubocop.rake +0 -9
  146. data/lib/katello/tasks/unify_hosts.rake +0 -1
  147. data/lib/katello/tasks/upgrades/4.12/update_content_access_modes.rake +35 -0
  148. data/lib/katello/version.rb +1 -1
  149. data/locale/action_names.rb +12 -6
  150. data/locale/bn/katello.po +19 -28
  151. data/locale/bn/katello.po.time_stamp +0 -0
  152. data/locale/bn/katello.pox +0 -0
  153. data/locale/bn_IN/katello.po +19 -28
  154. data/locale/bn_IN/katello.po.time_stamp +0 -0
  155. data/locale/ca/LC_MESSAGES/katello.mo +0 -0
  156. data/locale/ca/katello.po +20 -29
  157. data/locale/ca/katello.po.time_stamp +0 -0
  158. data/locale/cs/katello.po +19 -29
  159. data/locale/cs/katello.po.time_stamp +0 -0
  160. data/locale/cs_CZ/LC_MESSAGES/katello.mo +0 -0
  161. data/locale/cs_CZ/katello.po +20 -29
  162. data/locale/cs_CZ/katello.po.time_stamp +0 -0
  163. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  164. data/locale/de/katello.po +20 -29
  165. data/locale/de/katello.po.time_stamp +0 -0
  166. data/locale/de_AT/katello.po +19 -28
  167. data/locale/de_AT/katello.po.time_stamp +0 -0
  168. data/locale/de_DE/katello.po +19 -28
  169. data/locale/de_DE/katello.po.time_stamp +0 -0
  170. data/locale/el/LC_MESSAGES/katello.mo +0 -0
  171. data/locale/el/katello.po +20 -29
  172. data/locale/el/katello.po.time_stamp +0 -0
  173. data/locale/en/katello.po +19 -28
  174. data/locale/en/katello.po.time_stamp +0 -0
  175. data/locale/en_GB/LC_MESSAGES/katello.mo +0 -0
  176. data/locale/en_GB/katello.po +19 -28
  177. data/locale/en_GB/katello.po.time_stamp +0 -0
  178. data/locale/en_US/katello.po +19 -28
  179. data/locale/en_US/katello.po.time_stamp +0 -0
  180. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  181. data/locale/es/katello.po +20 -29
  182. data/locale/es/katello.po.time_stamp +0 -0
  183. data/locale/et_EE/katello.po +19 -28
  184. data/locale/et_EE/katello.po.time_stamp +0 -0
  185. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  186. data/locale/fr/katello.po +20 -29
  187. data/locale/fr/katello.po.time_stamp +0 -0
  188. data/locale/gl/LC_MESSAGES/katello.mo +0 -0
  189. data/locale/gl/katello.po +20 -29
  190. data/locale/gl/katello.po.time_stamp +0 -0
  191. data/locale/gu/katello.po +19 -28
  192. data/locale/gu/katello.po.time_stamp +0 -0
  193. data/locale/he_IL/katello.po +19 -28
  194. data/locale/he_IL/katello.po.time_stamp +0 -0
  195. data/locale/hi/katello.po +19 -28
  196. data/locale/hi/katello.po.time_stamp +0 -0
  197. data/locale/id/katello.po +19 -28
  198. data/locale/id/katello.po.time_stamp +0 -0
  199. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  200. data/locale/it/katello.po +20 -29
  201. data/locale/it/katello.po.time_stamp +0 -0
  202. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  203. data/locale/ja/katello.po +20 -29
  204. data/locale/ja/katello.po.time_stamp +0 -0
  205. data/locale/ka/LC_MESSAGES/katello.mo +0 -0
  206. data/locale/ka/katello.po +20 -29
  207. data/locale/ka/katello.po.time_stamp +0 -0
  208. data/locale/katello.pot +363 -348
  209. data/locale/kn/katello.po +19 -28
  210. data/locale/kn/katello.po.time_stamp +0 -0
  211. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  212. data/locale/ko/katello.po +20 -29
  213. data/locale/ko/katello.po.time_stamp +0 -0
  214. data/locale/messages.mo +0 -0
  215. data/locale/ml_IN/katello.po +19 -28
  216. data/locale/ml_IN/katello.po.time_stamp +0 -0
  217. data/locale/mr/katello.po +19 -28
  218. data/locale/mr/katello.po.time_stamp +0 -0
  219. data/locale/nl_NL/katello.po +19 -28
  220. data/locale/nl_NL/katello.po.time_stamp +0 -0
  221. data/locale/or/katello.po +19 -28
  222. data/locale/or/katello.po.time_stamp +0 -0
  223. data/locale/pa/katello.po +19 -28
  224. data/locale/pa/katello.po.time_stamp +0 -0
  225. data/locale/pl/katello.po +19 -28
  226. data/locale/pl/katello.po.time_stamp +0 -0
  227. data/locale/pl_PL/katello.po +19 -28
  228. data/locale/pl_PL/katello.po.time_stamp +0 -0
  229. data/locale/pt/katello.po +19 -28
  230. data/locale/pt/katello.po.time_stamp +0 -0
  231. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  232. data/locale/pt_BR/katello.po +20 -29
  233. data/locale/pt_BR/katello.po.time_stamp +0 -0
  234. data/locale/ro/katello.po +19 -28
  235. data/locale/ro/katello.po.time_stamp +0 -0
  236. data/locale/ro_RO/katello.po +19 -28
  237. data/locale/ro_RO/katello.po.time_stamp +0 -0
  238. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  239. data/locale/ru/katello.po +20 -29
  240. data/locale/ru/katello.po.time_stamp +0 -0
  241. data/locale/sl/katello.po +19 -28
  242. data/locale/sl/katello.po.time_stamp +0 -0
  243. data/locale/sv_SE/LC_MESSAGES/katello.mo +0 -0
  244. data/locale/sv_SE/katello.po +20 -29
  245. data/locale/sv_SE/katello.po.time_stamp +0 -0
  246. data/locale/ta/katello.po +19 -28
  247. data/locale/ta/katello.po.time_stamp +0 -0
  248. data/locale/ta_IN/katello.po +19 -28
  249. data/locale/ta_IN/katello.po.time_stamp +0 -0
  250. data/locale/te/katello.po +19 -28
  251. data/locale/te/katello.po.time_stamp +0 -0
  252. data/locale/tr/katello.po +19 -28
  253. data/locale/tr/katello.po.time_stamp +0 -0
  254. data/locale/vi/katello.po +19 -28
  255. data/locale/vi/katello.po.time_stamp +0 -0
  256. data/locale/vi_VN/katello.po +19 -28
  257. data/locale/vi_VN/katello.po.time_stamp +0 -0
  258. data/locale/zh/katello.po +19 -28
  259. data/locale/zh/katello.po.time_stamp +0 -0
  260. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  261. data/locale/zh_CN/katello.po +20 -29
  262. data/locale/zh_CN/katello.po.time_stamp +0 -0
  263. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  264. data/locale/zh_TW/katello.po +20 -29
  265. data/locale/zh_TW/katello.po.time_stamp +0 -0
  266. data/package.json +0 -1
  267. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/SecondaryTabsRoutes.js +4 -0
  268. data/webpack/components/extensions/HostDetails/Tabs/ContentTab/constants.js +4 -1
  269. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebInstallModal.js +250 -0
  270. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebInstallModal.scss +3 -0
  271. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.js +585 -0
  272. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/DebsTab.scss +12 -0
  273. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/HostDebsActions.js +13 -0
  274. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/HostDebsConstants.js +13 -0
  275. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/HostDebsSelectors.js +16 -0
  276. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/InstallableDebsActions.js +17 -0
  277. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/InstallableDebsConstants.js +3 -0
  278. data/webpack/components/extensions/HostDetails/Tabs/DebsTab/InstallableDebsSelectors.js +16 -0
  279. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +1 -8
  280. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +2 -0
  281. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +4 -18
  282. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +13 -5
  283. data/webpack/components/extensions/HostDetails/Tabs/__tests__/debs.fixtures.json +31 -0
  284. data/webpack/components/extensions/HostDetails/Tabs/__tests__/debsInstallModal.test.js +226 -0
  285. data/webpack/components/extensions/HostDetails/Tabs/__tests__/debsTab.test.js +420 -0
  286. data/webpack/components/extensions/HostDetails/Tabs/__tests__/installableDebs.fixtures.json +63 -0
  287. data/webpack/components/extensions/HostDetails/Tabs/__tests__/traces.fixtures.json +11 -1
  288. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +63 -3
  289. data/webpack/scenes/ContentViews/ContentViewsConstants.js +3 -0
  290. data/webpack/scenes/ContentViews/Delete/__tests__/affectedHosts.fixtures.json +0 -13
  291. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +23 -1
  292. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +19 -1
  293. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/hosts.fixtures.json +0 -13
  294. data/webpack/scenes/ContentViews/Details/Versions/Compare/CVVersionCompareConfig.js +37 -3
  295. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersionContent.js +10 -2
  296. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvAffectedHosts.fixture.json +0 -13
  297. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +31 -5
  298. data/webpack/scenes/Organizations/OrganizationSelectors.js +0 -3
  299. data/webpack/scenes/Subscriptions/Manifest/index.js +1 -4
  300. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +3 -25
  301. data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +0 -3
  302. data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +0 -3
  303. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsPage.test.js.snap +0 -22
  304. data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +0 -3
  305. data/webpack/scenes/Subscriptions/index.js +1 -2
  306. metadata +93 -190
  307. data/app/controllers/katello/concerns/content_facet_hosts_controller_extensions.rb +0 -22
  308. data/app/models/katello/concerns/widget_extensions.rb +0 -23
  309. data/app/models/katello/purpose_addons_status.rb +0 -28
  310. data/app/models/katello/purpose_role_status.rb +0 -28
  311. data/app/models/katello/purpose_sla_status.rb +0 -28
  312. data/app/models/katello/purpose_status.rb +0 -71
  313. data/app/models/katello/purpose_usage_status.rb +0 -28
  314. data/app/models/katello/subscription_status.rb +0 -71
  315. data/app/services/katello/candlepin/system_purpose.rb +0 -49
  316. data/app/views/dashboard/_subscription_status_widget.html.erb +0 -37
  317. data/app/views/dashboard/_subscription_widget.html.erb +0 -85
  318. data/app/views/overrides/organizations/_index_header_override.html.erb +0 -3
  319. data/app/views/overrides/organizations/_index_row_override.html.erb +0 -3
  320. data/app/views/overrides/organizations/_step_1_override.html.erb +0 -10
  321. data/config/locales/README +0 -10
  322. data/config/locales/bn.yml +0 -182
  323. data/config/locales/compare_upstream.sh +0 -21
  324. data/config/locales/cs.yml +0 -211
  325. data/config/locales/de.yml +0 -203
  326. data/config/locales/en.yml +0 -205
  327. data/config/locales/es.yml +0 -199
  328. data/config/locales/fr.yml +0 -222
  329. data/config/locales/gu.yml +0 -181
  330. data/config/locales/hi.yml +0 -199
  331. data/config/locales/it.yml +0 -205
  332. data/config/locales/ja.yml +0 -197
  333. data/config/locales/kn.yml +0 -199
  334. data/config/locales/ko.yml +0 -197
  335. data/config/locales/mr.yml +0 -178
  336. data/config/locales/or.yml +0 -181
  337. data/config/locales/pa.yml +0 -181
  338. data/config/locales/pt-BR.yml +0 -207
  339. data/config/locales/pt.yml +0 -207
  340. data/config/locales/ru.yml +0 -257
  341. data/config/locales/ta.yml +0 -181
  342. data/config/locales/te.yml +0 -181
  343. data/config/locales/update.sh +0 -14
  344. data/config/locales/zh-CN.yml +0 -199
  345. data/config/locales/zh-TW.yml +0 -199
  346. data/engines/bastion/app/assets/javascripts/bastion/bastion-bootstrap.js +0 -17
  347. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/content-access-mode-banner.directive.js +0 -22
  348. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +0 -10
  349. data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +0 -96
@@ -49,7 +49,6 @@ module Katello
49
49
  end
50
50
 
51
51
  def import_database_attributes(consumer_params = candlepin_consumer.consumer_attributes)
52
- update_subscription_status(consumer_params[:entitlementStatus]) unless consumer_params[:entitlementStatus].blank?
53
52
  update_hypervisor(consumer_params)
54
53
  update_guests(consumer_params)
55
54
 
@@ -182,24 +181,6 @@ module Katello
182
181
  param
183
182
  end
184
183
 
185
- def update_subscription_status(status_override = nil)
186
- update_status(::Katello::SubscriptionStatus, status_override: status_override)
187
-
188
- host.refresh_global_status!
189
- end
190
-
191
- def update_purpose_status(sla_status: nil, role_status: nil, usage_status: nil, addons_status: nil, purpose_status: nil)
192
- # if this method is ever called such that we aren't sending the status params, we should pass along the candlepin_consumer
193
- # in order to reduce HTTP requests into candlepin for each Status
194
- update_status(::Katello::PurposeSlaStatus, status_override: sla_status)
195
- update_status(::Katello::PurposeRoleStatus, status_override: role_status)
196
- update_status(::Katello::PurposeUsageStatus, status_override: usage_status)
197
- update_status(::Katello::PurposeAddonsStatus, status_override: addons_status)
198
- update_status(::Katello::PurposeStatus, status_override: purpose_status)
199
-
200
- host.refresh_global_status!
201
- end
202
-
203
184
  def self.override_dmi_uuid?(host_uuid)
204
185
  Setting[:host_dmi_uuid_duplicates].include?(host_uuid)
205
186
  end
@@ -2,10 +2,14 @@ module Katello
2
2
  class HostTracer < Katello::Model
3
3
  include Katello::Authorization::HostTracer
4
4
 
5
+ TRACE_APP_TYPE_STATIC = 'static'.freeze
6
+ TRACE_APP_TYPE_SESSION = 'session'.freeze
7
+ TRACE_APP_TYPE_DAEMON = 'daemon'.freeze
8
+
5
9
  belongs_to :host, :inverse_of => :host_traces, :class_name => '::Host::Managed'
6
10
 
7
- scope :reboot_required, -> { where(app_type: 'static') }
8
- scope :selectable, -> { where.not(app_type: 'session') }
11
+ scope :reboot_required, -> { where(app_type: TRACE_APP_TYPE_STATIC) }
12
+ scope :selectable, -> { where.not(app_type: TRACE_APP_TYPE_SESSION) }
9
13
 
10
14
  validates :application, :length => {:maximum => 255}, :presence => true
11
15
  validates :app_type, :length => {:maximum => 255}, :presence => true
@@ -16,14 +20,14 @@ module Katello
16
20
  scoped_search :on => :helper, :complete_value => true
17
21
 
18
22
  def reboot_required?
19
- self.app_type == 'static'
23
+ self.app_type == TRACE_APP_TYPE_STATIC
20
24
  end
21
25
 
22
26
  def restart_command
23
27
  case self.app_type
24
- when 'static'
28
+ when TRACE_APP_TYPE_STATIC
25
29
  'reboot'
26
- when 'session'
30
+ when TRACE_APP_TYPE_SESSION
27
31
  nil
28
32
  else
29
33
  self.helper
@@ -3,6 +3,7 @@ module Katello
3
3
  has_many :host_installed_debs, :class_name => "Katello::HostInstalledDeb", :dependent => :destroy, :inverse_of => :installed_deb
4
4
  has_many :hosts, :through => :host_installed_debs, :class_name => "::Host"
5
5
 
6
+ scoped_search :on => :id, :complete_value => true
6
7
  scoped_search :on => :name, :complete_value => true
7
8
  scoped_search :on => :version
8
9
  scoped_search :on => :architecture
@@ -30,7 +30,7 @@ module Katello
30
30
  ANSIBLE_COLLECTION_TYPE = 'ansible_collection'.freeze
31
31
  GENERIC_TYPE = 'generic'.freeze
32
32
 
33
- EXPORTABLE_TYPES = [YUM_TYPE, FILE_TYPE, ANSIBLE_COLLECTION_TYPE, DOCKER_TYPE].freeze
33
+ EXPORTABLE_TYPES = [YUM_TYPE, FILE_TYPE, ANSIBLE_COLLECTION_TYPE, DOCKER_TYPE, DEB_TYPE].freeze
34
34
 
35
35
  define_model_callbacks :sync, :only => :after
36
36
 
@@ -752,7 +752,8 @@ module Katello
752
752
  return true
753
753
  else
754
754
  errors.add(:base, _("Repository cannot be deleted since it has already been included in a published Content View. " \
755
- "Please delete all Content View versions containing this repository before attempting to delete it."))
755
+ "Please delete all Content View versions containing this repository before attempting to delete it "\
756
+ "or use --remove-from-content-view-versions flag to automatically remove the repository from all published versions."))
756
757
 
757
758
  return false
758
759
  end
@@ -4,6 +4,7 @@ module Katello
4
4
  REQUIRE_PROCESS_RESTART = 1
5
5
  UP_TO_DATE = 0
6
6
  UNKNOWN = -1
7
+
7
8
  def self.status_name
8
9
  N_("Traces")
9
10
  end
@@ -35,9 +36,12 @@ module Katello
35
36
  end
36
37
 
37
38
  def to_status(_options = {})
38
- if host.host_traces.reboot_required.any?
39
+ traces = host.host_traces.pluck(:app_type)
40
+ traces.delete(Katello::HostTracer::TRACE_APP_TYPE_SESSION)
41
+
42
+ if traces.include?(Katello::HostTracer::TRACE_APP_TYPE_STATIC)
39
43
  REQUIRE_REBOOT
40
- elsif host.host_traces.where.not(:app_type => "session").any?
44
+ elsif !traces.empty?
41
45
  REQUIRE_PROCESS_RESTART
42
46
  else
43
47
  UP_TO_DATE
@@ -11,26 +11,8 @@ Deface::Override.new(:virtual_path => "taxonomies/_form",
11
11
  :text => '<% if taxonomy.is_a?(Location) %><%= render_original %><% end %>'
12
12
  )
13
13
 
14
- # Add organization attributes to org creation
15
- Deface::Override.new(:virtual_path => "taxonomies/_step1",
16
- :name => "add_organization_attributes_on_create",
17
- :insert_after => 'erb[loud]:contains("text_f"):contains(":name")',
18
- :partial => 'overrides/organizations/step_1_override')
19
-
20
14
  # Add organization attributes to org edit
21
15
  Deface::Override.new(:virtual_path => "taxonomies/_form",
22
16
  :name => "add_organization_attributes_on_edit",
23
17
  :insert_after => 'erb[loud]:contains("text_f"):contains(":name")',
24
18
  :partial => 'overrides/organizations/edit_override')
25
-
26
- # Add Simple Content Access column to org table
27
- Deface::Override.new(:virtual_path => "taxonomies/index",
28
- :name => "add_sca_column_on_index",
29
- :insert_before => 'table th:last-child', # make it the second-to-last column
30
- :partial => 'overrides/organizations/index_header_override')
31
-
32
- # Add Simple Content Access cells to org table
33
- Deface::Override.new(:virtual_path => "taxonomies/index",
34
- :name => "add_sca_attributes_on_index",
35
- :insert_before => 'tbody td:last-child',
36
- :partial => 'overrides/organizations/index_row_override')
@@ -0,0 +1,23 @@
1
+ module Katello
2
+ class HostDebPresenter < SimpleDelegator
3
+ attr_accessor :installed_package, :upgradable_versions, :deb_id
4
+
5
+ def initialize(installed_package, upgradable_versions, deb_id)
6
+ @installed_package = installed_package
7
+ @upgradable_versions = upgradable_versions
8
+ @deb_id = deb_id
9
+ super(@installed_package)
10
+ end
11
+
12
+ def self.with_latest(packages, host)
13
+ upgradable_packages_map = ::Katello::Deb.installable_for_hosts([host]).select(:id, :name, :architecture, :version).order(version: :desc).group_by { |i| [i.name, i.architecture] }
14
+ installed_packages_map = ::Katello::Deb.where(version: packages.map(&:version)).select(:id, :architecture, :name).group_by { |i| [i.name, i.architecture] }
15
+
16
+ packages.map do |p|
17
+ upgrades = upgradable_packages_map[[p.name, p.architecture]]&.pluck(:version)
18
+ installed = installed_packages_map[[p.name, p.architecture]]&.first&.id
19
+ HostDebPresenter.new(p, upgrades, installed)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -118,10 +118,6 @@ module Katello
118
118
  self.class.friendly_compliance_reasons(Resources::Candlepin::Consumer.compliance(uuid)['reasons'])
119
119
  end
120
120
 
121
- def system_purpose
122
- @system_purpose ||= Katello::Candlepin::SystemPurpose.new(purpose_compliance)
123
- end
124
-
125
121
  def entitlements?
126
122
  # use cahced consumer_attributes if possible
127
123
  count = @consumer_attributes.try(:[], 'entitlementCount')
@@ -26,9 +26,9 @@ module Katello
26
26
  when /pool\.deleted/
27
27
  message_handler.delete_pool
28
28
  when /^compliance\.created/
29
- reindex_subscription_status
29
+ event_no_longer_handled
30
30
  when /system_purpose_compliance\.created/
31
- reindex_purpose_status
31
+ event_no_longer_handled
32
32
  when /owner_content_access_mode\.modified/
33
33
  message_handler.handle_content_access_mode_modified
34
34
  end
@@ -37,31 +37,12 @@ module Katello
37
37
 
38
38
  private
39
39
 
40
- def subscription_facet
41
- message_handler.subscription_facet
40
+ def event_no_longer_handled
41
+ @logger.error "Received #{message_handler.subject} event from Candlepin. Handling of this event is no longer supported."
42
42
  end
43
43
 
44
- def reindex_subscription_status
45
- if message_handler.status.nil?
46
- @logger.debug "skip re-indexing of empty #{message_handler.subject} status #{message_handler.consumer_uuid}"
47
- return
48
- end
49
-
50
- reindex_consumer do
51
- subscription_facet.update_subscription_status(message_handler.status)
52
- subscription_facet.update_compliance_reasons(message_handler.reasons)
53
- end
54
- end
55
-
56
- def reindex_purpose_status
57
- reindex_consumer do
58
- return if subscription_facet.host.organization.simple_content_access?
59
- subscription_facet.update_purpose_status(role_status: message_handler.system_purpose.role_status,
60
- usage_status: message_handler.system_purpose.usage_status,
61
- addons_status: message_handler.system_purpose.addons_status,
62
- sla_status: message_handler.system_purpose.sla_status,
63
- purpose_status: message_handler.system_purpose.overall_status)
64
- end
44
+ def subscription_facet
45
+ message_handler.subscription_facet
65
46
  end
66
47
 
67
48
  def reindex_consumer
@@ -42,13 +42,6 @@ module Katello
42
42
  content['consumerUuid']
43
43
  end
44
44
 
45
- def system_purpose
46
- if subject == 'system_purpose_compliance.created' && @system_purpose.nil?
47
- @system_purpose = Katello::Candlepin::SystemPurpose.new(event_data)
48
- end
49
- @system_purpose
50
- end
51
-
52
45
  def pool_id
53
46
  if subject == 'pool.created' || subject == 'pool.deleted'
54
47
  content['entityId']
@@ -105,21 +98,8 @@ module Katello
105
98
  end
106
99
 
107
100
  org = ::Organization.find_by!(label: owner['key'])
108
- hosts = org.hosts
109
-
110
- if event_data['contentAccessMode'] == 'org_environment'
111
- Katello::HostStatusManager.clear_syspurpose_status(hosts)
112
- Katello::HostStatusManager.update_subscription_status_to_sca(hosts)
113
- elsif event_data['contentAccessMode'] == 'entitlement'
114
- cp_consumer_uuids = hosts.joins(:subscription_facet).pluck("#{Katello::Host::SubscriptionFacet.table_name}.uuid")
115
- cp_consumer_uuids.each do |uuid|
116
- Katello::Resources::Candlepin::Consumer.compliance(uuid)
117
- Katello::Resources::Candlepin::Consumer.purpose_compliance(uuid)
118
- rescue => e
119
- Rails.logger.error("Error encountered while fetching compliance for consumer #{uuid}: #{e.message}")
120
- end
121
- end
122
101
 
102
+ Rails.logger.error "Received content_access_mode_modified event for org #{org.label}. This event is no longer supported."
123
103
  org.simple_content_access?(cached: false)
124
104
  end
125
105
 
@@ -6,15 +6,20 @@ module Katello
6
6
  @host = host
7
7
  end
8
8
 
9
+ # rubocop:disable Metrics/MethodLength
9
10
  def upload
11
+ if @host.nil?
12
+ Rails.logger.warn("Host was not specified; skipping")
13
+ return false
14
+ elsif @host.content_facet.nil? || @host.content_facet.uuid.nil?
15
+ Rails.logger.warn("Host with ID %s has no content facet; skipping" % @host.id)
16
+ return false
17
+ end
18
+
10
19
  profiles = JSON.parse(@profile_string)
11
20
  #free the huge string from the memory
12
21
  @profile_string = 'TRIMMED'.freeze
13
- if @host.nil?
14
- Rails.logger.warn("Host was not specified; continuing")
15
- elsif @host.content_facet.nil? || @host.content_facet.uuid.nil?
16
- Rails.logger.warn("Host with ID %s has no content facet; continuing" % @host.id)
17
- elsif profiles.try(:has_key?, "deb_package_profile")
22
+ if profiles.try(:has_key?, "deb_package_profile")
18
23
  # remove this when deb_package_profile API is removed
19
24
  payload = profiles.dig("deb_package_profile", "deb_packages") || []
20
25
  import_deb_package_profile(payload)
@@ -37,9 +42,15 @@ module Katello
37
42
  module_streams.each do |module_stream_payload|
38
43
  import_module_streams(module_stream_payload)
39
44
  end
40
-
41
45
  end
46
+
47
+ # Just to update the internal cache
48
+ @host.content_facet.tracer_installed?(force_update_cache: true)
49
+ @host.content_facet.host_tools_installed?(force_update_cache: true)
50
+
51
+ true
42
52
  end
53
+ # rubocop:enable Metrics/MethodLength
43
54
 
44
55
  def trigger_applicability_generation
45
56
  if @host.nil?
@@ -2,29 +2,7 @@ module Katello
2
2
  class HostStatusManager
3
3
  STATUSES = [
4
4
  Katello::ErrataStatus,
5
- Katello::SubscriptionStatus,
6
- Katello::PurposeSlaStatus,
7
- Katello::PurposeRoleStatus,
8
- Katello::PurposeUsageStatus,
9
- Katello::PurposeAddonsStatus,
10
- Katello::PurposeStatus,
11
5
  Katello::RhelLifecycleStatus,
12
6
  Katello::TraceStatus].freeze
13
-
14
- PURPOSE_STATUS = [
15
- Katello::PurposeStatus,
16
- Katello::PurposeAddonsStatus,
17
- Katello::PurposeRoleStatus,
18
- Katello::PurposeSlaStatus,
19
- Katello::PurposeUsageStatus].freeze
20
-
21
- def self.update_subscription_status_to_sca(hosts)
22
- HostStatus::Status.where(host: hosts, type: Katello::SubscriptionStatus.to_s).update(status: Katello::SubscriptionStatus::DISABLED)
23
- end
24
-
25
- def self.clear_syspurpose_status(hosts)
26
- host_purpose = HostStatus::Status.where(type: ::Katello::HostStatusManager::PURPOSE_STATUS.map(&:to_s)).where('host_id in (?)', hosts.pluck(:id))
27
- host_purpose.destroy_all
28
- end
29
7
  end
30
8
  end
@@ -27,9 +27,9 @@ module Katello
27
27
  end
28
28
  end
29
29
 
30
- def initialize(organization, sca: true)
30
+ def initialize(organization)
31
31
  @organization = organization
32
- @content_access_mode = sca ? 'org_environment' : 'entitlement'
32
+ @content_access_mode = 'org_environment'
33
33
  end
34
34
 
35
35
  def seed!
@@ -21,7 +21,7 @@ module Katello
21
21
  end
22
22
 
23
23
  def copy_api
24
- PulpDebClient::CopyApi.new(api_client)
24
+ PulpDebClient::DebCopyApi.new(api_client)
25
25
  end
26
26
  end
27
27
  end
@@ -10,9 +10,9 @@ module Katello
10
10
  attr_reader :smart_proxy, :content_view_version, :destination_server, :from_content_view_version, :repository, :base_path
11
11
  def self.create(options)
12
12
  if options.delete(:format) == SYNCABLE
13
- SyncableFormatExport.new(options)
13
+ SyncableFormatExport.new(**options)
14
14
  else
15
- self.new(options)
15
+ self.new(**options)
16
16
  end
17
17
  end
18
18
 
@@ -45,6 +45,7 @@ module Katello
45
45
  def generate_repository_metadata(repo)
46
46
  repo.slice(:name, :label, :description, :arch, :content_type, :unprotected,
47
47
  :checksum_type, :os_versions, :major, :minor,
48
+ :deb_releases, :deb_components, :deb_architectures,
48
49
  :download_policy, :mirroring_policy).
49
50
  merge(product: generate_product_metadata(repo.product),
50
51
  gpg_key: generate_gpg_metadata(repo.gpg_key),
@@ -102,6 +102,9 @@ module Katello
102
102
  download_policy: repo[:download_policy],
103
103
  mirroring_policy: repo[:mirroring_policy],
104
104
  redhat: repo[:redhat],
105
+ deb_releases: repo[:deb_releases],
106
+ deb_components: repo[:deb_components],
107
+ deb_architectures: repo[:deb_architectures],
105
108
  product: product_for_repo(repo),
106
109
  gpg_key: gpg_key_for_repo(repo),
107
110
  content: content
@@ -73,18 +73,27 @@ module Katello
73
73
  "/pulp/deb/#{repo.relative_path}/".sub('//', '/')
74
74
  end
75
75
 
76
- def multi_copy_units(repo_id_map, dependency_solving)
76
+ def multi_copy_units(repo_id_map, _dependency_solving)
77
77
  tasks = []
78
78
 
79
79
  if repo_id_map.values.pluck(:content_unit_hrefs).flatten.any?
80
80
  data = PulpDebClient::Copy.new
81
- data.dependency_solving = dependency_solving
81
+ data.dependency_solving = false
82
82
  data.config = []
83
83
  repo_id_map.each do |source_repo_ids, dest_repo_id_map|
84
84
  dest_repo = ::Katello::Repository.find(dest_repo_id_map[:dest_repo])
85
85
  dest_repo_href = ::Katello::Pulp3::Repository::Apt.new(dest_repo, SmartProxy.pulp_primary).repository_reference.repository_href
86
86
  content_unit_hrefs = dest_repo_id_map[:content_unit_hrefs]
87
87
  # Not needed during incremental update due to dest_base_version
88
+ # -> Unless incrementally updating a CV repo that is a soft copy of its library instance.
89
+ # -> I.e. no filters and not an incremental version.
90
+ unless dest_repo_id_map[:base_version]
91
+ # Don't perform extra content actions if the repo is a soft copy of its library instance.
92
+ # Taken care of by the IncrementalUpdate action.
93
+ unless dest_repo.soft_copy_of_library?
94
+ tasks << remove_all_content_from_repo(dest_repo_href)
95
+ end
96
+ end
88
97
  source_repo_ids.each do |source_repo_id|
89
98
  source_repo_version = ::Katello::Repository.find(source_repo_id).version_href
90
99
  config = { source_repo_version: source_repo_version, dest_repo: dest_repo_href, content: content_unit_hrefs }
@@ -203,9 +212,9 @@ module Katello
203
212
  filter_list_map
204
213
  end
205
214
 
206
- def copy_content_from_mapping(repo_id_map, options = {})
215
+ def copy_content_from_mapping(repo_id_map, _options = {})
207
216
  repo_id_map.each do |source_repo_ids, dest_repo_map|
208
- filters = ContentViewDebFilter.where(:id => options[:filter_ids])
217
+ filters = ContentViewDebFilter.where(:id => dest_repo_map[:filter_ids])
209
218
 
210
219
  filter_list_map = { whitelist_ids: [], blacklist_ids: [] }
211
220
  filter_list_map = add_filter_content(source_repo_ids, filters, filter_list_map)
@@ -218,7 +227,7 @@ module Katello
218
227
  dest_repo_map[:content_unit_hrefs] = content_unit_hrefs.uniq.sort
219
228
  end
220
229
 
221
- dependency_solving = options[:solve_dependencies] || false
230
+ dependency_solving = false
222
231
 
223
232
  multi_copy_units(repo_id_map, dependency_solving)
224
233
  end
@@ -233,7 +242,8 @@ module Katello
233
242
  tasks << add_content(slice, first_slice)
234
243
  first_slice = false
235
244
  end
236
- else
245
+ # If we're merging composite cv repositories, don't clear out the Pulp repository.
246
+ elsif remove_all
237
247
  tasks << remove_all_content
238
248
  end
239
249
  tasks
@@ -148,7 +148,7 @@ module Katello
148
148
  end
149
149
  end
150
150
 
151
- def register_host(host, consumer_params, content_view_environments, activation_keys = []) # rubocop:disable Metrics/MethodLength
151
+ def register_host(host, consumer_params, content_view_environments, activation_keys = [])
152
152
  new_host = host.new_record?
153
153
  unless new_host
154
154
  host.save!
@@ -172,7 +172,6 @@ module Katello
172
172
  host.content_facet.cves_changed = false # prevent backend_update_needed from triggering an update on a nonexistent consumer
173
173
  host.subscription_facet = populate_subscription_facet(host, activation_keys, consumer_params, host_uuid)
174
174
  host.save! # the host has content and subscription facets at this point
175
- create_initial_subscription_status(host)
176
175
 
177
176
  User.as_anonymous_admin do
178
177
  begin
@@ -219,10 +218,6 @@ module Katello
219
218
  destroy_host_record(host.id)
220
219
  end
221
220
 
222
- def create_initial_subscription_status(host)
223
- host.subscription_facet.update_subscription_status(::Katello::SubscriptionStatus::UNKNOWN)
224
- end
225
-
226
221
  def create_in_candlepin(host, content_view_environments, consumer_params, activation_keys)
227
222
  # if CP fails, nothing to clean up yet w.r.t. backend services
228
223
  cp_create = ::Katello::Resources::Candlepin::Consumer.create(content_view_environments.map(&:cp_id), consumer_params, activation_keys.map(&:cp_name), host.organization)
@@ -243,7 +238,6 @@ module Katello
243
238
  host.subscription_facet.save!
244
239
  host.refresh_statuses([
245
240
  ::Katello::ErrataStatus,
246
- ::Katello::SubscriptionStatus,
247
241
  ::Katello::RhelLifecycleStatus
248
242
  ])
249
243
  end
@@ -314,12 +308,6 @@ module Katello
314
308
  end
315
309
 
316
310
  host.get_status(::Katello::ErrataStatus).destroy
317
- host.get_status(::Katello::PurposeSlaStatus).destroy
318
- host.get_status(::Katello::PurposeRoleStatus).destroy
319
- host.get_status(::Katello::PurposeUsageStatus).destroy
320
- host.get_status(::Katello::PurposeAddonsStatus).destroy
321
- host.get_status(::Katello::PurposeStatus).destroy
322
- host.get_status(::Katello::SubscriptionStatus).destroy
323
311
  host.get_status(::Katello::TraceStatus).destroy
324
312
  host.installed_packages.delete_all
325
313
 
@@ -2,3 +2,5 @@ object @resource
2
2
 
3
3
  attributes :id, :name
4
4
  attributes :version, :architecture
5
+ attributes :upgradable_versions
6
+ attributes :deb_id
@@ -4,6 +4,15 @@ object @resource
4
4
  @facet = @resource.content_facet
5
5
 
6
6
  attributes :id, :name, :description
7
+
8
+ node :operatingsystem_family do |resource|
9
+ resource.operatingsystem.family
10
+ end
11
+
12
+ node :operatingsystem_major do |resource|
13
+ resource.operatingsystem.major
14
+ end
15
+
7
16
  if @facet
8
17
  node :content_view do
9
18
  content_view = @facet&.single_content_view
@@ -1,6 +1,3 @@
1
1
  child :subscription_facet => :subscription_facet_attributes do
2
2
  extends 'katello/api/v2/subscription_facet/base'
3
3
  end
4
-
5
- attributes :subscription_status, :subscription_status_label, :subscription_global_status,
6
- :if => @object.get_status(Katello::SubscriptionStatus).relevant?
@@ -7,6 +7,9 @@ child :subscription_facet => :subscription_facet_attributes do |_facet|
7
7
 
8
8
  child :hypervisor_host => :virtual_host do
9
9
  attributes :id, :name
10
+ node :display_name do |host|
11
+ host.to_label
12
+ end
10
13
  end
11
14
 
12
15
  child :virtual_guests => :virtual_guests do
@@ -1,17 +1,18 @@
1
- <%= javascript 'katello/sync_management' %>
1
+ <% content_for(:katello_javascripts) do -%>
2
+ <%= javascript_include_tag 'katello/sync_management' %>
3
+ <script>
4
+ localize({
5
+ "cancel": "<%= escape_javascript(_('Cancel')) %>",
6
+ "cancelled": "<%= escape_javascript(_('Sync Canceled')) %>",
7
+ "error": "<%= escape_javascript(_('Error')) %>",
8
+ "complete": "<%= escape_javascript(_('Sync complete.')) %>",
9
+ "no_start_time": "<%= escape_javascript(_('No start time currently available.')) %>"
10
+ });
2
11
 
3
- <%= javascript do %>
4
- localize({
5
- "cancel": "<%= escape_javascript(_('Cancel')) %>",
6
- "cancelled": "<%= escape_javascript(_('Sync Canceled')) %>",
7
- "error": "<%= escape_javascript(_('Error')) %>",
8
- "complete": "<%= escape_javascript(_('Sync complete.')) %>",
9
- "no_start_time": "<%= escape_javascript(_('No start time currently available.')) %>"
10
- });
11
-
12
- KT.repo_status = $.parseJSON('<%= escape_javascript(@repo_status.to_json.html_safe) %>');
13
- KT.permissions = { "syncable" : <%= any_syncable? %> };
14
- <% end %>
12
+ KT.repo_status = $.parseJSON('<%= escape_javascript(@repo_status.to_json.html_safe) %>');
13
+ KT.permissions = { "syncable" : <%= any_syncable? %> };
14
+ </script>
15
+ <% end -%>
15
16
 
16
17
  <% if Organization.current -%>
17
18
  <%= hidden_field_tag :organization_id, Organization.current.id%>
@@ -29,23 +29,27 @@ end %>
29
29
  <% env_select_name = using_hostgroups_page? ? 'hostgroup[lifecycle_environment_id]' : 'host[content_facet_attributes][lifecycle_environment_id]' %>
30
30
  <% env_select_attr = using_hostgroups_page? ? 'lifecycle_environment' : 'content_facet.single_lifecycle_environment' %>
31
31
 
32
- <%= field(f, env_select_attr, {:label => _("Lifecycle Environment")}) do
33
- if using_hostgroups_page?
34
- select_tag env_select_id, lifecycle_environment_options(@hostgroup, :include_blank => blank_or_inherit_with_id(f, :lifecycle_environment)),
35
- :class => 'form-control', :name => env_select_name
36
- else
37
- select_tag env_select_id, lifecycle_environment_options(@host, :selected_host_group => @hostgroup || @host.hostgroup, :include_blank => blank_or_inherit_with_id(f, :lifecycle_environment)), :class => 'form-control', :name => env_select_name, :disabled => cv_lce_disabled?
38
- end
39
- end %>
32
+ <%= field(f, env_select_attr, {:label => _("Lifecycle Environment")}) do %>
33
+ <% if using_hostgroups_page? %>
34
+ <%= select_tag env_select_id, lifecycle_environment_options(@hostgroup, :include_blank => blank_or_inherit_with_id(f, :lifecycle_environment)), :class => 'form-control', :name => env_select_name %>
35
+ <% elsif cv_lce_disabled? %>
36
+ <%= hidden_field_tag 'host[content_facet_attributes][lifecycle_environment_id]', fetch_lifecycle_environment(@host).try(:id) %>
37
+ <%= select_tag env_select_id, lifecycle_environment_options(@host, :selected_host_group => @hostgroup || @host.hostgroup, :include_blank => blank_or_inherit_with_id(f, :lifecycle_environment)), :class => 'form-control', :name => env_select_name, :disabled => true %>
38
+ <% else %>
39
+ <%= select_tag env_select_id, lifecycle_environment_options(@host, :selected_host_group => @hostgroup || @host.hostgroup, :include_blank => blank_or_inherit_with_id(f, :lifecycle_environment)), :class => 'form-control', :name => env_select_name %>
40
+ <% end %>
41
+ <% end %>
40
42
 
41
43
  <% cv_select_id = using_hostgroups_page? ? :hostgroup_content_view_id : :host_content_view_id %>
42
44
  <% cv_select_name = using_hostgroups_page? ? 'hostgroup[content_view_id]' : 'host[content_facet_attributes][content_view_id]' %>
43
45
  <% cv_select_attr = using_hostgroups_page? ? 'content_view' : 'content_facet.single_content_view' %>
44
- <%= field(f, cv_select_attr, {:label => _("Content View")}) do
45
- if using_hostgroups_page?
46
- select_tag cv_select_id, content_views_for_host(@hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)), :data => {"spinner_path" => spinner_path},
47
- :class => 'form-control', :name => cv_select_name
48
- else
49
- select_tag cv_select_id, content_views_for_host(@host, :selected_host_group => @hostgroup || @host.hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)), :data => {"spinner_path" => spinner_path}, :class => 'form-control', :name => cv_select_name, :disabled => cv_lce_disabled?
50
- end
51
- end %>
46
+ <%= field(f, cv_select_attr, {:label => _("Content View")}) do %>
47
+ <% if using_hostgroups_page? %>
48
+ <%= select_tag cv_select_id, content_views_for_host(@hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)), :data => {"spinner_path" => spinner_path}, :class => 'form-control', :name => cv_select_name %>
49
+ <% elsif cv_lce_disabled? %>
50
+ <%= hidden_field_tag 'host[content_facet_attributes][content_view_id]', fetch_content_view(@host).try(:id) %>
51
+ <%= select_tag cv_select_id, content_views_for_host(@host, :selected_host_group => @hostgroup || @host.hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)), :data => {"spinner_path" => spinner_path}, :class => 'form-control', :name => cv_select_name, :disabled => true %>
52
+ <% else %>
53
+ <%= select_tag cv_select_id, content_views_for_host(@host, :selected_host_group => @hostgroup || @host.hostgroup, :include_blank => blank_or_inherit_with_id(f, :content_view)), :data => {"spinner_path" => spinner_path}, :class => 'form-control', :name => cv_select_name %>
54
+ <% end %>
55
+ <% end %>
@@ -23,7 +23,9 @@
23
23
  :class => 'form-control', :name => ks_repo_select_name, :disabled => kickstart_options.empty?
24
24
  end %>
25
25
 
26
- <script>
27
- KT.hosts.set_media_selection_bindings();
28
- KT.hosts.update_media_enablement();
29
- </script>
26
+ <% content_for(:javascripts) do -%>
27
+ <script>
28
+ KT.hosts.set_media_selection_bindings();
29
+ KT.hosts.update_media_enablement();
30
+ </script>
31
+ <% end -%>