katello 4.4.2.2 → 4.5.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 (444) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +5 -1
  3. data/app/controllers/katello/api/v2/alternate_content_sources_controller.rb +98 -0
  4. data/app/controllers/katello/api/v2/content_export_incrementals_controller.rb +39 -3
  5. data/app/controllers/katello/api/v2/content_exports_controller.rb +19 -0
  6. data/app/controllers/katello/api/v2/content_imports_controller.rb +13 -16
  7. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +0 -12
  8. data/app/controllers/katello/api/v2/content_views_controller.rb +13 -0
  9. data/app/controllers/katello/api/v2/environments_controller.rb +1 -1
  10. data/app/controllers/katello/api/v2/host_module_streams_controller.rb +8 -2
  11. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +25 -3
  12. data/app/controllers/katello/api/v2/organizations_controller.rb +4 -2
  13. data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +1 -1
  14. data/app/controllers/katello/api/v2/repositories_controller.rb +9 -3
  15. data/app/controllers/katello/api/v2/repository_sets_controller.rb +40 -7
  16. data/app/controllers/katello/api/v2/subscriptions_controller.rb +2 -2
  17. data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +1 -1
  18. data/app/helpers/katello/concerns/smart_proxy_helper_extensions.rb +4 -0
  19. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +21 -3
  20. data/app/lib/actions/katello/alternate_content_source/create.rb +24 -0
  21. data/app/lib/actions/katello/alternate_content_source/destroy.rb +27 -0
  22. data/app/lib/actions/katello/alternate_content_source/update.rb +41 -0
  23. data/app/lib/actions/katello/cdn_configuration/update.rb +2 -2
  24. data/app/lib/actions/katello/content_view/destroy.rb +2 -1
  25. data/app/lib/actions/katello/content_view/incremental_updates.rb +7 -3
  26. data/app/lib/actions/katello/content_view/publish.rb +7 -9
  27. data/app/lib/actions/katello/content_view_version/auto_create_products.rb +4 -4
  28. data/app/lib/actions/katello/content_view_version/auto_create_redhat_repositories.rb +6 -4
  29. data/app/lib/actions/katello/content_view_version/auto_create_repositories.rb +6 -4
  30. data/app/lib/actions/katello/content_view_version/import.rb +25 -22
  31. data/app/lib/actions/katello/content_view_version/import_library.rb +0 -1
  32. data/app/lib/actions/katello/content_view_version/import_repository.rb +21 -0
  33. data/app/lib/actions/katello/content_view_version/incremental_update.rb +85 -93
  34. data/app/lib/actions/katello/content_view_version/reset_content_view_repositories_from_metadata.rb +2 -2
  35. data/app/lib/actions/katello/product/content_create.rb +10 -8
  36. data/app/lib/actions/katello/repository/destroy.rb +36 -12
  37. data/app/lib/actions/katello/repository_set/disable_repository.rb +8 -3
  38. data/app/lib/actions/pulp3/alternate_content_source/create.rb +20 -0
  39. data/app/lib/actions/pulp3/alternate_content_source/create_remote.rb +20 -0
  40. data/app/lib/actions/pulp3/alternate_content_source/delete.rb +16 -0
  41. data/app/lib/actions/pulp3/alternate_content_source/delete_remote.rb +16 -0
  42. data/app/lib/actions/pulp3/alternate_content_source/update.rb +16 -0
  43. data/app/lib/actions/pulp3/alternate_content_source/update_remote.rb +17 -0
  44. data/app/lib/actions/pulp3/content_view_version/{import.rb → create_import.rb} +5 -5
  45. data/app/lib/actions/pulp3/content_view_version/create_importer.rb +4 -3
  46. data/app/lib/actions/pulp3/content_view_version/destroy_importer.rb +12 -1
  47. data/app/lib/actions/pulp3/orchestration/alternate_content_source/create.rb +18 -0
  48. data/app/lib/actions/pulp3/orchestration/alternate_content_source/delete.rb +23 -0
  49. data/app/lib/actions/pulp3/orchestration/alternate_content_source/update.rb +18 -0
  50. data/app/lib/actions/pulp3/orchestration/content_view_version/copy_version_units_to_library.rb +1 -1
  51. data/app/lib/actions/pulp3/orchestration/content_view_version/export_repository.rb +51 -0
  52. data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +5 -2
  53. data/app/lib/actions/pulp3/repository/refresh_distribution.rb +4 -1
  54. data/app/lib/actions/pulp3/repository/save_distribution_references.rb +2 -0
  55. data/app/lib/katello/api/v2/error_handling.rb +1 -0
  56. data/app/lib/katello/resources/cdn/katello_cdn.rb +3 -1
  57. data/app/lib/katello/util/errata.rb +2 -3
  58. data/app/lib/katello/validators/alternate_content_source_path_validator.rb +29 -0
  59. data/app/lib/katello/validators/content_default_http_proxy_setting_validator.rb +12 -0
  60. data/app/lib/katello/validators/content_view_environment_validator.rb +10 -5
  61. data/app/models/katello/alternate_content_source.rb +66 -0
  62. data/app/models/katello/authorization/alternate_content_source.rb +33 -0
  63. data/app/models/katello/authorization/repository.rb +3 -3
  64. data/app/models/katello/candlepin/repository_mapper.rb +13 -6
  65. data/app/models/katello/cdn_configuration.rb +15 -15
  66. data/app/models/katello/concerns/content_facet_host_extensions.rb +25 -0
  67. data/app/models/katello/concerns/host_managed_extensions.rb +7 -5
  68. data/app/models/katello/concerns/http_proxy_extensions.rb +14 -0
  69. data/app/models/katello/concerns/organization_extensions.rb +4 -2
  70. data/app/models/katello/concerns/setting_extensions.rb +14 -0
  71. data/app/models/katello/concerns/smart_proxy_extensions.rb +2 -1
  72. data/app/models/katello/content.rb +1 -0
  73. data/app/models/katello/content_credential.rb +6 -0
  74. data/app/models/katello/content_override.rb +7 -3
  75. data/app/models/katello/content_view.rb +33 -2
  76. data/app/models/katello/content_view_erratum_filter.rb +26 -12
  77. data/app/models/katello/content_view_filter.rb +4 -0
  78. data/app/models/katello/content_view_version.rb +12 -0
  79. data/app/models/katello/content_view_version_export_history.rb +3 -1
  80. data/app/models/katello/erratum.rb +9 -5
  81. data/app/models/katello/events/delete_latest_content_view_version.rb +40 -0
  82. data/app/models/katello/host/content_facet.rb +14 -0
  83. data/app/models/katello/host_available_module_stream.rb +12 -0
  84. data/app/models/katello/product_content.rb +1 -0
  85. data/app/models/katello/purpose_sla_status.rb +1 -1
  86. data/app/models/katello/purpose_status.rb +2 -2
  87. data/app/models/katello/repository.rb +7 -4
  88. data/app/models/katello/root_repository.rb +1 -1
  89. data/app/models/katello/smart_proxy_alternate_content_source.rb +8 -0
  90. data/app/models/katello/sync_plan.rb +1 -1
  91. data/app/presenters/katello/product_content_presenter.rb +15 -0
  92. data/app/services/katello/applicable_host_queue.rb +1 -1
  93. data/app/services/katello/content_unit_indexer.rb +2 -1
  94. data/app/services/katello/product_content_finder.rb +12 -2
  95. data/app/services/katello/pulp3/alternate_content_source.rb +117 -0
  96. data/app/services/katello/pulp3/api/file.rb +8 -0
  97. data/app/services/katello/pulp3/api/yum.rb +8 -0
  98. data/app/services/katello/pulp3/content_view_version/export.rb +27 -5
  99. data/app/services/katello/pulp3/content_view_version/import.rb +97 -71
  100. data/app/services/katello/pulp3/content_view_version/import_export_common.rb +4 -4
  101. data/app/services/katello/pulp3/content_view_version/import_gpg_keys.rb +13 -11
  102. data/app/services/katello/pulp3/content_view_version/import_validator.rb +67 -72
  103. data/app/services/katello/pulp3/content_view_version/importable_products.rb +40 -24
  104. data/app/services/katello/pulp3/content_view_version/importable_repositories.rb +88 -39
  105. data/app/services/katello/pulp3/content_view_version/metadata_generator.rb +2 -2
  106. data/app/services/katello/pulp3/content_view_version/metadata_map.rb +117 -0
  107. data/app/services/katello/pulp3/pulp_content_unit.rb +6 -1
  108. data/app/services/katello/pulp3/repository/yum.rb +70 -12
  109. data/app/services/katello/pulp3/repository.rb +7 -91
  110. data/app/services/katello/pulp3/service_common.rb +66 -0
  111. data/app/services/katello/pulp3/smart_proxy_mirror_repository.rb +4 -1
  112. data/app/services/katello/ui_notifications/content_view/delete_latest_version_failure.rb +22 -0
  113. data/app/views/foreman/job_templates/change_content_source.erb +1 -1
  114. data/app/views/foreman/job_templates/install_errata.erb +5 -5
  115. data/app/views/foreman/job_templates/install_errata_by_search_query.erb +7 -6
  116. data/app/views/foreman/job_templates/install_group.erb +4 -4
  117. data/app/views/foreman/job_templates/install_package.erb +4 -4
  118. data/app/views/foreman/job_templates/install_packages_by_search_query.erb +3 -3
  119. data/app/views/foreman/job_templates/remove_group.erb +4 -4
  120. data/app/views/foreman/job_templates/remove_package.erb +4 -4
  121. data/app/views/foreman/job_templates/remove_packages_by_search_query.erb +3 -3
  122. data/app/views/foreman/job_templates/resolve_traces.erb +2 -2
  123. data/app/views/foreman/job_templates/restart_services.erb +3 -3
  124. data/app/views/foreman/job_templates/update_group.erb +4 -4
  125. data/app/views/foreman/job_templates/update_package.erb +4 -4
  126. data/app/views/foreman/job_templates/update_packages_by_search_query.erb +3 -3
  127. data/app/views/katello/api/v2/alternate_content_sources/base.json.rabl +15 -0
  128. data/app/views/katello/api/v2/alternate_content_sources/index.json.rabl +7 -0
  129. data/app/views/katello/api/v2/alternate_content_sources/show.json.rabl +3 -0
  130. data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +1 -1
  131. data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +2 -3
  132. data/app/views/katello/api/v2/content_view_versions/base.json.rabl +1 -1
  133. data/app/views/katello/api/v2/content_views/base.json.rabl +1 -0
  134. data/app/views/katello/api/v2/environments/show.json.rabl +2 -0
  135. data/app/views/katello/api/v2/errata/_counts.json.rabl +2 -2
  136. data/app/views/katello/api/v2/host_module_streams/base.json.rabl +2 -2
  137. data/app/views/katello/api/v2/hosts/host_collections.json.rabl +1 -1
  138. data/app/views/katello/api/v2/organizations/show.json.rabl +7 -1
  139. data/app/views/katello/api/v2/repositories/show.json.rabl +2 -1
  140. data/app/views/katello/sync_management/_repo.html.erb +8 -29
  141. data/config/routes/api/v2.rb +7 -0
  142. data/db/migrate/20150930183738_migrate_content_hosts.rb +0 -399
  143. data/db/migrate/20171025163149_remove_use_pulp_oauth_setting.rb +1 -1
  144. data/db/migrate/20171114150937_cleanup_installed_packages.rb +1 -1
  145. data/db/migrate/20180402160223_clean_up_force_post_sync_action_setting.rb +1 -1
  146. data/db/migrate/20211129200124_remove_dependency_solving_algorithm_setting.rb +1 -1
  147. data/db/migrate/20211220185935_clean_duplicate_content_units.rb +10 -12
  148. data/db/migrate/20220110223754_update_disconnected_settings.rb +5 -5
  149. data/db/migrate/20220117151612_add_alternate_content_sources.rb +48 -0
  150. data/db/migrate/20220124191056_add_type_to_cdn_configuration.rb +9 -4
  151. data/db/migrate/20220209203251_add_generated_for_to_content_views.rb +13 -0
  152. data/db/migrate/20220209205137_expand_sync_timeout_settings.rb +7 -7
  153. data/db/migrate/20220228173251_remove_drpm_from_ignorable_content.rb +12 -0
  154. data/db/migrate/20220404190836_delete_old_setting_data.rb +9 -0
  155. data/db/migrate/20220405220616_update_cdn_configuration_type.rb +11 -0
  156. data/db/migrate/20220419193414_content_settings_to_dsl_category.rb +5 -0
  157. data/db/seeds.d/110-content-view-autopublish.rb +13 -0
  158. data/db/seeds.d/150-module_job_templates.rb +1 -1
  159. data/engines/bastion/README.md +1 -0
  160. data/engines/bastion/app/assets/javascripts/bastion/components/bst-modal.directive.js +1 -0
  161. data/engines/bastion/app/views/bastion/layouts/assets.html.erb +1 -0
  162. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +4 -2
  163. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +10 -5
  164. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-module-streams.controller.js +1 -0
  165. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages-installed.controller.js +1 -0
  166. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-traces.controller.js +1 -0
  167. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-actions.html +1 -1
  168. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages-applicable.html +1 -1
  169. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +8 -0
  170. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +4 -2
  171. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -2
  172. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +10 -0
  173. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-deb-repositories.html +26 -0
  174. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-debs.html +27 -0
  175. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.controller.js +1 -0
  176. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +22 -0
  177. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +13 -7
  178. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +63 -17
  179. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +7 -8
  180. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details.controller.js +10 -1
  181. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-details.html +21 -3
  182. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +8 -9
  183. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +7 -5
  184. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +2 -1
  185. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/discovery-create.controller.js +1 -1
  186. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/discovery/views/discovery-create.html +1 -1
  187. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.routes.js +1 -0
  188. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +6 -1
  189. data/lib/katello/engine.rb +1 -5
  190. data/lib/katello/permission_creator.rb +32 -4
  191. data/lib/katello/plugin.rb +378 -4
  192. data/lib/katello/tasks/reset.rake.bak +67 -0
  193. data/lib/katello/tasks/update_content_default_http_proxy.rake +2 -3
  194. data/lib/katello/version.rb +1 -1
  195. data/locale/action_names.rb +47 -41
  196. data/locale/bn/LC_MESSAGES/katello.mo +0 -0
  197. data/locale/bn/katello.po +820 -106
  198. data/locale/bn/katello.po.time_stamp +0 -0
  199. data/locale/cs/LC_MESSAGES/katello.mo +0 -0
  200. data/locale/cs/katello.po +818 -104
  201. data/locale/cs/katello.po.time_stamp +0 -0
  202. data/locale/de/LC_MESSAGES/katello.mo +0 -0
  203. data/locale/de/katello.po +893 -179
  204. data/locale/de/katello.po.time_stamp +0 -0
  205. data/locale/en/LC_MESSAGES/katello.mo +0 -0
  206. data/locale/en/katello.po +817 -103
  207. data/locale/en/katello.po.time_stamp +0 -0
  208. data/locale/es/LC_MESSAGES/katello.mo +0 -0
  209. data/locale/es/katello.po +882 -168
  210. data/locale/es/katello.po.time_stamp +0 -0
  211. data/locale/fr/LC_MESSAGES/katello.mo +0 -0
  212. data/locale/fr/katello.po +1219 -505
  213. data/locale/fr/katello.po.time_stamp +0 -0
  214. data/locale/gu/LC_MESSAGES/katello.mo +0 -0
  215. data/locale/gu/katello.po +826 -112
  216. data/locale/gu/katello.po.time_stamp +0 -0
  217. data/locale/hi/LC_MESSAGES/katello.mo +0 -0
  218. data/locale/hi/katello.po +826 -112
  219. data/locale/hi/katello.po.time_stamp +0 -0
  220. data/locale/it/LC_MESSAGES/katello.mo +0 -0
  221. data/locale/it/katello.po +863 -148
  222. data/locale/it/katello.po.time_stamp +0 -0
  223. data/locale/ja/LC_MESSAGES/katello.mo +0 -0
  224. data/locale/ja/katello.po +1216 -499
  225. data/locale/ja/katello.po.time_stamp +0 -0
  226. data/locale/katello.pot +3847 -2507
  227. data/locale/kn/LC_MESSAGES/katello.mo +0 -0
  228. data/locale/kn/katello.po +826 -112
  229. data/locale/kn/katello.po.time_stamp +0 -0
  230. data/locale/ko/LC_MESSAGES/katello.mo +0 -0
  231. data/locale/ko/katello.po +912 -198
  232. data/locale/ko/katello.po.time_stamp +0 -0
  233. data/locale/mr/LC_MESSAGES/katello.mo +0 -0
  234. data/locale/mr/katello.po +826 -112
  235. data/locale/mr/katello.po.time_stamp +0 -0
  236. data/locale/or/LC_MESSAGES/katello.mo +0 -0
  237. data/locale/or/katello.po +826 -112
  238. data/locale/or/katello.po.time_stamp +0 -0
  239. data/locale/pa/LC_MESSAGES/katello.mo +0 -0
  240. data/locale/pa/katello.po +826 -112
  241. data/locale/pa/katello.po.time_stamp +0 -0
  242. data/locale/pt/LC_MESSAGES/katello.mo +0 -0
  243. data/locale/pt/katello.po +817 -103
  244. data/locale/pt/katello.po.time_stamp +0 -0
  245. data/locale/pt_BR/LC_MESSAGES/katello.mo +0 -0
  246. data/locale/pt_BR/katello.po +879 -165
  247. data/locale/pt_BR/katello.po.time_stamp +0 -0
  248. data/locale/ru/LC_MESSAGES/katello.mo +0 -0
  249. data/locale/ru/katello.po +927 -213
  250. data/locale/ru/katello.po.time_stamp +0 -0
  251. data/locale/ta/LC_MESSAGES/katello.mo +0 -0
  252. data/locale/ta/katello.po +820 -106
  253. data/locale/ta/katello.po.time_stamp +0 -0
  254. data/locale/te/LC_MESSAGES/katello.mo +0 -0
  255. data/locale/te/katello.po +826 -112
  256. data/locale/te/katello.po.time_stamp +0 -0
  257. data/locale/zh_CN/LC_MESSAGES/katello.mo +0 -0
  258. data/locale/zh_CN/katello.po +1202 -486
  259. data/locale/zh_CN/katello.po.time_stamp +0 -0
  260. data/locale/zh_TW/LC_MESSAGES/katello.mo +0 -0
  261. data/locale/zh_TW/katello.po +856 -142
  262. data/locale/zh_TW/katello.po.time_stamp +0 -0
  263. data/webpack/components/EditableTextInput/EditableTextInput.js +20 -5
  264. data/webpack/components/Errata/index.js +38 -8
  265. data/webpack/components/Packages/index.js +1 -4
  266. data/webpack/components/Search/Search.js +18 -3
  267. data/webpack/components/SelectAllCheckbox/index.js +1 -0
  268. data/webpack/components/SelectableDropdown/SelectableDropdown.js +4 -2
  269. data/webpack/components/Table/EmptyStateMessage.js +21 -7
  270. data/webpack/components/Table/MainTable.js +29 -4
  271. data/webpack/components/Table/TableHooks.js +63 -19
  272. data/webpack/components/Table/TableWrapper.js +4 -2
  273. data/webpack/components/Table/components/SortableColumnHeaders.js +19 -0
  274. data/webpack/components/Table/components/TranslatedPlural.js +57 -0
  275. data/webpack/components/TypeAhead/TypeAhead.js +8 -0
  276. data/webpack/components/TypeAhead/pf4Search/TypeAheadInput.js +13 -11
  277. data/webpack/components/TypeAhead/pf4Search/TypeAheadSearch.js +5 -2
  278. data/webpack/components/extensions/HostDetails/ActionsBar/index.js +27 -0
  279. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ChangeHostCVModal.js +256 -0
  280. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/ContentViewDetailsCard.js +202 -0
  281. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewActions.js +19 -0
  282. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/HostContentViewConstants.js +2 -0
  283. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/changeHostCVModal.test.js +131 -0
  284. data/webpack/components/extensions/HostDetails/Cards/{__tests__ → ContentViewDetailsCard/__tests__}/contentViewDetailsCard.test.js +22 -0
  285. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/contentViews.fixtures.json +443 -0
  286. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard/__tests__/envPaths.fixtures.json +320 -0
  287. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.js +57 -33
  288. data/webpack/components/extensions/HostDetails/Cards/ErrataOverviewCard.scss +3 -0
  289. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsActions.js +30 -0
  290. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsCard.js +187 -0
  291. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsConstants.js +7 -0
  292. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsModal.js +227 -0
  293. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/HostCollectionsSelectors.js +18 -0
  294. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/availableHostCollections.fixtures.json +106 -0
  295. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsCard.test.js +110 -0
  296. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/hostCollectionsModal.test.js +235 -0
  297. data/webpack/components/extensions/HostDetails/Cards/HostCollectionsCard/__tests__/removableHostCollections.fixtures.json +45 -0
  298. data/webpack/components/extensions/HostDetails/Cards/__tests__/errataOverviewCard.test.js +33 -8
  299. data/webpack/components/extensions/HostDetails/DetailsTabCards/InstalledProductsCard.js +44 -0
  300. data/webpack/components/extensions/HostDetails/DetailsTabCards/RegistrationCard.js +107 -0
  301. data/webpack/components/extensions/HostDetails/DetailsTabCards/SystemPropertiesCardExtensions.js +38 -0
  302. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/ErrataTab.js +62 -39
  303. data/webpack/components/extensions/HostDetails/Tabs/ErrataTab/HostErrataActions.js +1 -7
  304. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsActions.js +1 -3
  305. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsConstants.js +28 -0
  306. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/ModuleStreamsTab.js +486 -116
  307. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/__tests__/moduleStreamsTab.test.js +147 -1
  308. data/webpack/components/extensions/HostDetails/Tabs/ModuleStreamsTab/__tests__/modules.fixtures.json +6 -3
  309. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/HostPackagesActions.js +1 -7
  310. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackageInstallModal.js +2 -1
  311. data/webpack/components/extensions/HostDetails/Tabs/PackagesTab/PackagesTab.js +48 -19
  312. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionActions.js +35 -47
  313. data/webpack/components/extensions/HostDetails/Tabs/RemoteExecutionConstants.js +1 -0
  314. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsActions.js +33 -54
  315. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsConstants.js +20 -0
  316. data/webpack/components/extensions/HostDetails/Tabs/RepositorySetsTab/RepositorySetsTab.js +269 -132
  317. data/webpack/components/extensions/HostDetails/Tabs/TracesTab/TracesTab.js +47 -11
  318. data/webpack/components/extensions/HostDetails/Tabs/__tests__/errataTab.test.js +30 -42
  319. data/webpack/components/extensions/HostDetails/Tabs/__tests__/packagesTab.test.js +36 -1
  320. data/webpack/components/extensions/HostDetails/Tabs/__tests__/repositorySetsTab.test.js +94 -46
  321. data/webpack/components/extensions/HostDetails/Tabs/__tests__/tracesTab.test.js +18 -2
  322. data/webpack/components/extensions/HostDetails/Tabs/customizedRexUrlHelpers.js +6 -0
  323. data/webpack/containers/Application/config.js +5 -0
  324. data/webpack/global_index.js +30 -7
  325. data/webpack/global_test_setup.js +13 -0
  326. data/webpack/redux/actions/RedHatRepositories/enabled.js +2 -1
  327. data/webpack/redux/actions/RedHatRepositories/helpers.js +9 -8
  328. data/webpack/scenes/AlternateContentSources/ACSActions.js +53 -0
  329. data/webpack/scenes/AlternateContentSources/ACSConstants.js +4 -0
  330. data/webpack/scenes/AlternateContentSources/ACSIndexPage.js +23 -0
  331. data/webpack/scenes/AlternateContentSources/ACSSelectors.js +15 -0
  332. data/webpack/scenes/AlternateContentSources/MainTable/ACSTable.js +152 -0
  333. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsIndex.fixtures.json +91 -0
  334. data/webpack/scenes/AlternateContentSources/MainTable/__tests__/acsTable.test.js +67 -0
  335. data/webpack/scenes/AlternateContentSources/index.js +4 -0
  336. data/webpack/scenes/Content/Details/ContentRepositories.js +1 -0
  337. data/webpack/scenes/Content/Table/ContentTable.js +1 -0
  338. data/webpack/scenes/ContentViews/ContentViewsActions.js +6 -2
  339. data/webpack/scenes/ContentViews/ContentViewsConstants.js +11 -3
  340. data/webpack/scenes/ContentViews/Copy/CopyContentViewForm.js +2 -1
  341. data/webpack/scenes/ContentViews/Create/ContentViewFormComponents.js +10 -1
  342. data/webpack/scenes/ContentViews/Create/CreateContentViewForm.js +4 -3
  343. data/webpack/scenes/ContentViews/Create/__tests__/createContentView.test.js +1 -1
  344. data/webpack/scenes/ContentViews/Delete/ContentViewDeleteWizard.js +7 -5
  345. data/webpack/scenes/ContentViews/Delete/Steps/CVDeletionFinish.js +29 -21
  346. data/webpack/scenes/ContentViews/Delete/__tests__/contentViewDelete.test.js +15 -8
  347. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewAddModal.js +3 -3
  348. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ComponentContentViewBulkAddModal.js +4 -4
  349. data/webpack/scenes/ContentViews/Details/ComponentContentViews/ContentViewComponents.js +3 -1
  350. data/webpack/scenes/ContentViews/Details/ComponentContentViews/__tests__/contentViewComponents.test.js +4 -4
  351. data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +34 -8
  352. data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +33 -29
  353. data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +130 -79
  354. data/webpack/scenes/ContentViews/Details/ContentViewInfo.js +17 -3
  355. data/webpack/scenes/ContentViews/Details/Filters/Add/CVFilterAddModal.js +2 -1
  356. data/webpack/scenes/ContentViews/Details/Filters/AffectedRepositories/AffectedRepositoryTable.js +2 -1
  357. data/webpack/scenes/ContentViews/Details/Filters/CVContainerImageFilterContent.js +6 -1
  358. data/webpack/scenes/ContentViews/Details/Filters/CVErrataDateFilterContent.js +41 -21
  359. data/webpack/scenes/ContentViews/Details/Filters/CVErrataIDFilterContent.js +38 -20
  360. data/webpack/scenes/ContentViews/Details/Filters/CVModuleStreamFilterContent.js +2 -0
  361. data/webpack/scenes/ContentViews/Details/Filters/CVPackageGroupFilterContent.js +8 -1
  362. data/webpack/scenes/ContentViews/Details/Filters/CVRpmFilterContent.js +9 -1
  363. data/webpack/scenes/ContentViews/Details/Filters/ContentViewFilters.js +2 -1
  364. data/webpack/scenes/ContentViews/Details/Filters/MatchContentModal/CVRpmMatchContentModal.js +1 -0
  365. data/webpack/scenes/ContentViews/Details/Filters/Rules/ContainerTag/AddEditContainerTagRuleModal.js +27 -12
  366. data/webpack/scenes/ContentViews/Details/Filters/Rules/Package/AddEditPackageRuleModal.js +39 -17
  367. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVContainerImageFilterContent.test.js +27 -10
  368. data/webpack/scenes/ContentViews/Details/Filters/__tests__/CVRpmFilterContent.test.js +46 -23
  369. data/webpack/scenes/ContentViews/Details/Histories/ContentViewHistories.js +3 -2
  370. data/webpack/scenes/ContentViews/Details/Promote/ContentViewVersionPromote.js +5 -2
  371. data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +161 -108
  372. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewAddRemove.test.js +7 -7
  373. data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewRepoAdd.fixture.json +1 -0
  374. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/ActionSummary.js +58 -0
  375. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteContextWrapper.js +45 -0
  376. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteHelpers.js +30 -0
  377. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/BulkDeleteModal.js +56 -0
  378. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ConfirmBulkDelete.js +126 -0
  379. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/FinishBulkDelete.js +61 -0
  380. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReassignActivationKeys.js +196 -0
  381. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReassignHosts.js +220 -0
  382. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/Steps/ReviewEnvironments.js +104 -0
  383. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/BulkDeleteModal.test.js +122 -0
  384. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/BulkDeleteVersions.fixtures.json +600 -0
  385. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/contentView.fixtures.json +1504 -0
  386. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/contentViewVersion.fixtures.json +936 -0
  387. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/environmentPaths.fixtures.json +261 -0
  388. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/__tests__/hosts.fixtures.json +163 -0
  389. data/webpack/scenes/ContentViews/Details/Versions/BulkDelete/bulkDeleteSteps.js +79 -0
  390. data/webpack/scenes/ContentViews/Details/Versions/ContentViewVersions.js +192 -167
  391. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveCVVersionWizard.js +2 -5
  392. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionDeleteFinish.js +38 -53
  393. data/webpack/scenes/ContentViews/Details/Versions/Delete/RemoveSteps/CVVersionRemoveReview.js +1 -1
  394. data/webpack/scenes/ContentViews/Details/Versions/Delete/__tests__/cvVersionRemove.test.js +6 -12
  395. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedActivationKeys.js +1 -0
  396. data/webpack/scenes/ContentViews/Details/Versions/Delete/affectedHosts.js +1 -0
  397. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailConfig.js +1 -0
  398. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetails.js +8 -20
  399. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsHeader.js +23 -13
  400. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/ContentViewVersionDetailsTable.js +3 -0
  401. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.fixtures.json +4 -4
  402. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetails.test.js +0 -3
  403. data/webpack/scenes/ContentViews/Details/Versions/VersionDetails/__tests__/ContentViewVersionDetailsEmpty.test.js +4 -4
  404. data/webpack/scenes/ContentViews/Details/Versions/__tests__/contentViewVersions.test.js +12 -14
  405. data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetails.fixtures.json +1 -0
  406. data/webpack/scenes/ContentViews/Publish/CVPublishFinish.js +96 -117
  407. data/webpack/scenes/ContentViews/Publish/PublishContentViewWizard.js +13 -19
  408. data/webpack/scenes/ContentViews/Publish/__tests__/publishContentView.test.js +9 -20
  409. data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +165 -148
  410. data/webpack/scenes/ContentViews/Table/tableDataGenerator.js +2 -0
  411. data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +4 -4
  412. data/webpack/scenes/ContentViews/components/ContentViewIcon.js +14 -3
  413. data/webpack/scenes/ContentViews/components/ContentViewsCounter.js +1 -1
  414. data/webpack/scenes/ContentViews/components/EnvironmentLabels.js +4 -3
  415. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.js +9 -5
  416. data/webpack/scenes/ContentViews/components/EnvironmentPaths/EnvironmentPaths.scss +6 -1
  417. data/webpack/scenes/ContentViews/components/TaskPresenter/TaskPresenter.js +40 -35
  418. data/webpack/scenes/ContentViews/expansions/DetailsExpansion.js +2 -2
  419. data/webpack/scenes/ContentViews/expansions/RelatedCompositeContentViewsModal.js +1 -1
  420. data/webpack/scenes/ContentViews/expansions/RelatedContentViewComponentsModal.js +4 -4
  421. data/webpack/scenes/ContentViews/expansions/__tests__/contentViewComponentsModal.test.js +1 -1
  422. data/webpack/scenes/ContentViews/helpers.js +3 -0
  423. data/webpack/scenes/Hosts/ChangeContentSource/helpers.js +5 -0
  424. data/webpack/scenes/RedHatRepositories/RedHatRepositoriesPage.js +3 -3
  425. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/EnabledRepository.js +2 -1
  426. data/webpack/scenes/RedHatRepositories/components/EnabledRepository/__tests__/EnabledRepository.test.js +2 -0
  427. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnConfigurationConstants.js +3 -3
  428. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/CdnTypeForm.js +2 -0
  429. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/{AirGappedTypeForm.js → ExportSyncForm.js} +7 -6
  430. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/{UpstreamServerTypeForm.js → NetworkSyncForm.js} +15 -7
  431. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/{AirGappedTypeForm.test.js → ExportSyncForm.test.js} +4 -4
  432. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/__tests__/{UpstreamServerTypeForm.test.js → NetworkSyncForm.test.js} +8 -8
  433. data/webpack/scenes/Subscriptions/Manifest/CdnConfigurationTab/index.js +11 -11
  434. data/webpack/scenes/Subscriptions/SubscriptionConstants.js +1 -0
  435. data/webpack/scenes/Subscriptions/SubscriptionsPage.js +8 -7
  436. data/webpack/scenes/Tasks/TaskActions.js +6 -0
  437. data/webpack/scenes/Tasks/TaskSelectors.js +11 -0
  438. data/webpack/scenes/Tasks/helpers.js +33 -5
  439. data/webpack/utils/helpers.js +2 -0
  440. metadata +158 -40
  441. data/app/models/setting/content.rb +0 -201
  442. data/webpack/components/Table/__test__/useBulkSelect.test.js +0 -99
  443. data/webpack/components/extensions/HostDetails/Cards/ContentViewDetailsCard.js +0 -96
  444. data/webpack/scenes/ContentViews/Details/DetailsContainer.js +0 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd651be2d737a3763d7909bb251e2eebe3e5f7e3f64dd2a7d0fb63a3448cd936
4
- data.tar.gz: 8d1197de95bbb2618d306324c9a65fe3b67037fc6045460c5a7d4fa5e8dc428d
3
+ metadata.gz: c2fd3647b864eba8c468c3eea9e6d6d867a43192dcb29c0758f0771085fb1621
4
+ data.tar.gz: 764696ceedc7d01432439f6ac00012be79383073c35f0d491cbf4a1da1af6a77
5
5
  SHA512:
6
- metadata.gz: 8c7b25a4e22ef289cd2166765d3ca0e57577bc7fbfbdb788acbcd24122073b5822e7606ef46b1013145f031b6fc5033408a1a1ee61c6b40bb1dc1f213734db8b
7
- data.tar.gz: df205f9b36e0ecd51539001572f741aef87be242e75e075186d4f1bb5512e6730e6fda889b9d93ea3ddce2fe994fb8d64512a1befb7e3a0225094d62c7d9fe72
6
+ metadata.gz: d67f10a68cf3f81316e77099d82266960fc5887513004f5e35daa47c591ccc44f2a8ba78f54e8ef84c6ba8bc53d5a42c0621d842c70fa5b20c3dd61cae90e648
7
+ data.tar.gz: 5c798d57fbde2baf9c9d62c172e294ade51f32e2d822ed56c63983f48d8f690abd0d2f625e061c7318d4680e916d477fc64025974396ead7f17b919bf06a83c4
@@ -406,7 +406,11 @@ module Katello
406
406
  where("#{Organization.table_name}.id = ?", organization.id)
407
407
  environments = environments.where("#{Katello::ContentViewEnvironment.table_name}.label = ?", label) if label
408
408
 
409
- environments.reject { |env| (env.content_view.default && !env.environment.readable?) || !env.content_view.readable? }
409
+ environments.reject do |env|
410
+ (env.content_view.default && !env.environment.readable?) ||
411
+ !env.content_view.readable? ||
412
+ env.content_view.generated_for_repository?
413
+ end
410
414
  end
411
415
 
412
416
  def rhsm_params
@@ -0,0 +1,98 @@
1
+ module Katello
2
+ class Api::V2::AlternateContentSourcesController < Api::V2::ApiController
3
+ include Katello::Concerns::FilteredAutoCompleteSearch
4
+
5
+ before_action :find_authorized_katello_resource, :only => [:show, :update, :destroy]
6
+ before_action :find_smart_proxies
7
+
8
+ def_param_group :acs do
9
+ param :name, String, desc: N_("Name of the alternate content source")
10
+ param :description, String, desc: N_("Description for the alternate content source"), required: false
11
+ param :base_url, String, desc: N_('Base URL for finding alternate content'), required: false
12
+ param :subpaths, Array, desc: N_('Path suffixes for finding alternate content'), required: false
13
+ param :smart_proxy_ids, Array, desc: N_("Ids of smart proxies to associate"), required: false
14
+ param :content_type, RepositoryTypeManager.defined_repository_types.keys & AlternateContentSource::CONTENT_TYPES, desc: N_("The content type for the Alternate Content Source"), required: false
15
+ param :alternate_content_source_type, AlternateContentSource::ACS_TYPES, desc: N_("The Alternate Content Source type")
16
+ param :upstream_username, String, desc: N_("Basic authentication username"), required: false
17
+ param :upstream_password, String, desc: N_("Basic authentication password"), required: false
18
+ param :ssl_ca_cert_id, :number, desc: N_("Identifier of the content credential containing the SSL CA Cert"), required: false
19
+ param :ssl_client_cert_id, :number, desc: N_("Identifier of the content credential containing the SSL Client Cert"), required: false
20
+ param :ssl_client_key_id, :number, desc: N_("Identifier of the content credential containing the SSL Client Key"), required: false
21
+ param :http_proxy_id, :number, desc: N_("ID of a HTTP Proxy"), required: false
22
+ param :verify_ssl, :bool, desc: N_("If SSL should be verified for the upstream URL"), required: false
23
+ end
24
+
25
+ api :GET, "/alternate_content_sources", N_("List of alternate_content_sources")
26
+ param_group :search, Api::V2::ApiController
27
+ add_scoped_search_description_for(AlternateContentSource)
28
+ def index
29
+ respond_to do |format|
30
+ format.csv do
31
+ options[:csv] = true
32
+ alternate_content_sources = scoped_search(index_relation, :name, :asc)
33
+ csv_response(alternate_content_sources,
34
+ [:id, :name, :description, :label, :base_url, :subpaths, :content_type, :alternate_content_source_type],
35
+ ['Id', 'Name', 'Description', 'label', 'Base URL', 'Subpaths', 'Content Type', 'Alternate Content Source Type'])
36
+ end
37
+ format.any do
38
+ alternate_content_sources = scoped_search(index_relation, :name, :asc)
39
+ respond(collection: alternate_content_sources)
40
+ end
41
+ end
42
+ end
43
+
44
+ def index_relation
45
+ AlternateContentSource.readable.distinct
46
+ end
47
+
48
+ api :GET, '/alternate_content_sources/:id', N_('Show an alternate content source')
49
+ param :id, :number, :required => true, :desc => N_("Alternate content source ID")
50
+ def show
51
+ respond_for_show(:resource => @alternate_content_source)
52
+ end
53
+
54
+ api :POST, '/alternate_content_sources', N_('Create an ACS')
55
+ param_group :acs
56
+ def create
57
+ @alternate_content_source = ::Katello::AlternateContentSource.new(acs_params)
58
+ sync_task(::Actions::Katello::AlternateContentSource::Create, @alternate_content_source, @smart_proxies)
59
+ @alternate_content_source.reload
60
+ respond_for_create(resource: @alternate_content_source)
61
+ end
62
+
63
+ api :PUT, '/alternate_content_sources/:id', N_('Update an alternate content source')
64
+ param_group :acs
65
+ param :id, :number, :required => true, :desc => N_("Alternate content source ID")
66
+ def update
67
+ # If a user doesn't include smart proxies in the update call, don't accidentally remove all of them.
68
+ if params[:smart_proxy_ids].nil?
69
+ @smart_proxies = @alternate_content_source.smart_proxies
70
+ end
71
+ sync_task(::Actions::Katello::AlternateContentSource::Update, @alternate_content_source, @smart_proxies, acs_params)
72
+ respond_for_show(:resource => @alternate_content_source)
73
+ end
74
+
75
+ api :DELETE, '/alternate_content_sources/:id', N_('Destroy an alternate content source')
76
+ param :id, :number, :required => true, :desc => N_("Alternate content source ID")
77
+ def destroy
78
+ sync_task(::Actions::Katello::AlternateContentSource::Destroy, @alternate_content_source)
79
+ respond_for_destroy
80
+ end
81
+
82
+ protected
83
+
84
+ def acs_params
85
+ keys = [:name, :label, :base_url, {subpaths: []}, {smart_proxy_ids: []}, :content_type, :alternate_content_source_type,
86
+ :upstream_username, :upstream_password, :ssl_ca_cert_id, :ssl_client_cert_id, :ssl_client_key_id,
87
+ :http_proxy_id, :verify_ssl]
88
+ params.require(:alternate_content_source).permit(*keys).to_h.with_indifferent_access
89
+ end
90
+
91
+ def find_smart_proxies
92
+ if params[:smart_proxy_ids]
93
+ @smart_proxies = ::SmartProxy.where(id: params[:smart_proxy_ids])
94
+ fail HttpErrors::NotFound, _("Couldn't find smart proxies with id '%s'") % params[:smart_proxy_ids].to_sentence if @smart_proxies.empty?
95
+ end
96
+ end
97
+ end
98
+ end
@@ -2,8 +2,10 @@ module Katello
2
2
  class Api::V2::ContentExportIncrementalsController < Api::V2::ApiController
3
3
  before_action :find_exportable_organization, :only => [:library]
4
4
  before_action :find_exportable_content_view_version, :only => [:version]
5
+ before_action :find_exportable_repository, :only => [:repository]
5
6
  before_action :find_library_export_view, :only => [:library]
6
- before_action :find_history, :only => [:version, :library]
7
+ before_action :find_repository_export_view, :only => [:repository]
8
+ before_action :find_history, :only => [:version, :library, :repository]
7
9
 
8
10
  api :POST, "/content_export_incrementals/version", N_("Performs an incremental-export of a content view version.")
9
11
  param :id, :number, :desc => N_("Content view version identifier"), :required => true
@@ -44,6 +46,20 @@ module Katello
44
46
  respond_for_async :resource => tasks
45
47
  end
46
48
 
49
+ api :POST, "/content_export_incrementals/repository", N_("Performs a incremental-export of the repository in library.")
50
+ param :id, :number, :desc => N_("Repository identifier"), :required => true
51
+ param :chunk_size_gb, :number, :desc => N_("Split the exported content into archives "\
52
+ "no greater than the specified size in gigabytes."), :required => false
53
+ param :from_history_id, :number, :desc => N_("Export history identifier used for incremental export. "\
54
+ "If not provided the most recent export history will be used."), :required => false
55
+ def repository
56
+ tasks = async_task(::Actions::Pulp3::Orchestration::ContentViewVersion::ExportRepository,
57
+ @repository,
58
+ chunk_size: params[:chunk_size_gb],
59
+ from_history: @history)
60
+ respond_for_async :resource => tasks
61
+ end
62
+
47
63
  private
48
64
 
49
65
  def find_exportable_content_view_version
@@ -63,6 +79,16 @@ module Katello
63
79
  end
64
80
  end
65
81
 
82
+ def find_repository_export_view
83
+ @view = ::Katello::Pulp3::ContentViewVersion::Export.find_repository_export_view(
84
+ repository: @repository,
85
+ create_by_default: false)
86
+ if @view.blank?
87
+ msg = _("Unable to incrementally export. Do a Full Export on the repository content.")
88
+ fail HttpErrors::BadRequest, msg
89
+ end
90
+ end
91
+
66
92
  def find_history
67
93
  if params[:from_history_id].present?
68
94
  @history = ::Katello::ContentViewVersionExportHistory.find(params[:from_history_id])
@@ -72,8 +98,7 @@ module Katello
72
98
  end
73
99
  else
74
100
  @history = ::Katello::ContentViewVersionExportHistory.
75
- latest(@view,
76
- destination_server: params[:destination_server])
101
+ latest(@view, destination_server: params[:destination_server])
77
102
  if @history.blank?
78
103
  msg = _("No existing export history was found to perform an incremental export. A full export must be performed")
79
104
  fail HttpErrors::NotFound, msg
@@ -87,5 +112,16 @@ module Katello
87
112
  throw_resource_not_found(name: 'organization', id: params[:organization_id])
88
113
  end
89
114
  end
115
+
116
+ def find_exportable_repository
117
+ @repository = Repository.find_by_id(params[:id])
118
+ if @repository.blank?
119
+ throw_resource_not_found(name: 'repository', id: params[:id])
120
+ end
121
+
122
+ unless @repository.organization.can_export_content?
123
+ throw_resource_not_found(name: 'organization', id: @repository.organization.id)
124
+ end
125
+ end
90
126
  end
91
127
  end
@@ -2,6 +2,7 @@ module Katello
2
2
  class Api::V2::ContentExportsController < Api::V2::ApiController
3
3
  before_action :find_exportable_organization, :only => [:library]
4
4
  before_action :find_exportable_content_view_version, :only => [:version]
5
+ before_action :find_exportable_repository, :only => [:repository]
5
6
 
6
7
  api :GET, "/content_exports", N_("List export histories")
7
8
  param :content_view_version_id, :number, :desc => N_("Content view version identifier"), :required => false
@@ -58,8 +59,26 @@ module Katello
58
59
  respond_for_async :resource => tasks
59
60
  end
60
61
 
62
+ api :POST, "/content_exports/repository", N_("Performs a full-export of the repository in library.")
63
+ param :id, :number, :desc => N_("Repository identifier"), :required => true
64
+ param :chunk_size_gb, :number, :desc => N_("Split the exported content into archives "\
65
+ "no greater than the specified size in gigabytes."), :required => false
66
+ def repository
67
+ tasks = async_task(::Actions::Pulp3::Orchestration::ContentViewVersion::ExportRepository,
68
+ @repository,
69
+ chunk_size: params[:chunk_size_gb])
70
+ respond_for_async :resource => tasks
71
+ end
72
+
61
73
  private
62
74
 
75
+ def find_exportable_repository
76
+ @repository = Repository.find_by_id(params[:id])
77
+ if @repository.blank? || !@repository.organization.can_export_content?
78
+ throw_resource_not_found(name: 'repository', id: params[:id])
79
+ end
80
+ end
81
+
63
82
  def find_exportable_content_view_version
64
83
  @version = ContentViewVersion.exportable.find_by_id(params[:id])
65
84
  throw_resource_not_found(name: 'content view version', id: params[:id]) if @version.blank?
@@ -1,10 +1,7 @@
1
1
  module Katello
2
2
  class Api::V2::ContentImportsController < Api::V2::ApiController
3
- before_action :find_organization, :only => [:version]
4
- before_action :check_authorized, :only => [:version]
5
-
6
- before_action :find_importable_organization, :only => [:library]
7
- before_action :find_default_content_view, :only => [:library]
3
+ before_action :find_organization, :only => [:version, :repository, :library]
4
+ before_action :check_authorized, :only => [:version, :repository, :library]
8
5
 
9
6
  api :GET, "/content_imports", N_("List import histories")
10
7
  param :content_view_version_id, :number, :desc => N_("Content view version identifier"), :required => false
@@ -46,22 +43,21 @@ module Katello
46
43
  respond_for_async :resource => task
47
44
  end
48
45
 
46
+ api :POST, "/content_imports/repository", N_("Import a repository")
47
+ param :organization_id, :number, :desc => N_("Organization identifier"), :required => true
48
+ param :path, String, :desc => N_("Directory containing the exported Content View Version"), :required => true
49
+ param :metadata, Hash, :desc => N_("Metadata taken from the upstream export history for this Content View Version"), :required => true
50
+ def repository
51
+ task = async_task(::Actions::Katello::ContentViewVersion::ImportRepository, @organization, path: params[:path], metadata: metadata_params.to_h)
52
+ respond_for_async :resource => task
53
+ end
54
+
49
55
  private
50
56
 
51
57
  def check_authorized
52
58
  fail HttpErrors::Forbidden, _("Action unauthorized to be performed in this organization.") unless @organization.can_import_content?
53
59
  end
54
60
 
55
- def find_default_content_view
56
- @view = @organization&.default_content_view
57
- throw_resource_not_found(name: 'organization', id: params[:organization_id]) if @view.blank?
58
- end
59
-
60
- def find_importable_organization
61
- find_organization
62
- throw_resource_not_found(name: 'organization', id: params[:organization_id]) unless @organization.can_import_content?
63
- end
64
-
65
61
  def metadata_params
66
62
  params.require(:metadata).permit(
67
63
  :organization,
@@ -69,8 +65,9 @@ module Katello
69
65
  :products,
70
66
  :toc,
71
67
  :incremental,
68
+ :destination_server,
72
69
  gpg_keys: {},
73
- content_view: [:name, :label, :description],
70
+ content_view: [:name, :label, :description, :generated_for],
74
71
  content_view_version: [:major, :minor, :description],
75
72
  from_content_view_version: [:major, :minor]
76
73
  ).tap do |nested|
@@ -274,17 +274,5 @@ module Katello
274
274
  return deny_access unless @content_view_version.content_view.deletable?
275
275
  true
276
276
  end
277
-
278
- def metadata_params
279
- params.require(:metadata).permit(
280
- :organization,
281
- :content_view,
282
- :repository_mapping,
283
- :toc,
284
- content_view_version: [:major, :minor]
285
- ).tap do |nested|
286
- nested[:repository_mapping] = params[:metadata].require(:repository_mapping).permit!
287
- end
288
- end
289
277
  end
290
278
  end
@@ -5,6 +5,7 @@ module Katello
5
5
  include Katello::Concerns::Api::V2::BulkExtensions
6
6
 
7
7
  before_action :find_authorized_katello_resource, :except => [:index, :create, :copy, :auto_complete_search]
8
+ before_action :ensure_non_generated, only: [:publish]
8
9
  before_action :ensure_non_default, :except => [:index, :create, :copy, :auto_complete_search]
9
10
  before_action :find_organization, :only => [:create]
10
11
  before_action :find_optional_organization, :only => [:index, :auto_complete_search]
@@ -54,6 +55,7 @@ module Katello
54
55
  param :without, Array, :desc => N_("Do not include this array of content views")
55
56
  param :name, String, :desc => N_("Name of the content view"), :required => false
56
57
  param :label, String, :desc => N_("Label of the content view"), :required => false
58
+ param :include_generated, :bool, :desc => N_("Include content views generated by imports/exports. Defaults to false")
57
59
  param_group :search, Api::V2::ApiController
58
60
  add_scoped_search_description_for(ContentView)
59
61
  def index
@@ -64,6 +66,7 @@ module Katello
64
66
 
65
67
  def index_relation
66
68
  content_views = ContentView.readable
69
+ content_views = content_views.not_generated_for_repository unless Foreman::Cast.to_bool(params[:include_generated])
67
70
  content_views = content_views.where(:organization_id => @organization.id) if @organization
68
71
  content_views = content_views.in_environment(@environment) if @environment
69
72
  content_views = ::Foreman::Cast.to_bool(params[:nondefault]) ? content_views.non_default : content_views.default if params[:nondefault]
@@ -257,6 +260,16 @@ module Katello
257
260
  end
258
261
  end
259
262
 
263
+ def ensure_non_generated
264
+ if @content_view.import_only?
265
+ fail HttpErrors::BadRequest, _("Import only Content Views cannot be directly publsihed. Content can only be updated by importing into the view.")
266
+ end
267
+
268
+ if @content_view.generated?
269
+ fail HttpErrors::BadRequest, _("Generated content views cannot be directly published. They can updated only via export.")
270
+ end
271
+ end
272
+
260
273
  def view_params
261
274
  attrs = [:name, :description, :auto_publish, :solve_dependencies, :import_only,
262
275
  :default, :created_at, :updated_at, :next_version, {:component_ids => []}]
@@ -107,7 +107,7 @@ module Katello
107
107
  fail HttpErrors::BadRequest, _("Can't update the '%s' environment") % "Library" if @environment.library? && update_params.empty?
108
108
  update_params[:name] = params[:environment][:new_name] if params[:environment][:new_name]
109
109
  @environment.update!(update_params)
110
- if update_params[:registry_name_pattern]
110
+ if update_params[:registry_name_pattern] || update_params[:registry_unauthenticated_pull]
111
111
  task = send(async ? :async_task : :sync_task, ::Actions::Katello::Environment::PublishRepositories,
112
112
  @environment, content_type: Katello::Repository::DOCKER_TYPE)
113
113
  end
@@ -12,6 +12,7 @@ module Katello
12
12
  api :GET, "/hosts/:host_id/module_streams", N_("List module streams available to the host")
13
13
  param :host_id, :number, :required => true, :desc => N_("ID of the host")
14
14
  param :status, ::Katello::HostAvailableModuleStream::API_STATES.keys, :desc => N_("Streams based on the host based on their status")
15
+ param :install_status, String, :desc => N_("Streams based on the host based on the installation status"), :required => false
15
16
  param_group :search, Api::V2::ApiController
16
17
  def index
17
18
  collection = scoped_search(index_relation, :name, :asc, :resource_class => ::Katello::HostAvailableModuleStream)
@@ -22,8 +23,13 @@ module Katello
22
23
  return HostAvailableModuleStream.upgradable([@host]) if params[:status] == HostAvailableModuleStream::UPGRADABLE
23
24
 
24
25
  rel = @host.host_available_module_streams
25
- return rel if params[:status].blank?
26
- rel.send(::Katello::HostAvailableModuleStream::API_STATES[params[:status]])
26
+ if params[:sort_by] == 'installed_profiles'
27
+ rel = rel.order([:installed_profiles, :status])
28
+ end
29
+ return rel if (params[:status].blank? && params[:install_status].blank?)
30
+ rel = rel.send(::Katello::HostAvailableModuleStream::API_STATES[params[:status]]) unless params[:status].blank?
31
+ rel = rel.installed_status(params[:install_status], @host) unless params[:install_status].blank?
32
+ rel
27
33
  end
28
34
 
29
35
  def resource_class
@@ -5,6 +5,7 @@ module Katello
5
5
  before_action :check_subscriptions, :only => [:add_subscriptions, :remove_subscriptions]
6
6
  before_action :find_content_view_environment, :only => :create
7
7
  before_action :check_registration_services, :only => [:destroy, :create]
8
+ before_action :find_content_overrides, :only => [:content_override]
8
9
 
9
10
  def_param_group :installed_products do
10
11
  param :product_id, String, :desc => N_("Product id as listed from a host's installed products, \
@@ -165,12 +166,16 @@ module Katello
165
166
  param :name, String, :desc => N_("Override key or name. Note if name is not provided the default name will be 'enabled'"), :required => false
166
167
  param :remove, :bool, :desc => N_("Set true to remove an override and reset it to 'default'"), :required => false
167
168
  end
169
+ param :content_overrides_search, Hash, :desc => N_("Content override search parameters") do
170
+ param_group :search, Api::V2::ApiController
171
+ param :enabled, :bool, :desc => N_("Set true to override to enabled; Set false to override to disabled.'"), :required => false
172
+ param :remove, :bool, :desc => N_("Set true to remove an override and reset it to 'default'"), :required => false
173
+ end
168
174
  def content_override
169
- content_overrides = params[:content_overrides] || []
170
-
171
- content_override_values = content_overrides.map do |override_params|
175
+ content_override_values = @content_overrides.map do |override_params|
172
176
  validate_content_overrides_enabled(override_params)
173
177
  end
178
+
174
179
  sync_task(::Actions::Katello::Host::UpdateContentOverrides, @host, content_override_values, false)
175
180
  fetch_product_content
176
181
  end
@@ -217,5 +222,22 @@ module Katello
217
222
  fail ::Foreman::Exception.new(N_("unknown permission for %s"), "#{params[:controller]}##{params[:action]}")
218
223
  end
219
224
  end
225
+
226
+ def find_content_overrides
227
+ if params[:content_overrides_search]
228
+ content_labels = ::Katello::Content.joins(:product_contents)
229
+ .where("#{Katello::ProductContent.table_name}.product_id": @host.organization.products.subscribable.enabled)
230
+ .search_for(params[:content_overrides_search][:search])
231
+ .pluck(:label)
232
+ @content_overrides = content_labels.map do |label|
233
+ { content_label: label,
234
+ value: Foreman::Cast.to_bool(params[:content_overrides_search][:enabled]),
235
+ remove: Foreman::Cast.to_bool(params[:content_overrides_search][:remove])
236
+ }
237
+ end
238
+ else
239
+ @content_overrides = params[:content_overrides] || []
240
+ end
241
+ end
220
242
  end
221
243
  end
@@ -29,7 +29,6 @@ module Katello
29
29
  param :hostgroup_ids, Array, N_("Host group IDs"), :required => false
30
30
  param :environment_ids, Array, N_("Environment IDs"), :required => false
31
31
  param :subnet_ids, Array, N_("Subnet IDs"), :required => false
32
- param :label, String, :required => false
33
32
  param :location_ids, Array, N_("Associated location IDs"), :required => false
34
33
  end
35
34
  end
@@ -66,6 +65,9 @@ module Katello
66
65
 
67
66
  api :POST, '/organizations', N_('Create organization')
68
67
  param_group :resource
68
+ param :organization, Hash do
69
+ param :label, String, :required => false
70
+ end
69
71
  def create
70
72
  @organization = Organization.new(resource_params)
71
73
  creator = ::Katello::OrganizationCreator.new(@organization)
@@ -134,7 +136,7 @@ module Katello
134
136
 
135
137
  api :PUT, "/organizations/:id/cdn_configuration", N_("Update the CDN configuration")
136
138
  param :id, String, :desc => N_("ID of the Organization"), :required => true
137
- param :type, String, :desc => N_("CDN configuration type. One of %s.") % CdnConfiguration::TYPES, :required => true
139
+ param :type, String, :desc => N_("CDN configuration type. One of %s.") % CdnConfiguration::TYPES.join(", "), :required => true
138
140
  param :url, String, :desc => N_("Upstream foreman server to sync CDN content from. Relevant only for 'upstream_server' type.")
139
141
  param :username, String, :desc => N_("Username for authentication. Relevant only for 'upstream_server' type.")
140
142
  param :password, String, :desc => N_("Password for authentication. Relevant only for 'upstream_server' type.")
@@ -6,7 +6,7 @@ module Katello
6
6
  param :ids, Array, :desc => N_("List of repository ids"), :required => true
7
7
  def destroy_repositories
8
8
  deletion_authorized_repositories = @repositories.deletable
9
- unpromoted_repos = deletion_authorized_repositories.reject { |repo| repo.promoted? }
9
+ unpromoted_repos = deletion_authorized_repositories.reject { |repo| repo.promoted? && repo.content_views.generated_for_none.exists? }
10
10
 
11
11
  messages1 = format_bulk_action_messages(
12
12
  :success => "",
@@ -7,7 +7,7 @@ module Katello
7
7
  generic_repo_wrap_params << option.name
8
8
  end
9
9
 
10
- repo_wrap_params = RootRepository.attribute_names.concat([:ignore_global_proxy, :mirror_on_sync]) + generic_repo_wrap_params
10
+ repo_wrap_params = RootRepository.attribute_names + [:mirror_on_sync] + generic_repo_wrap_params
11
11
 
12
12
  wrap_parameters :repository, :include => repo_wrap_params
13
13
 
@@ -420,8 +420,8 @@ module Katello
420
420
  param 'id', String, :required => true
421
421
  param 'content_unit_id', String
422
422
  param 'size', String
423
- param 'checksum', String
424
- param 'name', String, :desc => N_("Needs to only be set for file repositories or docker tags")
423
+ param 'checksum', String, :required => true
424
+ param 'name', String, :required => true, :desc => N_("Needs to only be set for file repositories or docker tags")
425
425
  param 'digest', String, :desc => N_("Needs to only be set for docker tags")
426
426
  end
427
427
  Katello::RepositoryTypeManager.generic_repository_types.each_pair do |_, repo_type|
@@ -439,6 +439,12 @@ module Katello
439
439
  end
440
440
 
441
441
  uploads = (params[:uploads] || []).map do |upload|
442
+ if upload[:checksum].nil?
443
+ fail HttpErrors::BadRequest, _('Checksum is a required parameter.')
444
+ end
445
+ if upload[:name].nil?
446
+ fail HttpErrors::BadRequest, _('Name is a required parameter.')
447
+ end
442
448
  upload.permit(:id, :content_unit_id, :size, :checksum, :name, :digest).to_h
443
449
  end
444
450
 
@@ -13,7 +13,7 @@ module Katello
13
13
  before_action :find_authorized_host, :only => [:index, :auto_complete_search]
14
14
  before_action :find_organization
15
15
  before_action :find_product_content, :except => [:index, :auto_complete_search]
16
- before_action :check_airgapped, :only => [:index]
16
+ before_action :check_airgapped, :only => [:available_repositories, :enable, :disable]
17
17
 
18
18
  resource_description do
19
19
  api_version "v2"
@@ -31,13 +31,19 @@ module Katello
31
31
  param :host_id, :number, :desc => N_("Id of the host"), :required => false
32
32
  param :content_access_mode_all, :bool, :desc => N_("Get all content available, not just that provided by subscriptions.")
33
33
  param :content_access_mode_env, :bool, :desc => N_("Limit content to just that available in the host's or activation key's content view version and lifecycle environment.")
34
+ param :status, [:enabled, :disabled, :overridden],
35
+ :desc => N_("Limit content to enabled / disabled / overridden"),
36
+ :required => false
37
+
34
38
  param_group :search, Api::V2::ApiController
35
39
  add_scoped_search_description_for(Katello::ProductContent)
36
40
  def index
37
41
  collection = scoped_search(index_relation, :name, :asc, :resource_class => Katello::ProductContent)
38
- collection[:results] = ProductContentFinder.wrap_with_overrides(
39
- product_contents: collection[:results],
40
- overrides: @consumable&.content_overrides)
42
+ pcf = ProductContentFinder.wrap_with_overrides(
43
+ product_contents: collection[:results],
44
+ overrides: @consumable&.content_overrides,
45
+ status: params[:status])
46
+ collection[:results] = custom_sort_results(pcf)
41
47
  respond(:collection => collection)
42
48
  end
43
49
 
@@ -100,6 +106,7 @@ module Katello
100
106
  api :PUT, "/repository_sets/:id/disable", N_("Disable a repository from the set")
101
107
  api :PUT, "/products/:product_id/repository_sets/:id/disable", N_("Disable a repository from the set")
102
108
  param :id, :number, :required => true, :desc => N_("ID of the repository set to disable")
109
+ param :repository_id, :number, :required => false, :desc => N_("ID of the repository within the set to disable")
103
110
  param :product_id, :number, :required => false, :desc => N_("ID of the product containing the repository set")
104
111
  param :basearch, String, :required => false, :desc => N_("Basearch to disable")
105
112
  param :releasever, String, :required => false, :desc => N_("Releasever to disable")
@@ -186,7 +193,7 @@ module Katello
186
193
  end
187
194
 
188
195
  def substitutions
189
- params.permit(:basearch, :releasever).to_h
196
+ params.permit(:basearch, :releasever, :repository_id).to_h
190
197
  end
191
198
 
192
199
  def find_authorized_activation_key
@@ -212,8 +219,34 @@ module Katello
212
219
  end
213
220
 
214
221
  def check_airgapped
215
- if @organization.cdn_configuration.airgapped?
216
- respond_for_index(:collection => { :error => _("Repositories are not available for enablement while CDN configuration is set to Air-gapped (disconnected).") }, :status => :forbidden)
222
+ if @organization.cdn_configuration.export_sync?
223
+ fail HttpErrors::BadRequest, _("Repositories are not available for enablement while CDN configuration is set to Air-gapped (disconnected).")
224
+ end
225
+ end
226
+
227
+ def sort_score(pc) # sort order for enabled
228
+ score = if pc.enabled_content_override&.value == "1"
229
+ 4 # overridden to enabled
230
+ elsif pc.enabled_content_override.nil? && pc.enabled
231
+ 3 # enabled
232
+ elsif pc.enabled_content_override.nil? && !pc.enabled
233
+ 2 # disabled
234
+ elsif pc.enabled_content_override&.value == "0"
235
+ 1 # overridden to disabled
236
+ else
237
+ 0
238
+ end
239
+ Rails.logger.debug [pc.product_name, pc.enabled_content_override, "Id: #{pc.id}", "Score: #{score}"]
240
+ score
241
+ end
242
+
243
+ def custom_sort_results(product_content_finder)
244
+ if params[:sort_by] == 'enabled_by_default' && params[:sort_order] == 'desc'
245
+ product_content_finder.sort { |pca, pcb| sort_score(pca) <=> sort_score(pcb) }.reverse!
246
+ elsif params[:sort_by] == 'enabled_by_default'
247
+ product_content_finder.sort { |pca, pcb| sort_score(pca) <=> sort_score(pcb) }
248
+ else
249
+ product_content_finder
217
250
  end
218
251
  end
219
252
  end
@@ -43,11 +43,11 @@ module Katello
43
43
  collection = scoped_search(*base_args, options)
44
44
  csv_response(collection,
45
45
  [:id, :subscription_id, :name, :cp_id, :organization_id, :sockets, :cores,
46
- :start_date, :end_date, :available, :quantity, :account_number, :contract_number,
46
+ :start_date, :end_date, :consumed, :quantity, :account_number, :contract_number,
47
47
  :support_level, :ram, :stacking_id, :multi_entitlement, :type, :product_id,
48
48
  :unmapped_guest, :virt_only, :virt_who, :upstream?],
49
49
  ['Pool Id Number', 'Subscription Id', 'Name', 'Pool Id', 'Organization Id',
50
- 'Sockets', 'Cores', 'Start Date', 'End Date', 'Available', 'Quantity', 'Account Number',
50
+ 'Sockets', 'Cores', 'Start Date', 'End Date', 'Consumed', 'Quantity', 'Account Number',
51
51
  'Contract Number', 'Support Level', 'RAM', 'Stacking Id', 'Multi Entitlement', 'Type',
52
52
  'Product Id', 'Unmapped Guest', 'Virt Only', 'Requires Virt Who', 'Upstream'])
53
53
  end
@@ -24,7 +24,7 @@ module Katello
24
24
  process_response(:object => @host)
25
25
  end
26
26
 
27
- api :PUT, "/hosts/:host_id/host_collections", N_("Alter a hosts host collections")
27
+ api :PUT, "/hosts/:host_id/host_collections", N_("Alter a host's host collections")
28
28
  param :host_id, :number, :required => true, :desc => N_("The id of the host to alter")
29
29
  param :host_collection_ids, Array, :required => true, :desc => N_("List of host collection ids to update")
30
30
  def host_collections
@@ -35,6 +35,10 @@ module Katello
35
35
  :name => _("Immediate"),
36
36
  :label => ::Katello::RootRepository::DOWNLOAD_IMMEDIATE
37
37
  },
38
+ {
39
+ :name => _("Streamed"),
40
+ :label => SmartProxy::DOWNLOAD_STREAMED
41
+ },
38
42
  {
39
43
  :name => _("Inherit from Repository"),
40
44
  :label => SmartProxy::DOWNLOAD_INHERIT