katello 2.4.5 → 3.0.0.rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (762) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -7
  3. data/app/assets/javascripts/katello/common/index.js +0 -1
  4. data/app/assets/javascripts/katello/common/katello.common.js +4 -8
  5. data/app/assets/javascripts/katello/common/katello.js +0 -10
  6. data/app/assets/javascripts/katello/common/vendor.js +0 -1
  7. data/app/assets/javascripts/katello/hosts/activation_key_edit.js +1 -1
  8. data/app/assets/javascripts/katello/hosts/host_and_hostgroup_edit.js +1 -1
  9. data/app/assets/javascripts/katello/organizations/download_certificate.js +1 -1
  10. data/app/assets/javascripts/katello/providers/provider_redhat.js +1 -1
  11. data/app/assets/javascripts/katello/sync_management/sync_management.js +13 -12
  12. data/app/assets/stylesheets/katello/_overrides.scss +0 -2
  13. data/app/assets/stylesheets/katello/katello.scss +5 -10
  14. data/app/assets/stylesheets/katello/{katello_sprites.css.scss → katello_sprites.scss} +0 -0
  15. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +70 -96
  16. data/app/controllers/katello/api/v2/activation_keys_controller.rb +13 -13
  17. data/app/controllers/katello/api/v2/api_controller.rb +25 -16
  18. data/app/controllers/katello/api/v2/capsule_content_controller.rb +50 -19
  19. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +2 -1
  20. data/app/controllers/katello/api/v2/content_view_filters_controller.rb +1 -5
  21. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +26 -1
  22. data/app/controllers/katello/api/v2/content_views_controller.rb +2 -0
  23. data/app/controllers/katello/api/v2/{docker_images_controller.rb → docker_manifests_controller.rb} +3 -3
  24. data/app/controllers/katello/api/v2/docker_tags_controller.rb +4 -1
  25. data/app/controllers/katello/api/v2/environments_controller.rb +1 -6
  26. data/app/controllers/katello/api/v2/errata_controller.rb +15 -6
  27. data/app/controllers/katello/api/v2/gpg_keys_controller.rb +1 -1
  28. data/app/controllers/katello/api/v2/host_autocomplete_controller.rb +25 -0
  29. data/app/controllers/katello/api/v2/host_collections_controller.rb +61 -58
  30. data/app/controllers/katello/api/v2/{system_errata_controller.rb → host_errata_controller.rb} +25 -17
  31. data/app/controllers/katello/api/v2/host_packages_controller.rb +139 -0
  32. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +89 -0
  33. data/app/controllers/katello/api/v2/{systems_bulk_actions_controller.rb → hosts_bulk_actions_controller.rb} +50 -58
  34. data/app/controllers/katello/api/v2/organizations_controller.rb +2 -2
  35. data/app/controllers/katello/api/v2/ostree_branches_controller.rb +16 -0
  36. data/app/controllers/katello/api/v2/package_groups_controller.rb +0 -5
  37. data/app/controllers/katello/api/v2/packages_controller.rb +0 -9
  38. data/app/controllers/katello/api/v2/ping_controller.rb +0 -1
  39. data/app/controllers/katello/api/v2/products_controller.rb +12 -13
  40. data/app/controllers/katello/api/v2/repositories_controller.rb +72 -13
  41. data/app/controllers/katello/api/v2/repository_sets_controller.rb +5 -5
  42. data/app/controllers/katello/api/v2/subscriptions_controller.rb +28 -78
  43. data/app/controllers/katello/api/v2/sync_controller.rb +1 -1
  44. data/app/controllers/katello/api/v2/sync_plans_controller.rb +19 -2
  45. data/app/controllers/katello/api/v2/systems_controller.rb +32 -185
  46. data/app/controllers/katello/application_controller.rb +0 -2
  47. data/app/controllers/katello/concerns/api/v2/bulk_hosts_extensions.rb +39 -0
  48. data/app/controllers/katello/concerns/api/v2/bulk_systems_extensions.rb +13 -13
  49. data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +7 -0
  50. data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +19 -1
  51. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +12 -9
  52. data/app/controllers/katello/concerns/filtered_auto_complete_search.rb +1 -1
  53. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +2 -2
  54. data/app/controllers/katello/concerns/operatingsystems_controller_extensions.rb +9 -7
  55. data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +66 -0
  56. data/app/controllers/katello/errors_controller.rb +0 -1
  57. data/app/controllers/katello/failed_authentication_controller.rb +0 -1
  58. data/app/controllers/katello/products_controller.rb +3 -1
  59. data/app/controllers/katello/remote_execution_controller.rb +55 -0
  60. data/app/controllers/katello/sync_management_controller.rb +0 -1
  61. data/app/helpers/katello/application_helper.rb +1 -1
  62. data/app/helpers/katello/concerns/foreman_docker/container_steps_helper_extensions.rb +1 -1
  63. data/app/helpers/katello/concerns/smart_proxy_helper_extensions.rb +51 -0
  64. data/app/helpers/katello/errata_mailer_helper.rb +6 -7
  65. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +27 -7
  66. data/app/helpers/katello/katello_form_builder.rb +0 -1
  67. data/app/helpers/katello/katello_url_helper.rb +5 -13
  68. data/app/helpers/katello/providers_helper.rb +6 -3
  69. data/app/helpers/katello/sync_management_helper.rb +1 -1
  70. data/app/lib/actions/candlepin/candlepin_listening_service.rb +1 -1
  71. data/app/lib/actions/candlepin/consumer/attach_subscription.rb +19 -0
  72. data/app/lib/actions/candlepin/consumer/auto_attach_subscriptions.rb +0 -4
  73. data/app/lib/actions/candlepin/consumer/create.rb +4 -29
  74. data/app/lib/actions/candlepin/consumer/destroy.rb +2 -0
  75. data/app/lib/actions/candlepin/consumer/hypervisors.rb +15 -0
  76. data/app/lib/actions/candlepin/consumer/remove_subscription.rb +18 -0
  77. data/app/lib/actions/candlepin/consumer/update.rb +4 -21
  78. data/app/lib/actions/candlepin/import_pool_handler.rb +7 -6
  79. data/app/lib/actions/candlepin/listen_on_candlepin_events.rb +4 -4
  80. data/app/lib/actions/candlepin/product/delete_pools.rb +1 -1
  81. data/app/lib/actions/katello/capsule_content/configure_capsule.rb +3 -3
  82. data/app/lib/actions/katello/capsule_content/create_or_update.rb +57 -0
  83. data/app/lib/actions/katello/capsule_content/remove_unneeded_repos.rb +19 -0
  84. data/app/lib/actions/katello/capsule_content/sync.rb +24 -7
  85. data/app/lib/actions/katello/content_view/capsule_generate_and_sync.rb +1 -3
  86. data/app/lib/actions/katello/content_view/errata_mail.rb +7 -1
  87. data/app/lib/actions/katello/content_view/incremental_updates.rb +4 -3
  88. data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +2 -2
  89. data/app/lib/actions/katello/content_view/promote.rb +1 -1
  90. data/app/lib/actions/katello/content_view/remove.rb +1 -1
  91. data/app/lib/actions/katello/content_view_environment/destroy.rb +1 -1
  92. data/app/lib/actions/katello/content_view_puppet_environment/clone.rb +1 -1
  93. data/app/lib/actions/katello/content_view_puppet_environment/create.rb +0 -1
  94. data/app/lib/actions/katello/content_view_version/export.rb +43 -0
  95. data/app/lib/actions/katello/host/attach_subscriptions.rb +46 -0
  96. data/app/lib/actions/katello/{system → host}/auto_attach_subscriptions.rb +8 -4
  97. data/app/lib/actions/katello/host/destroy.rb +57 -0
  98. data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +30 -0
  99. data/app/lib/actions/katello/{system → host}/erratum/install.rb +5 -5
  100. data/app/lib/actions/katello/host/generate_applicability.rb +24 -0
  101. data/app/lib/actions/katello/host/hypervisors.rb +22 -0
  102. data/app/lib/actions/katello/host/hypervisors_update.rb +67 -0
  103. data/app/lib/actions/katello/{system → host}/package/install.rb +5 -5
  104. data/app/lib/actions/katello/{system → host}/package/remove.rb +4 -4
  105. data/app/lib/actions/katello/{system → host}/package/update.rb +5 -5
  106. data/app/lib/actions/katello/{system → host}/package_group/install.rb +5 -5
  107. data/app/lib/actions/katello/{system → host}/package_group/remove.rb +4 -4
  108. data/app/lib/actions/katello/host/register.rb +126 -0
  109. data/app/lib/actions/katello/host/remove_subscriptions.rb +35 -0
  110. data/app/lib/actions/katello/host/unregister.rb +17 -0
  111. data/app/lib/actions/katello/host/update.rb +54 -0
  112. data/app/lib/actions/katello/host/update_content_view.rb +22 -0
  113. data/app/lib/actions/katello/host/upload_package_profile.rb +36 -0
  114. data/app/lib/actions/katello/organization/destroy.rb +1 -1
  115. data/app/lib/actions/katello/product/create.rb +5 -3
  116. data/app/lib/actions/katello/product/reindex_subscriptions.rb +25 -0
  117. data/app/lib/actions/katello/repository/capsule_generate_and_sync.rb +1 -3
  118. data/app/lib/actions/katello/repository/clone_docker_content.rb +1 -1
  119. data/app/lib/actions/katello/repository/clone_ostree_content.rb +17 -0
  120. data/app/lib/actions/katello/repository/clone_to_environment.rb +3 -1
  121. data/app/lib/actions/katello/repository/clone_to_version.rb +3 -1
  122. data/app/lib/actions/katello/repository/create.rb +7 -4
  123. data/app/lib/actions/katello/repository/errata_mail.rb +11 -3
  124. data/app/lib/actions/katello/repository/export.rb +73 -0
  125. data/app/lib/actions/katello/repository/filtered_index_content.rb +1 -2
  126. data/app/lib/actions/katello/repository/finish_upload.rb +1 -3
  127. data/app/lib/actions/katello/repository/import_upload.rb +1 -0
  128. data/app/lib/actions/katello/repository/incremental_import.rb +61 -0
  129. data/app/lib/actions/katello/repository/index_content.rb +2 -0
  130. data/app/lib/actions/katello/repository/metadata_generate.rb +19 -11
  131. data/app/lib/actions/katello/repository/refresh_repostiory.rb +14 -0
  132. data/app/lib/actions/katello/repository/remove_content.rb +1 -1
  133. data/app/lib/actions/katello/repository/sync.rb +23 -12
  134. data/app/lib/actions/katello/repository/update.rb +7 -22
  135. data/app/lib/actions/katello/repository/update_media.rb +3 -2
  136. data/app/lib/actions/katello/repository/upload_errata.rb +38 -0
  137. data/app/lib/actions/katello/repository/upload_files.rb +16 -6
  138. data/app/lib/actions/katello/subscription/subscribe.rb +1 -1
  139. data/app/lib/actions/katello/system/destroy.rb +1 -20
  140. data/app/lib/actions/katello/system/reassign.rb +3 -12
  141. data/app/lib/actions/middleware/backend_services_check.rb +8 -2
  142. data/app/lib/actions/middleware/execute_if_contents_changed.rb +24 -0
  143. data/app/lib/actions/middleware/remote_action.rb +1 -8
  144. data/app/lib/actions/pulp/abstract.rb +16 -4
  145. data/app/lib/actions/pulp/abstract_async_task.rb +14 -15
  146. data/app/lib/actions/pulp/consumer/create.rb +2 -2
  147. data/app/lib/actions/pulp/consumer/generate_applicability.rb +1 -1
  148. data/app/lib/actions/pulp/consumer/sync_capsule.rb +20 -0
  149. data/app/lib/actions/pulp/expect_one_task.rb +1 -1
  150. data/app/lib/actions/pulp/repository/associate_distributor.rb +2 -1
  151. data/app/lib/actions/pulp/repository/associate_importer.rb +20 -0
  152. data/app/lib/actions/pulp/repository/{remove_docker_image.rb → copy_docker_manifest.rb} +2 -2
  153. data/app/lib/actions/pulp/repository/copy_docker_tag.rb +3 -9
  154. data/app/lib/actions/pulp/repository/{copy_docker_image.rb → copy_ostree_branch.rb} +2 -2
  155. data/app/lib/actions/pulp/repository/create.rb +80 -27
  156. data/app/lib/actions/pulp/repository/destroy.rb +1 -0
  157. data/app/lib/actions/pulp/repository/distributor_publish.rb +4 -0
  158. data/app/lib/actions/pulp/repository/import_upload.rb +2 -1
  159. data/app/lib/actions/pulp/repository/presenters/abstract_sync_presenter.rb +0 -3
  160. data/app/lib/actions/pulp/repository/presenters/docker_presenter.rb +2 -2
  161. data/app/lib/actions/pulp/repository/presenters/ostree_presenter.rb +78 -0
  162. data/app/lib/actions/pulp/repository/presenters/yum_presenter.rb +3 -2
  163. data/app/lib/actions/pulp/repository/purge_empty_package_groups.rb +1 -1
  164. data/app/lib/actions/pulp/repository/refresh.rb +48 -8
  165. data/app/lib/actions/pulp/repository/refresh_distributor.rb +2 -1
  166. data/app/lib/actions/pulp/repository/regenerate_applicability.rb +3 -0
  167. data/app/lib/actions/pulp/repository/remove_docker_manifest.rb +11 -0
  168. data/app/lib/actions/pulp/repository/sync.rb +46 -1
  169. data/app/lib/actions/pulp/repository/update_importer.rb +2 -1
  170. data/app/lib/actions/pulp/repository_group/create.rb +31 -0
  171. data/app/lib/actions/pulp/repository_group/delete.rb +17 -0
  172. data/app/lib/actions/pulp/repository_group/export.rb +51 -0
  173. data/app/lib/katello/api/v2/error_handling.rb +1 -2
  174. data/app/lib/katello/bulk_actions.rb +10 -11
  175. data/app/lib/katello/capsule_content.rb +85 -4
  176. data/app/lib/katello/concerns/renderer_extensions.rb +1 -1
  177. data/app/lib/katello/lazy_accessor.rb +0 -3
  178. data/app/lib/katello/repo_discovery.rb +1 -1
  179. data/app/lib/katello/resources/candlepin.rb +28 -51
  180. data/app/lib/katello/resources/cdn.rb +4 -0
  181. data/app/lib/katello/util/cdn_var_substitutor.rb +9 -2
  182. data/app/lib/katello/util/data.rb +1 -1
  183. data/app/lib/katello/util/filter_clause_generator.rb +1 -1
  184. data/app/lib/katello/util/package_clause_generator.rb +1 -1
  185. data/app/lib/katello/validators/content_view_erratum_filter_rule_validator.rb +1 -1
  186. data/app/mailers/katello/errata_mailer.rb +7 -3
  187. data/app/models/katello/activation_key.rb +8 -15
  188. data/app/models/katello/authorization/content_view.rb +2 -10
  189. data/app/models/katello/authorization/content_view_history.rb +0 -2
  190. data/app/models/katello/authorization/product.rb +1 -1
  191. data/app/models/katello/authorization/repository.rb +4 -26
  192. data/app/models/katello/candlepin/content.rb +35 -20
  193. data/app/models/katello/concerns/container_extensions.rb +2 -2
  194. data/app/models/katello/concerns/content_facet_host_extensions.rb +50 -0
  195. data/app/models/katello/concerns/environment_extensions.rb +4 -3
  196. data/app/models/katello/concerns/host_managed_extensions.rb +53 -17
  197. data/app/models/katello/concerns/hostgroup_extensions.rb +5 -3
  198. data/app/models/katello/concerns/location_extensions.rb +1 -1
  199. data/app/models/katello/concerns/medium_extensions.rb +3 -4
  200. data/app/models/katello/concerns/organization_extensions.rb +5 -4
  201. data/app/models/katello/concerns/pulp_database_unit.rb +4 -5
  202. data/app/models/katello/concerns/redhat_extensions.rb +4 -8
  203. data/app/models/katello/concerns/smart_proxy_extensions.rb +13 -1
  204. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +38 -0
  205. data/app/models/katello/concerns/user_extensions.rb +6 -8
  206. data/app/models/katello/content_facet_erratum.rb +9 -0
  207. data/app/models/katello/content_facet_repository.rb +8 -0
  208. data/app/models/katello/content_view.rb +29 -14
  209. data/app/models/katello/content_view_environment.rb +3 -3
  210. data/app/models/katello/content_view_erratum_filter.rb +1 -1
  211. data/app/models/katello/content_view_erratum_filter_rule.rb +16 -0
  212. data/app/models/katello/content_view_history.rb +3 -3
  213. data/app/models/katello/content_view_package_filter.rb +1 -1
  214. data/app/models/katello/content_view_puppet_environment.rb +2 -2
  215. data/app/models/katello/content_view_puppet_module.rb +1 -1
  216. data/app/models/katello/content_view_repository.rb +4 -1
  217. data/app/models/katello/content_view_version.rb +23 -9
  218. data/app/models/katello/content_view_version_component.rb +2 -2
  219. data/app/models/katello/docker_manifest.rb +25 -0
  220. data/app/models/katello/docker_tag.rb +4 -15
  221. data/app/models/katello/errata_status.rb +61 -0
  222. data/app/models/katello/erratum.rb +29 -20
  223. data/app/models/katello/erratum_bugzilla.rb +1 -1
  224. data/app/models/katello/erratum_cve.rb +1 -1
  225. data/app/models/katello/erratum_package.rb +1 -1
  226. data/app/models/katello/ext/label_from_name.rb +1 -1
  227. data/app/models/katello/glue/candlepin/candlepin_object.rb +1 -1
  228. data/app/models/katello/glue/candlepin/consumer.rb +2 -119
  229. data/app/models/katello/glue/candlepin/content.rb +1 -0
  230. data/app/models/katello/glue/candlepin/pool.rb +4 -5
  231. data/app/models/katello/glue/candlepin/product.rb +12 -4
  232. data/app/models/katello/glue/candlepin/subscription.rb +2 -2
  233. data/app/models/katello/glue/provider.rb +1 -3
  234. data/app/models/katello/glue/pulp/consumer.rb +1 -23
  235. data/app/models/katello/glue/pulp/repo.rb +188 -92
  236. data/app/models/katello/glue/pulp/repos.rb +10 -15
  237. data/app/models/katello/host/content_facet.rb +118 -0
  238. data/app/models/katello/host/subscription_facet.rb +109 -0
  239. data/app/models/katello/host_collection.rb +44 -33
  240. data/app/models/katello/host_collection_hosts.rb +21 -0
  241. data/app/models/katello/host_installed_package.rb +8 -0
  242. data/app/models/katello/installed_package.rb +9 -0
  243. data/app/models/katello/job.rb +1 -1
  244. data/app/models/katello/kt_environment.rb +15 -12
  245. data/app/models/katello/ostree_branch.rb +29 -0
  246. data/app/models/katello/ping.rb +14 -4
  247. data/app/models/katello/pool.rb +5 -5
  248. data/app/models/katello/pool_with_quantities.rb +11 -0
  249. data/app/models/katello/product.rb +8 -10
  250. data/app/models/katello/provider.rb +1 -3
  251. data/app/models/katello/pulp_sync_status.rb +1 -1
  252. data/app/models/katello/pulp_task_status.rb +1 -1
  253. data/app/models/katello/repository.rb +82 -48
  254. data/app/models/katello/repository_docker_manifest.rb +9 -0
  255. data/app/models/katello/repository_ostree_branch.rb +9 -0
  256. data/app/models/katello/rhsm_fact_importer.rb +5 -2
  257. data/app/models/katello/rhsm_fact_parser.rb +39 -5
  258. data/app/models/katello/rpm.rb +1 -1
  259. data/app/models/katello/subscription_facet_activation_key.rb +8 -0
  260. data/app/models/katello/subscription_status.rb +56 -0
  261. data/app/models/katello/system.rb +19 -155
  262. data/app/models/katello/task_status.rb +2 -2
  263. data/app/models/setting/katello.rb +12 -1
  264. data/app/overrides/add_about_page.rb +3 -3
  265. data/app/overrides/add_activation_keys_input.rb +4 -4
  266. data/app/overrides/add_organization_attributes.rb +2 -2
  267. data/app/overrides/add_smart_proxy_form.rb +2 -2
  268. data/app/overrides/add_subscription_status.rb +1 -8
  269. data/app/overrides/disable_turbolinks_on_proxies_index.rb +5 -0
  270. data/app/overrides/override_taxonomy_actions.rb +1 -1
  271. data/app/presenters/katello/activation_key_subscription_presenter.rb +2 -2
  272. data/app/presenters/katello/host_subscription_presenter.rb +11 -0
  273. data/app/services/cert/certs.rb +19 -0
  274. data/app/services/{client/cert.rb → cert/rhsm_client.rb} +3 -3
  275. data/app/services/katello/authentication/client_authentication.rb +6 -3
  276. data/app/services/katello/candlepin/consumer.rb +116 -0
  277. data/app/services/katello/proxy_status/pulp.rb +52 -0
  278. data/app/services/katello/proxy_status/pulp_node.rb +10 -0
  279. data/app/services/katello/pulp/consumer.rb +75 -0
  280. data/app/services/katello/pulp/consumer_group.rb +95 -0
  281. data/app/services/katello/pulp/content_counts_calculator.rb +54 -0
  282. data/app/services/katello/pulp/docker_manifest.rb +7 -0
  283. data/app/services/katello/pulp/ostree_branch.rb +7 -0
  284. data/app/services/katello/pulp/server.rb +37 -0
  285. data/app/services/katello/pulp/simple_package.rb +20 -0
  286. data/app/services/katello/puppet_class_importer_extensions.rb +0 -2
  287. data/app/services/katello/repository_type.rb +35 -0
  288. data/app/services/katello/repository_type_manager.rb +33 -0
  289. data/app/views/dashboard/_content_views_widget.html.erb +1 -1
  290. data/app/views/dashboard/_errata_widget.html.erb +4 -4
  291. data/app/views/dashboard/_host_collection_widget.html.erb +1 -1
  292. data/app/views/dashboard/_subscription_status_widget.html.erb +1 -1
  293. data/app/views/foreman/job_templates/install_errata.erb +18 -0
  294. data/app/views/foreman/job_templates/install_group.erb +13 -0
  295. data/app/views/foreman/job_templates/install_package.erb +13 -0
  296. data/app/views/foreman/job_templates/remove_group.erb +13 -0
  297. data/app/views/foreman/job_templates/remove_package.erb +13 -0
  298. data/app/views/foreman/job_templates/update_group.erb +13 -0
  299. data/app/views/foreman/job_templates/update_package.erb +13 -0
  300. data/app/views/foreman/smart_proxies/_content_sync.html.erb +35 -0
  301. data/app/views/foreman/smart_proxies/_content_tab.html.erb +44 -0
  302. data/app/views/foreman/smart_proxies/show.html.erb +7 -0
  303. data/app/views/foreman_docker/containers/steps/_katello_container.html.erb +2 -2
  304. data/app/views/katello/api/v2/capsule_content/lifecycle_environments.json.rabl +5 -3
  305. data/app/views/katello/api/v2/capsule_content/sync_status.json.rabl +48 -0
  306. data/app/views/katello/api/v2/content_facet/base.json.rabl +18 -0
  307. data/app/views/katello/api/v2/content_facet/base_with_root.json.rabl +3 -0
  308. data/app/views/katello/api/v2/content_facet/show.json.rabl +25 -0
  309. data/app/views/katello/api/v2/content_view_filter_rules/show.json.rabl +1 -0
  310. data/app/views/katello/api/v2/content_view_filters/base.json.rabl +41 -0
  311. data/app/views/katello/api/v2/content_view_filters/index.json.rabl +5 -1
  312. data/app/views/katello/api/v2/content_view_filters/show.json.rabl +17 -30
  313. data/app/views/katello/api/v2/content_view_versions/base.json.rabl +2 -1
  314. data/app/views/katello/api/v2/content_views/{_content_view.json.rabl → base.json.rabl} +0 -0
  315. data/app/views/katello/api/v2/content_views/copy.json.rabl +1 -1
  316. data/app/views/katello/api/v2/content_views/index.json.rabl +5 -1
  317. data/app/views/katello/api/v2/content_views/show.json.rabl +1 -1
  318. data/app/views/katello/api/v2/docker_manifests/index.json.rabl +7 -0
  319. data/app/views/katello/api/v2/{docker_images → docker_manifests}/show.json.rabl +2 -2
  320. data/app/views/katello/api/v2/docker_tags/_base.json.rabl +6 -1
  321. data/app/views/katello/api/v2/docker_tags/show.json.rabl +2 -2
  322. data/app/views/katello/api/v2/environments/show.json.rabl +1 -0
  323. data/app/views/katello/api/v2/errata/show.json.rabl +2 -2
  324. data/app/views/katello/api/v2/host_collections/_host_collection.json.rabl +1 -2
  325. data/app/views/katello/api/v2/{system_errata → host_errata}/index.json.rabl +0 -0
  326. data/app/views/katello/api/v2/{system_errata → host_errata}/show.json.rabl +0 -0
  327. data/app/views/katello/api/v2/{system_errata → host_errata}/system_task.json.rabl +0 -0
  328. data/app/views/katello/api/v2/host_packages/base.json.rabl +4 -0
  329. data/app/views/katello/api/v2/{docker_images → host_packages}/index.json.rabl +1 -1
  330. data/app/views/katello/api/v2/host_subscriptions/events.json.rabl +7 -0
  331. data/app/views/katello/api/v2/host_subscriptions/index.json.rabl +8 -0
  332. data/app/views/katello/api/v2/hostgroups_extensions/show.json.rabl +3 -0
  333. data/app/views/katello/api/v2/hosts/base.json.rabl +7 -0
  334. data/app/views/katello/api/v2/hosts/index.json.rabl +7 -0
  335. data/app/views/katello/api/v2/hosts/show.json.rabl +5 -0
  336. data/app/views/katello/api/v2/hosts_bulk_actions/available_incremental_updates.json.rabl +21 -0
  337. data/app/views/katello/api/v2/hosts_bulk_actions/erratum.json.rabl +7 -0
  338. data/app/views/katello/api/v2/hosts_bulk_actions/installable_errata.json.rabl +7 -0
  339. data/app/views/katello/api/v2/hosts_bulk_actions/job.json.rabl +1 -0
  340. data/app/views/katello/api/v2/organizations/show.json.rabl +1 -1
  341. data/app/views/katello/api/v2/ostree_branches/index.json.rabl +7 -0
  342. data/app/views/katello/api/v2/ostree_branches/show.json.rabl +4 -0
  343. data/app/views/katello/api/v2/ping/server_status.json.rabl +0 -1
  344. data/app/views/katello/api/v2/ping/show.json.rabl +6 -1
  345. data/app/views/katello/api/v2/products/base.json.rabl +18 -1
  346. data/app/views/katello/api/v2/products/show.json.rabl +9 -1
  347. data/app/views/katello/api/v2/repositories/base.json.rabl +3 -2
  348. data/app/views/katello/api/v2/repositories/show.json.rabl +3 -0
  349. data/app/views/katello/api/v2/subscription_facet/base.json.rabl +1 -0
  350. data/app/views/katello/api/v2/subscription_facet/base_with_root.json.rabl +9 -0
  351. data/app/views/katello/api/v2/subscription_facet/show.json.rabl +32 -0
  352. data/app/views/katello/api/v2/subscriptions/show.json.rabl +1 -7
  353. data/app/views/katello/api/v2/systems/base.json.rabl +8 -4
  354. data/app/views/katello/api/v2/systems/show.json.rabl +2 -2
  355. data/app/views/katello/api/v2/systems_bulk_actions/erratum.json.rabl +2 -2
  356. data/app/views/katello/errata_mailer/_host_dashboard.html.erb +3 -3
  357. data/app/views/katello/errata_mailer/host_errata.html.erb +2 -2
  358. data/app/views/katello/errata_mailer/host_errata.text.erb +1 -1
  359. data/app/views/katello/errata_mailer/promote_errata.html.erb +1 -1
  360. data/app/views/katello/errata_mailer/promote_errata.text.erb +3 -3
  361. data/app/views/katello/layouts/foreman_with_bastion.html.erb +5 -0
  362. data/app/views/katello/providers/redhat/_repo_sets.html.erb +1 -1
  363. data/app/{overrides/foreman → views/overrides}/about/_installed_packages.html.erb +0 -0
  364. data/app/{overrides/foreman → views/overrides}/about/_support_documentation.html.erb +0 -0
  365. data/app/{overrides/foreman → views/overrides}/about/_system_status.html.erb +0 -0
  366. data/app/views/overrides/activation_keys/_host_environment_select.html.erb +43 -0
  367. data/app/{overrides/foreman → views/overrides}/activation_keys/_host_tab.html.erb +0 -0
  368. data/app/{overrides/foreman → views/overrides}/activation_keys/_host_tab_pane.html.erb +0 -0
  369. data/app/views/overrides/hosts/_subscription_link.html.erb +6 -0
  370. data/app/{overrides/foreman → views/overrides}/organizations/_edit_override.html.erb +0 -0
  371. data/app/{overrides/foreman → views/overrides}/organizations/_step_1_override.html.erb +0 -0
  372. data/app/{overrides/foreman → views/overrides}/smart_proxies/_environment_tab.html.erb +1 -1
  373. data/app/{overrides/foreman → views/overrides}/smart_proxies/_environment_tab_pane.html.erb +1 -1
  374. data/app/{overrides/foreman → views/overrides}/taxonomies/_action_buttons.html.erb +0 -0
  375. data/app/views/smart_proxies/_disk_usage.html.erb +15 -0
  376. data/app/views/smart_proxies/plugins/_pulp.html.erb +7 -0
  377. data/app/views/smart_proxies/plugins/_pulp_node.html.erb +7 -0
  378. data/app/views/smart_proxies/pulp_status.html.erb +24 -0
  379. data/app/views/smart_proxies/pulp_storage.html.erb +1 -0
  380. data/app/views/smart_proxies/show/_storage.html.erb +4 -0
  381. data/config/initializers/runcible.rb +3 -12
  382. data/config/katello.yaml.example +1 -0
  383. data/config/routes.rb +4 -0
  384. data/config/routes/api/rhsm.rb +2 -2
  385. data/config/routes/api/v2.rb +24 -44
  386. data/config/routes/overrides.rb +67 -1
  387. data/db/migrate/20131014135042_katello_tables.rb +64 -64
  388. data/db/migrate/20131014225132_add_users_fields.rb +1 -1
  389. data/db/migrate/20131120225132_add_organization_fields.rb +1 -1
  390. data/db/migrate/20131216212621_add_cp_id_to_katello_activation_keys.rb +2 -2
  391. data/db/migrate/20140110000001_update_environments_add_katello_id.rb +1 -1
  392. data/db/migrate/20140117160939_refactor_content_views.rb +5 -5
  393. data/db/migrate/20140206200439_create_content_view_puppet_modules.rb +3 -3
  394. data/db/migrate/20140212131812_create_content_view_package_filter_rules.rb +4 -4
  395. data/db/migrate/20140212143454_create_content_view_package_group_filter_rules.rb +1 -1
  396. data/db/migrate/20140212143642_create_content_view_erratum_filter_rules.rb +4 -4
  397. data/db/migrate/20140217160132_create_content_view_history.rb +3 -3
  398. data/db/migrate/20140222022712_remove_provider_discovery.rb +1 -1
  399. data/db/migrate/20140305101813_allow_null_for_repository_content_id.rb +2 -1
  400. data/db/migrate/20140306132108_create_content_view_puppet_environments.rb +2 -2
  401. data/db/migrate/20140310102051_repository_add_checksum_type.rb +2 -1
  402. data/db/migrate/20140429193743_add_release_version_to_activation_keys.rb +1 -1
  403. data/db/migrate/20140502164009_rename_system_groups_to_host_collections.rb +0 -3
  404. data/db/migrate/20140610170142_add_uuid_to_content_view_package_group_filter_rule.rb +2 -1
  405. data/db/migrate/20140617100300_add_description_to_content_view_filter_rules.rb +1 -1
  406. data/db/migrate/20140624184401_remove_label_from_activation_key.rb +1 -1
  407. data/db/migrate/20140707203534_location_add_katello_default.rb +1 -1
  408. data/db/migrate/20140811141742_remove_delayed_jobs.rb +2 -2
  409. data/db/migrate/20140930170628_add_errata.rb +15 -13
  410. data/db/migrate/20141003210742_add_docker_container_registry_url_to_providers.rb +1 -1
  411. data/db/migrate/20141015173220_add_docker_image_fields.rb +1 -1
  412. data/db/migrate/20141209103005_disown_foreman_templates.rb +1 -1
  413. data/db/migrate/20141210173220_create_docker_tables.rb +3 -3
  414. data/db/migrate/20150114225023_add_upstream_name_to_repository.rb +1 -1
  415. data/db/migrate/20150119153452_update_promote_errata_email_description.rb +2 -2
  416. data/db/migrate/20150224083608_remove_docker_registry_url.rb +1 -1
  417. data/db/migrate/20150513034751_add_ostree_branches.rb +25 -0
  418. data/db/migrate/20150602153753_remove_help_tips.rb +1 -1
  419. data/db/migrate/20150602153754_remove_search_histories.rb +2 -2
  420. data/db/migrate/20150602153755_remove_search_favorites.rb +2 -2
  421. data/db/migrate/20150602153757_remove_notices.rb +2 -2
  422. data/db/migrate/20150603045418_remove_user_fields.rb +1 -1
  423. data/db/migrate/20150606021722_create_puppet_modules.rb +6 -6
  424. data/db/migrate/20150613134559_add_rpm.rb +12 -12
  425. data/db/migrate/20150623135424_create_package_groups.rb +3 -3
  426. data/db/migrate/20150717142559_add_distributions_to_repository.rb +5 -5
  427. data/db/migrate/20150813185339_create_subscriptions.rb +6 -6
  428. data/db/migrate/20150826165942_add_subscription_facet.rb +30 -0
  429. data/db/migrate/20150826170004_add_content_facet.rb +64 -0
  430. data/db/migrate/20150901213759_remove_distributors.rb +3 -3
  431. data/db/migrate/20150908222711_drop_marketing_engineering_products.rb +1 -1
  432. data/db/migrate/20150928221648_update_location_katello_default.rb +9 -0
  433. data/db/migrate/20150930183738_migrate_content_hosts.rb +337 -0
  434. data/db/migrate/20151014144004_host_collection_to_hosts.rb +93 -0
  435. data/db/migrate/20151203230940_add_date_type_to_content_view_erratum_filter_rules.rb +7 -0
  436. data/db/migrate/20151219152536_rename_index_repository_errata.rb +10 -0
  437. data/db/migrate/20151219203225_rename_index_repository_puppet_module.rb +10 -0
  438. data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +9 -0
  439. data/db/migrate/20160129192548_add_docker_v2_schema.rb +39 -0
  440. data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +9 -0
  441. data/db/migrate/20160203195736_remove_docker_image_schema.rb +39 -0
  442. data/db/migrate/20160211134035_remove_system_errata.rb +20 -0
  443. data/db/migrate/20160222143432_move_system_description_to_host.rb +31 -0
  444. data/db/migrate/20160224155909_add_registered_at_to_subscription_facet.rb +9 -0
  445. data/db/migrate/20160301070319_add_version_ostree_branches.rb +42 -0
  446. data/db/seeds.d/101-locations.rb +12 -0
  447. data/db/seeds.d/102-organizations.rb +21 -0
  448. data/db/seeds.d/103-provisioning_templates.rb +42 -0
  449. data/db/seeds.d/104-proxy.rb +25 -0
  450. data/db/seeds.d/105-roles_permissions.rb +71 -0
  451. data/db/seeds.d/106-mail_notifications.rb +36 -0
  452. data/db/seeds.d/107-enable_dynflow.rb +9 -0
  453. data/db/seeds.d/108-ensure_sync_notification.rb +11 -0
  454. data/db/seeds.d/75-job_templates.rb +10 -0
  455. data/engines/bastion_katello/README.md +1 -1
  456. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.controller.js +1 -0
  457. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-add-host-collections.controller.js +1 -1
  458. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +1 -1
  459. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-details.controller.js +14 -7
  460. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-host-collections.controller.js +1 -1
  461. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-product-details.controller.js +20 -30
  462. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +2 -2
  463. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-details.html +98 -95
  464. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-host-collections-table.html +1 -1
  465. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-info.html +1 -1
  466. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys-table-full.html +1 -1
  467. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +5 -0
  468. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +14 -2
  469. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +200 -0
  470. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.factory.js +20 -0
  471. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.module.js +12 -0
  472. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.routes.js +29 -0
  473. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/sync-state.service.js +25 -0
  474. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/api-error-handler.service.js +41 -0
  475. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/common.module.js +11 -0
  476. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/registration.html +3 -0
  477. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-environment.controller.js +6 -5
  478. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-errata.controller.js +35 -7
  479. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-host-collections.controller.js +5 -5
  480. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-packages.controller.js +53 -7
  481. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-subscriptions.controller.js +4 -4
  482. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action.controller.js +9 -12
  483. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-environment.html +1 -1
  484. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-errata.html +31 -10
  485. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-host-collections.html +4 -4
  486. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-packages.html +72 -26
  487. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-subscriptions.html +1 -1
  488. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions.html +5 -5
  489. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/errata-content-hosts.html +2 -2
  490. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-events.controller.js +4 -6
  491. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host.factory.js +0 -37
  492. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +13 -84
  493. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +30 -5
  494. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.module.js +24 -22
  495. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-errata.controller.js +63 -25
  496. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +53 -34
  497. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-errata.html +118 -92
  498. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +62 -77
  499. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-host-collections.controller.js +21 -17
  500. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-add-subscriptions.controller.js +8 -9
  501. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-base-subscriptions.controller.js +3 -3
  502. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +24 -51
  503. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +61 -23
  504. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-host-collections.controller.js +20 -18
  505. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-subscriptions.controller.js +11 -8
  506. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-add-subscriptions.html +2 -2
  507. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-details.html +97 -94
  508. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-events.html +5 -1
  509. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +69 -111
  510. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-products.html +48 -42
  511. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +11 -16
  512. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions-list.html +2 -2
  513. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +75 -68
  514. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-tasks.html +2 -2
  515. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/host-collections-table.html +5 -5
  516. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/host-collections.html +2 -2
  517. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts-table-collapsed.html +6 -6
  518. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts-table-full.html +17 -27
  519. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +2 -2
  520. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.controller.js +1 -0
  521. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/content-views.routes.js +26 -0
  522. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-available-ostree-repositories.controller.js +39 -0
  523. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +15 -4
  524. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-ostree-repositories-list.controller.js +37 -0
  525. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/available-errata-filter.controller.js +6 -0
  526. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/date-type-errata-filter.controller.js +4 -0
  527. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/errata-filter.controller.js +2 -1
  528. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/date-type-errata.html +16 -0
  529. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/errata-filter-details.html +4 -0
  530. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/filters/views/filter-repositories.html +17 -0
  531. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/histories/content-view-history.controller.js +2 -0
  532. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/puppet-modules/content-view-puppet-modules.controller.js +6 -1
  533. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-details.html +138 -129
  534. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-docker-repositories.html +2 -2
  535. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-ostree-repositories.html +118 -0
  536. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-publish.html +2 -1
  537. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/views/content-view-versions.html +5 -2
  538. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-version-content.controller.js +12 -2
  539. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/content-view-versions.module.js +2 -1
  540. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-errata.html +1 -1
  541. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-ostree-branches.html +35 -0
  542. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version-puppet-modules.html +2 -0
  543. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/versions/views/content-view-version.html +6 -0
  544. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-manifests/docker-manifest.factory.js +23 -0
  545. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-manifests/docker-manifests.module.js +14 -0
  546. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/docker-tags-details.controller.js +18 -6
  547. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/details/views/docker-tags-details.html +54 -51
  548. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-tags/docker-tags.controller.js +1 -0
  549. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/content.service.js +5 -0
  550. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-errata.html +1 -1
  551. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/details/views/environment-ostree.html +37 -0
  552. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.module.js +1 -0
  553. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/environments.routes.js +7 -0
  554. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/environments/views/environments.html +15 -12
  555. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +4 -6
  556. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/errata-details.controller.js +12 -5
  557. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details-content-hosts.html +2 -2
  558. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/details/views/errata-details.html +39 -36
  559. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.controller.js +1 -0
  560. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.module.js +1 -0
  561. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/errata.routes.js +3 -3
  562. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/erratum.factory.js +1 -1
  563. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata-table-full.html +2 -2
  564. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +1 -1
  565. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details.controller.js +7 -2
  566. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +46 -43
  567. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.controller.js +1 -0
  568. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.module.js +1 -0
  569. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +3 -3
  570. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/{host-collection-add-content-hosts.controller.js → host-collection-add-hosts.controller.js} +16 -16
  571. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +11 -5
  572. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-hosts.controller.js +70 -0
  573. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-actions.html +4 -4
  574. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-add-hosts.html +54 -0
  575. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-details.html +79 -76
  576. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-hosts-list.html +53 -0
  577. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/{host-collection-content-hosts.html → host-collection-hosts.html} +5 -5
  578. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +9 -9
  579. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collection.factory.js +2 -3
  580. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collections.controller.js +8 -2
  581. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/host-collections.module.js +11 -10
  582. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/new/host-collection-form.controller.js +1 -1
  583. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/new/views/host-collection-new-form.html +7 -7
  584. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/views/host-collections-table-full.html +4 -4
  585. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/{content-hosts/content-host-erratum.factory.js → hosts/host-erratum.factory.js} +3 -3
  586. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/{content-hosts/content-host-package.factory.js → hosts/host-package.factory.js} +5 -4
  587. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-subscription.factory.js +21 -0
  588. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host.factory.js +52 -0
  589. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/hosts.module.js +12 -0
  590. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +6 -6
  591. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/de.po +16 -16
  592. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/es.po +16 -16
  593. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/fr.po +16 -16
  594. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/it.po +17 -17
  595. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ja.po +16 -16
  596. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ko.po +16 -16
  597. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/pt_BR.po +16 -16
  598. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/ru.po +16 -16
  599. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/locale/zh_CN.po +17 -17
  600. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/translations.js +10 -10
  601. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/zanata.xml +19 -0
  602. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branch.factory.js +27 -0
  603. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/ostree-branches/ostree-branches.module.js +11 -0
  604. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/package-details.controller.js +12 -5
  605. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/details/views/packages-details.html +46 -43
  606. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.controller.js +1 -0
  607. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/packages.module.js +2 -1
  608. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-action-sync-plan.controller.js +12 -8
  609. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-action.controller.js +11 -8
  610. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/views/bulk-actions.html +1 -1
  611. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details-info.controller.js +3 -0
  612. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-details.controller.js +14 -4
  613. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/product-repositories.controller.js +4 -2
  614. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-details.html +67 -64
  615. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-info.html +3 -3
  616. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/views/product-repositories.html +13 -4
  617. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/new/product-form.controller.js +3 -4
  618. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +7 -3
  619. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.module.js +9 -3
  620. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/views/products.html +0 -10
  621. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/puppet-modules-details.controller.js +14 -5
  622. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/details/views/puppet-modules-details.html +39 -36
  623. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.controller.js +1 -0
  624. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.module.js +1 -1
  625. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/repository-details-info.controller.js +21 -2
  626. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/repository-details-manage-content.controller.js +7 -19
  627. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-info.html +308 -269
  628. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/{repository-manage-docker-images.html → repository-manage-docker-manifests.html} +11 -11
  629. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/details/views/repository-manage-ostree-branches.html +60 -0
  630. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/download-policy.service.js +23 -0
  631. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/new-repository.controller.js +12 -6
  632. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/new/views/repository-new.html +49 -39
  633. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repositories.module.js +2 -1
  634. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repositories/repository.factory.js +2 -1
  635. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js +1 -1
  636. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +14 -5
  637. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-associations-content-hosts.html +3 -3
  638. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +46 -43
  639. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +8 -10
  640. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions-helper.service.js +1 -1
  641. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.controller.js +1 -2
  642. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.module.js +1 -0
  643. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/sync-plan-details.controller.js +24 -5
  644. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +51 -39
  645. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/new-sync-plan.controller.js +38 -39
  646. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plan.factory.js +1 -0
  647. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.controller.js +4 -6
  648. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/sync-plans.module.js +1 -0
  649. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/{bastion_katello.less → bastion_katello.scss} +1 -1
  650. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/environments.scss +11 -0
  651. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/{errata.less → errata.scss} +0 -0
  652. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/{gpg-keys.less → gpg-keys.scss} +6 -8
  653. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/{systems.less → systems.scss} +0 -0
  654. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/{tasks.less → tasks.scss} +0 -0
  655. data/engines/bastion_katello/bastion_katello.gemspec +1 -1
  656. data/engines/bastion_katello/lib/bastion_katello/engine.rb +4 -9
  657. data/lib/katello.rb +0 -1
  658. data/lib/katello/engine.rb +66 -30
  659. data/lib/katello/permissions/capsule_content_permissions.rb +8 -1
  660. data/lib/katello/permissions/content_host_permissions.rb +3 -11
  661. data/lib/katello/permissions/content_view_permissions.rb +5 -0
  662. data/lib/katello/permissions/host_permissions.rb +37 -0
  663. data/lib/katello/permissions/operatingsystems_permissions.rb +1 -1
  664. data/lib/katello/permissions/organization_permissions.rb +4 -4
  665. data/lib/katello/permissions/product_permissions.rb +7 -1
  666. data/lib/katello/plugin.rb +32 -1
  667. data/lib/katello/repository_types.rb +3 -0
  668. data/lib/katello/repository_types/docker.rb +1 -0
  669. data/lib/katello/repository_types/file.rb +3 -0
  670. data/lib/katello/repository_types/ostree.rb +1 -0
  671. data/lib/katello/repository_types/puppet.rb +1 -0
  672. data/lib/katello/repository_types/yum.rb +1 -0
  673. data/lib/katello/tasks/reindex.rake +7 -1
  674. data/lib/katello/tasks/setup.rake +2 -5
  675. data/lib/katello/tasks/test.rake +2 -0
  676. data/lib/katello/tasks/upgrades/3.0/add_export_distributor.rake +14 -0
  677. data/lib/katello/tasks/upgrades/3.0/delete_docker_v1_content.rake +27 -0
  678. data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +20 -0
  679. data/lib/katello/version.rb +1 -1
  680. data/lib/proxy_api/pulp.rb +15 -0
  681. data/lib/proxy_api/pulp_node.rb +15 -0
  682. data/locale/action_names.rb +44 -33
  683. data/locale/bn/katello.po +2568 -3256
  684. data/locale/cs/katello.po +2243 -2799
  685. data/locale/de/katello.po +3211 -4047
  686. data/locale/en/katello.po +1550 -1981
  687. data/locale/es/katello.po +3166 -3982
  688. data/locale/fr/katello.po +3227 -4062
  689. data/locale/gu/katello.po +2571 -3258
  690. data/locale/hi/katello.po +2646 -3333
  691. data/locale/it/katello.po +3177 -3986
  692. data/locale/ja/katello.po +3011 -3966
  693. data/locale/katello.pot +3335 -1767
  694. data/locale/kn/katello.po +2581 -3271
  695. data/locale/ko/katello.po +2965 -3847
  696. data/locale/mr/katello.po +2572 -3258
  697. data/locale/or/katello.po +2580 -3268
  698. data/locale/pa/katello.po +2572 -3249
  699. data/locale/pt/katello.po +1822 -2293
  700. data/locale/pt_BR/katello.po +3142 -3945
  701. data/locale/ru/katello.po +3050 -3824
  702. data/locale/ta/katello.po +2642 -3333
  703. data/locale/te/katello.po +2610 -3297
  704. data/locale/zanata.xml +2 -2
  705. data/locale/zh_CN/katello.po +2943 -3740
  706. data/locale/zh_TW/katello.po +3102 -3939
  707. metadata +236 -140
  708. data/app/assets/javascripts/katello/common/env_select.js +0 -131
  709. data/app/assets/javascripts/katello/widgets/filtertable/filtertable.js +0 -24
  710. data/app/assets/javascripts/katello/widgets/one_panel.js +0 -55
  711. data/app/controllers/katello/api/v2/system_packages_controller.rb +0 -115
  712. data/app/helpers/katello/products_helper.rb +0 -59
  713. data/app/helpers/katello/repositories_helper.rb +0 -19
  714. data/app/lib/actions/katello/capsule_content/manage_bound_repositories.rb +0 -37
  715. data/app/lib/actions/katello/capsule_content/update_without_content.rb +0 -15
  716. data/app/lib/actions/katello/content_view/node_metadata_generate.rb +0 -30
  717. data/app/lib/actions/katello/provider/reindex_subscriptions.rb +0 -23
  718. data/app/lib/actions/katello/repository/node_metadata_generate.rb +0 -14
  719. data/app/lib/actions/katello/system/activation_keys.rb +0 -47
  720. data/app/lib/actions/katello/system/create.rb +0 -67
  721. data/app/lib/actions/katello/system/erratum/applicable_errata_install.rb +0 -25
  722. data/app/lib/actions/katello/system/generate_applicability.rb +0 -22
  723. data/app/lib/actions/katello/system/host_destroy.rb +0 -28
  724. data/app/lib/actions/katello/system/update.rb +0 -25
  725. data/app/lib/actions/pulp/consumer/abstract_node_distributor_task.rb +0 -27
  726. data/app/lib/actions/pulp/consumer/abstract_sync_node_task.rb +0 -21
  727. data/app/lib/actions/pulp/consumer/activate_node.rb +0 -19
  728. data/app/lib/actions/pulp/consumer/bind_node_distributor.rb +0 -20
  729. data/app/lib/actions/pulp/consumer/deactivate_node.rb +0 -19
  730. data/app/lib/actions/pulp/consumer/sync_node.rb +0 -77
  731. data/app/lib/actions/pulp/consumer/unbind_node_distributor.rb +0 -21
  732. data/app/lib/katello/util/thread_session.rb +0 -88
  733. data/app/models/katello/docker_image.rb +0 -24
  734. data/app/models/katello/glue/pulp/consumer_group.rb +0 -93
  735. data/app/models/katello/glue/pulp/simple_package.rb +0 -13
  736. data/app/models/katello/repository_docker_image.rb +0 -9
  737. data/app/models/katello/system_erratum.rb +0 -9
  738. data/app/models/katello/system_host_collection.rb +0 -21
  739. data/app/overrides/foreman/activation_keys/_host_environment_select.html.erb +0 -44
  740. data/app/overrides/foreman/hosts/_subscription_link.html.erb +0 -6
  741. data/app/overrides/foreman/hosts/_subscription_status.html.erb +0 -23
  742. data/app/presenters/katello/system_subscription_presenter.rb +0 -10
  743. data/app/services/katello/pulp/docker_image.rb +0 -7
  744. data/app/views/katello/api/v2/system_packages/system_task.json.rabl +0 -3
  745. data/config/initializers/active_resource.rb +0 -1
  746. data/config/katello.yml +0 -242
  747. data/config/katello_defaults.yml +0 -0
  748. data/db/migrate/20160520175340_add_host_applicable_package.rb +0 -8
  749. data/db/seeds.rb +0 -161
  750. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/partials/content-host-detail-object.html +0 -8
  751. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/partials/content-host-detail-value.html +0 -4
  752. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-images/docker-image.factory.js +0 -23
  753. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/docker-images/docker-images.module.js +0 -14
  754. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-content-hosts.controller.js +0 -57
  755. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-add-content-hosts.html +0 -88
  756. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-content-hosts-list.html +0 -82
  757. data/engines/bastion_katello/app/assets/stylesheets/bastion_katello/environments.less +0 -21
  758. data/lib/katello/actions/actions.rb +0 -16
  759. data/lib/katello/tasks/asset_compile.rake +0 -82
  760. data/lib/katello/tasks/preupgrade_content_host_check.rake +0 -129
  761. data/lib/katello/tasks/upgrade_check.rake +0 -35
  762. data/lib/monkeys/foreign_keys_postgresql.rb +0 -15
@@ -88,16 +88,16 @@ module Katello
88
88
  @new_activation_key.user = current_user
89
89
  sync_task(::Actions::Katello::ActivationKey::Create, @new_activation_key)
90
90
  @new_activation_key.reload
91
- @new_activation_key.update_attributes!(
92
- :service_level => @activation_key.service_level,
93
- :release_version => @activation_key.release_version,
94
- :auto_attach => @activation_key.auto_attach
95
- )
91
+ sync_task(::Actions::Katello::ActivationKey::Update, @new_activation_key,
92
+ :service_level => @activation_key.service_level,
93
+ :release_version => @activation_key.release_version,
94
+ :auto_attach => @activation_key.auto_attach
95
+ )
96
96
  @activation_key.content_overrides.each do |content|
97
97
  @new_activation_key.set_content_override(content['contentLabel'], content[:name], content[:value])
98
98
  end
99
- @activation_key.get_key_pools.each do |pool|
100
- @new_activation_key.subscribe(pool[:id], pool[:amount])
99
+ @activation_key.subscriptions.each do |subscription|
100
+ @new_activation_key.subscribe(subscription[:id])
101
101
  end
102
102
  respond_for_show(:resource => @new_activation_key)
103
103
  end
@@ -227,6 +227,12 @@ module Katello
227
227
  :subtotal => collection.count }
228
228
  end
229
229
 
230
+ def find_activation_key
231
+ @activation_key = ActivationKey.find(params[:id])
232
+ fail HttpErrors::NotFound, _("Couldn't find activation key '%s'") % params[:id] if @activation_key.nil?
233
+ @activation_key
234
+ end
235
+
230
236
  private
231
237
 
232
238
  def validate_content_overrides(content_params)
@@ -270,12 +276,6 @@ module Katello
270
276
  @environment
271
277
  end
272
278
 
273
- def find_activation_key
274
- @activation_key = ActivationKey.find(params[:id])
275
- fail HttpErrors::NotFound, _("Couldn't find activation key '%s'") % params[:id] if @activation_key.nil?
276
- @activation_key
277
- end
278
-
279
279
  def find_host_collections
280
280
  ids = params[:activation_key][:host_collection_ids] if params[:activation_key]
281
281
  @host_collections = []
@@ -1,5 +1,3 @@
1
- require 'strong_parameters'
2
-
3
1
  module Katello
4
2
  class Api::V2::ApiController < ::Api::V2::BaseController
5
3
  include Concerns::Api::ApiController
@@ -38,6 +36,15 @@ module Katello
38
36
  @resource_class ||= "Katello::#{resource_name.classify}".constantize
39
37
  end
40
38
 
39
+ def full_result_response(collection)
40
+ { :results => collection,
41
+ :total => collection.count,
42
+ :page => 1,
43
+ :per_page => collection.count,
44
+ :subtotal => collection.count }
45
+ end
46
+
47
+ # rubocop:disable MethodLength
41
48
  def scoped_search(query, default_sort_by, default_sort_order, options = {})
42
49
  resource = options[:resource_class] || resource_class
43
50
  includes = options.fetch(:includes, [])
@@ -46,21 +53,18 @@ module Katello
46
53
  total = query.count
47
54
  query = resource.search_for(*search_options).where("#{resource.table_name}.id" => query)
48
55
 
49
- query = query.select(group).group(group) if group
50
- sub_total = query.count
56
+ if group.present?
57
+ query = query.select(group).group(group)
58
+ sub_total = query.count.length
59
+ else
60
+ sub_total = query.count
61
+ end
51
62
 
52
- sort_attr = (params[:sort_by] || default_sort_by).to_s.downcase
63
+ sort_attr = params[:sort_by] || default_sort_by
53
64
 
54
65
  if sort_attr
55
- table, column = sort_attr.split(".").length == 2 ? sort_attr.split(".") : [query.table_name, sort_attr]
56
- if ActiveRecord::Base.connection.columns(table).map(&:name).include?(column)
57
- sort_attr = "#{table}.#{column}"
58
- else
59
- sort_attr = default_sort_by
60
- end
61
- sort_order = (params[:sort_order] || default_sort_order).to_s.downcase
62
- sort_order = default_sort_order unless ['desc', 'asc'].include?(sort_order)
63
- query = query.order("#{sort_attr} #{sort_order}")
66
+ sort_attr = "#{query.table_name}.#{sort_attr}" unless sort_attr.to_s.include?('.')
67
+ query = query.order("#{sort_attr} #{params[:sort_order] || default_sort_order}")
64
68
  elsif options[:custom_sort]
65
69
  query = options[:custom_sort].call(query)
66
70
  end
@@ -78,7 +82,7 @@ module Katello
78
82
  :subtotal => sub_total,
79
83
  :total => total,
80
84
  :page => params[:page] || 1,
81
- :per_page => params[:per_page] || ::Setting::General.entries_per_page
85
+ :per_page => params[:per_page] || ::Setting::General.entries_per_page
82
86
  }
83
87
  end
84
88
 
@@ -122,7 +126,7 @@ module Katello
122
126
  end
123
127
 
124
128
  def get_organization(org_id)
125
- return Organization.find_by_id(org_id)
129
+ return Organization.find_by(:id => org_id)
126
130
  end
127
131
 
128
132
  def find_default_organization_and_or_environment
@@ -135,5 +139,10 @@ module Katello
135
139
  fail HttpErrors::NotFound, _("You have not set a default organization on the user %s.") % current_user.login
136
140
  end
137
141
  end
142
+
143
+ def find_host_with_subscriptions(id, permission)
144
+ @host = resource_finder(::Host::Managed.authorized(permission, ::Host::Managed), id)
145
+ fail HttpErrors::BadRequest, _("Host has not been registered with subscription-manager") if @host.subscription_facet.nil?
146
+ end
138
147
  end
139
148
  end
@@ -6,59 +6,90 @@ module Katello
6
6
 
7
7
  before_filter :find_capsule
8
8
  before_filter :find_environment, :only => [:add_lifecycle_environment, :remove_lifecycle_environment]
9
+ before_filter :find_optional_organization, :only => [:sync_status]
9
10
 
10
11
  def_param_group :lifecycle_environments do
11
- param :id, Integer, :desc => 'Id of the capsule', :required => true
12
- param :organization_id, Integer, :desc => 'Id of the organization to limit environments on'
12
+ param :id, Integer, :desc => N_('Id of the capsule'), :required => true
13
+ param :organization_id, Integer, :desc => N_('Id of the organization to limit environments on')
13
14
  end
14
15
 
15
16
  def_param_group :update_lifecycle_environments do
16
- param :id, Integer, :desc => 'Id of the capsule', :required => true
17
- param :environment_id, Integer, :desc => 'Id of the lifecycle environment', :required => true
17
+ param :id, Integer, :desc => N_('Id of the capsule'), :required => true
18
+ param :environment_id, Integer, :desc => N_('Id of the lifecycle environment'), :required => true
18
19
  end
19
20
 
20
- api :GET, '/capsules/:id/content/lifecycle_environments', 'List the lifecycle environments attached to the capsule'
21
+ api :GET, '/capsules/:id/content/lifecycle_environments', N_('List the lifecycle environments attached to the capsule')
21
22
  param_group :lifecycle_environments
22
23
  def lifecycle_environments
23
- @lifecycle_environments = capsule_content.lifecycle_environments(params[:organization_id]).readable
24
+ environments = capsule_content.lifecycle_environments(params[:organization_id]).readable
25
+ respond_for_lifecycle_environments_index(environments)
24
26
  end
25
27
 
26
- api :GET, '/capsules/:id/content/available_lifecycle_environments', 'List the lifecycle environments not attached to the capsule'
28
+ api :GET, '/capsules/:id/content/available_lifecycle_environments', N_('List the lifecycle environments not attached to the capsule')
27
29
  param_group :lifecycle_environments
28
30
  def available_lifecycle_environments
29
- @lifecycle_environments = capsule_content.available_lifecycle_environments(params[:organization_id]).readable
30
- render 'katello/api/v2/capsule_content/lifecycle_environments'
31
+ environments = capsule_content.available_lifecycle_environments(params[:organization_id]).readable
32
+ respond_for_lifecycle_environments_index(environments)
31
33
  end
32
34
 
33
- api :POST, '/capsules/:id/content/lifecycle_environments', 'Add lifecycle environments to the capsule'
35
+ api :POST, '/capsules/:id/content/lifecycle_environments', N_('Add lifecycle environments to the capsule')
34
36
  param_group :update_lifecycle_environments
35
37
  def add_lifecycle_environment
36
38
  capsule_content.add_lifecycle_environment(@environment)
37
- @lifecycle_environments = capsule_content.lifecycle_environments
38
- render 'katello/api/v2/capsule_content/lifecycle_environments'
39
+ respond_for_lifecycle_environments_index(capsule_content.lifecycle_environments)
39
40
  end
40
41
 
41
- api :DELETE, '/capsules/:id/content/lifecycle_environments/:environment_id', 'Remove lifecycle environments from the capsule'
42
+ api :DELETE, '/capsules/:id/content/lifecycle_environments/:environment_id', N_('Remove lifecycle environments from the capsule')
42
43
  param_group :update_lifecycle_environments
43
44
  def remove_lifecycle_environment
44
45
  capsule_content.remove_lifecycle_environment(@environment)
45
- @lifecycle_environments = capsule_content.lifecycle_environments
46
- render 'katello/api/v2/capsule_content/lifecycle_environments'
46
+ respond_for_lifecycle_environments_index(capsule_content.lifecycle_environments)
47
47
  end
48
48
 
49
- api :POST, '/capsules/:id/content/sync', 'Synchronize the content to the capsule'
50
- param :id, Integer, :desc => 'Id of the capsule', :required => true
51
- param :environment_id, Integer, :desc => 'Id of the environment to limit the synchronization on'
49
+ api :POST, '/capsules/:id/content/sync', N_('Synchronize the content to the capsule')
50
+ param :id, Integer, :desc => N_('Id of the capsule'), :required => true
51
+ param :environment_id, Integer, :desc => N_('Id of the environment to limit the synchronization on')
52
52
  def sync
53
53
  find_environment if params[:environment_id]
54
54
  task = async_task(::Actions::Katello::CapsuleContent::Sync, capsule_content, :environment => @environment)
55
55
  respond_for_async :resource => task
56
56
  end
57
57
 
58
+ api :GET, '/capsules/:id/content/sync', N_('Get current capsule synchronization status')
59
+ param :id, Integer, :desc => N_('Id of the capsule'), :required => true
60
+ param :organization_id, Integer, :desc => N_('Id of the organization to get the status for'), :required => false
61
+ def sync_status
62
+ @capsule_content = capsule_content
63
+ @lifecycle_environments = @capsule_content.lifecycle_environments(@organization)
64
+ end
65
+
66
+ api :DELETE, '/capsules/:id/content/sync', N_('Cancel running capsule synchronization.')
67
+ param :id, Integer, :desc => N_('Id of the capsule'), :required => true
68
+ def cancel_sync
69
+ tasks = capsule_content.cancel_sync
70
+ if tasks.empty?
71
+ render_message _('There\'s no running synchronization for this capsule.')
72
+ else
73
+ render_message _('Trying to cancel the synchronization...')
74
+ end
75
+ end
76
+
58
77
  protected
59
78
 
79
+ def respond_for_lifecycle_environments_index(environments)
80
+ collection = {
81
+ :results => environments,
82
+ :total => environments.size,
83
+ :subtotal => environments.size
84
+ }
85
+ respond_for_index(:collection => collection, :template => :lifecycle_environments)
86
+ end
87
+
60
88
  def find_capsule
61
- @capsule = SmartProxy.authorized(:manage_capsule_content).with_features(SmartProxy::PULP_NODE_FEATURE).find(params[:id])
89
+ @capsule = SmartProxy.authorized(:manage_capsule_content).find(params[:id])
90
+ unless @capsule && @capsule.has_feature?(SmartProxy::PULP_NODE_FEATURE)
91
+ fail _("This request may only be performed on a Capsule that has the Pulp Node feature.")
92
+ end
62
93
  end
63
94
 
64
95
  def find_environment
@@ -28,6 +28,7 @@ module Katello
28
28
  param :start_date, String, :desc => N_("erratum: start date (YYYY-MM-DD)")
29
29
  param :end_date, String, :desc => N_("erratum: end date (YYYY-MM-DD)")
30
30
  param :types, Array, :desc => N_("erratum: types (enhancement, bugfix, security)")
31
+ param :date_type, String, :desc => N_("erratum: search using the 'Issued On' or 'Updated On' column of the errata. Values are 'issued'/'updated'")
31
32
  def create
32
33
  rule_clazz = ContentViewFilter.rule_class_for(@filter)
33
34
 
@@ -106,7 +107,7 @@ module Katello
106
107
 
107
108
  params.fetch(:content_view_filter_rule, {}).
108
109
  permit(:uuid, :name, :version, :min_version, :max_version,
109
- :errata_id, :start_date, :end_date,
110
+ :errata_id, :start_date, :end_date, :date_type,
110
111
  :types => [], :errata_ids => [])
111
112
  end
112
113
 
@@ -70,17 +70,13 @@ module Katello
70
70
 
71
71
  private
72
72
 
73
- def deprecated
74
- ::Foreman::Deprecation.api_deprecation_warning("it will be changed in Katello 2.4, where it will be /content_view_filters/:id/package_groups?available_for=content_view_filter")
75
- end
76
-
77
73
  def find_content_view
78
74
  @view = ContentView.find(params[:content_view_id]) if params[:content_view_id]
79
75
  end
80
76
 
81
77
  def find_filter
82
78
  if @view
83
- @filter = @view.filters.find_by_id(params[:id])
79
+ @filter = @view.filters.find_by(:id => params[:id])
84
80
  fail HttpErrors::NotFound, _("Couldn't find ContentViewFilter with id=%s") % params[:id] unless @filter
85
81
  else
86
82
  @filter = ContentViewFilter.find(params[:id])
@@ -3,7 +3,7 @@ module Katello
3
3
  include Concerns::Api::V2::BulkSystemsExtensions
4
4
  include Katello::Concerns::FilteredAutoCompleteSearch
5
5
 
6
- before_filter :find_content_view_version, :only => [:show, :promote, :destroy]
6
+ before_filter :find_content_view_version, :only => [:show, :promote, :destroy, :export]
7
7
  before_filter :find_content_view, :except => [:incremental_update]
8
8
  before_filter :find_environment, :only => [:promote, :index]
9
9
  before_filter :authorize_promotable, :only => [:promote]
@@ -53,6 +53,31 @@ module Katello
53
53
  respond_for_async :resource => task
54
54
  end
55
55
 
56
+ api :POST, "/content_view_versions/:id/export", N_("Export a content view version")
57
+ param :id, :identifier, :desc => N_("Content view version identifier"), :required => true
58
+ param :export_to_iso, :bool, :desc => N_("Export to ISO format"), :required => false
59
+ param :iso_mb_size, :number, :desc => N_("maximum size of each ISO in MB"), :required => false
60
+ param :since, Date, :desc => N_("Optional date of last export (ex: 2010-01-01T12:00:00Z)"), :required => false
61
+ def export
62
+ if !params[:export_to_iso].present? && params[:iso_mb_size].present?
63
+ fail HttpErrors::BadRequest, _("ISO export must be enabled when specifying ISO size")
64
+ end
65
+
66
+ if params[:since].present?
67
+ begin
68
+ params[:since].to_datetime
69
+ rescue
70
+ raise HttpErrors::BadRequest, _("Invalid date provided.")
71
+ end
72
+ end
73
+
74
+ task = async_task(::Actions::Katello::ContentViewVersion::Export, @version,
75
+ ::Foreman::Cast.to_bool(params[:export_to_iso]),
76
+ params[:since].try(:to_datetime),
77
+ params[:iso_mb_size])
78
+ respond_for_async :resource => task
79
+ end
80
+
56
81
  api :DELETE, "/content_view_versions/:id", N_("Remove content view version")
57
82
  param :id, :identifier, :desc => N_("Content view version identifier"), :required => true
58
83
  def destroy
@@ -26,6 +26,7 @@ module Katello
26
26
  param :environment_id, :identifier, :desc => N_("environment identifier")
27
27
  param :nondefault, :bool, :desc => N_("Filter out default content views")
28
28
  param :noncomposite, :bool, :desc => N_("Filter out composite content views")
29
+ param :composite, :bool, :desc => N_("Filter only composite content views")
29
30
  param :without, Array, :desc => N_("Do not include this array of content views")
30
31
  param :name, String, :desc => N_("Name of the content view"), :required => false
31
32
  param_group :search, Api::V2::ApiController
@@ -42,6 +43,7 @@ module Katello
42
43
  content_views = content_views.in_environment(@environment) if @environment
43
44
  content_views = content_views.non_default if params[:nondefault]
44
45
  content_views = content_views.non_composite if params[:noncomposite]
46
+ content_views = content_views.composite if params[:composite]
45
47
  content_views = content_views.where(:name => params[:name]) if params[:name]
46
48
  content_views = content_views.where("#{ContentView.table_name}.id NOT IN (?)", params[:without]) if params[:without]
47
49
  content_views
@@ -1,12 +1,12 @@
1
1
  module Katello
2
- class Api::V2::DockerImagesController < Api::V2::ApiController
3
- apipie_concern_subst(:a_resource => N_("a docker image"), :resource => "docker_images")
2
+ class Api::V2::DockerManifestsController < Api::V2::ApiController
3
+ apipie_concern_subst(:a_resource => N_("a docker manifest"), :resource => "docker_manifests")
4
4
  include Katello::Concerns::Api::V2::RepositoryContentController
5
5
 
6
6
  private
7
7
 
8
8
  def resource_class
9
- DockerImage
9
+ DockerManifest
10
10
  end
11
11
 
12
12
  def filter_by_content_view_filter(filter)
@@ -6,7 +6,10 @@ module Katello
6
6
  def index
7
7
  if params[:grouped]
8
8
  # group docker tags by name, repo, and product
9
- collection = Katello::DockerTag.grouped
9
+ repos = Repository.readable
10
+ repos = repos.in_organization(@organization) if @organization
11
+ collection = Katello::DockerTag.in_repositories(repos).grouped
12
+
10
13
  respond(:collection => scoped_search(collection, "name", "DESC"))
11
14
  else
12
15
  super
@@ -72,11 +72,6 @@ module Katello
72
72
  param :name, String, :desc => N_("name of the environment"), :required => true
73
73
  param :label, String, :desc => N_("label of the environment"), :required => false
74
74
  param :description, String, :desc => N_("description of the environment")
75
- param :prior, Integer, :deprecated => true, :desc => <<-DESC
76
- ID of an environment that is prior to the new environment in the chain. It has to be
77
- either the ID of Library or the ID of an environment at the end of a chain.
78
- This param exists for backwards compatibility purposes. Please use prior_id.
79
- DESC
80
75
  param :prior_id, Integer, :required => true, :desc => <<-DESC
81
76
  ID of an environment that is prior to the new environment in the chain. It has to be
82
77
  either the ID of Library or the ID of an environment at the end of a chain.
@@ -184,7 +179,7 @@ module Katello
184
179
  end
185
180
 
186
181
  def find_content_view
187
- @content_view = ContentView.readable.find_by_id(params[:content_view_id])
182
+ @content_view = ContentView.readable.find_by(:id => params[:content_view_id])
188
183
  end
189
184
  end
190
185
  end
@@ -4,13 +4,14 @@ module Katello
4
4
  include Katello::Concerns::Api::V2::RepositoryContentController
5
5
 
6
6
  api :GET, "/errata", N_("List errata")
7
+ param :organization_id, :number, :desc => N_("organization identifier")
7
8
  param :content_view_version_id, :identifier, :desc => N_("content view version identifier")
8
9
  param :content_view_filter_id, :identifier, :desc => N_("content view filter identifier")
9
10
  param :repository_id, :number, :desc => N_("repository identifier")
10
11
  param :environment_id, :number, :desc => N_("environment identifier")
11
12
  param :cve, String, :desc => N_("CVE identifier")
12
- param :errata_restrict_applicable, :bool, :desc => N_("show only errata with one or more applicable systems")
13
- param :errata_restrict_installable, :bool, :desc => N_("show only errata with one or more installable systems")
13
+ param :errata_restrict_applicable, :bool, :desc => N_("show only errata with one or more applicable hosts")
14
+ param :errata_restrict_installable, :bool, :desc => N_("show only errata with one or more installable hosts")
14
15
  param_group :search, Api::V2::ApiController
15
16
  def index
16
17
  super
@@ -20,20 +21,28 @@ module Katello
20
21
  collection = filter_by_content_view(filter, collection)
21
22
  ids = Katello::ContentViewErratumFilterRule.where(:content_view_filter_id => filter.id).pluck("errata_id")
22
23
  collection = collection.where("errata_id not in (?)", ids) unless ids.empty?
23
- collection = collection.where('issued >= ?', params[:start_date]) if params[:start_date]
24
- collection = collection.where('issued <= ?', params[:end_date]) if params[:end_date]
24
+
25
+ date_type = params[:date_type].present? ? params[:date_type] : ContentViewErratumFilterRule::UPDATED
26
+ unless ContentViewErratumFilterRule::DATE_TYPES.include?(date_type)
27
+ msg = _("Invalid params provided - date_type must be one of %s" % ContentViewErratumFilterRule::DATE_TYPES.join(","))
28
+ fail HttpErrors::UnprocessableEntity, msg
29
+ end
30
+
31
+ collection = collection.where("#{date_type} >= ?", params[:start_date]) if params[:start_date]
32
+ collection = collection.where("#{date_type} <= ?", params[:end_date]) if params[:end_date]
25
33
  collection = collection.of_type(params[:types]) if params[:types]
26
34
  collection
27
35
  end
28
36
 
29
37
  def custom_index_relation(collection)
30
38
  collection = filter_by_cve(params[:cve], collection) if params[:cve]
39
+ hosts = ::Host::Managed.authorized("view_hosts")
31
40
  if ::Foreman::Cast.to_bool(params[:errata_restrict_applicable])
32
- collection = collection.applicable_to_systems(System.readable)
41
+ collection = collection.applicable_to_hosts(hosts)
33
42
  end
34
43
 
35
44
  if ::Foreman::Cast.to_bool(params[:errata_restrict_installable])
36
- collection = collection.installable_for_systems(System.readable)
45
+ collection = collection.installable_for_hosts(hosts)
37
46
  end
38
47
  collection
39
48
  end
@@ -73,7 +73,7 @@ module Katello
73
73
 
74
74
  api :POST, "/gpg_keys/:id/content", N_("Upload gpg key contents")
75
75
  param :id, :number, :desc => N_("gpg key numeric identifier"), :required => true
76
- param :content, File, :required => true, :desc => N_("file contents"), :required => true
76
+ param :content, File, :desc => N_("file contents"), :required => true
77
77
  def content
78
78
  filepath = params.try(:[], :content).try(:path)
79
79