katello 2.4.5 → 3.0.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 (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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be38f4975bf5c9b2a8596c82d63f2ca60a8bfd58
4
- data.tar.gz: 5dbf0236b140b5938f842fcb1298766087b04072
3
+ metadata.gz: 6556a9a45be788950f7121e13324f371dae87f9c
4
+ data.tar.gz: e5df82ecc9631da6506fa9d86120c3e487261719
5
5
  SHA512:
6
- metadata.gz: 944515a03d76c5260454ae0ba04699eae107eed5ecf5c4827da0ebd5dc475e2c0d886f5460bbe29fc19452d6cc42d2a7c8381ad7cdbae99b0ed7ee800eaab47a
7
- data.tar.gz: a3c8ee25acd0adcd3fe5df7da7b45ad6c3045f1b5bdd1d380ace390fdbbb30c33ddc19d1e8fedaa66e2071f0ee8dacd88a630e3fa60360fdba0547dad6819572
6
+ metadata.gz: f816179cda53ada12c385dbd8006096fcd3f218a9e12a993b5eaec365b7f89ca1ebd8d93a324808249fe96c167ebf69953c30d7f31cbe00871ae9c6322b82237
7
+ data.tar.gz: f669b7c4724baef60b37de2416500cff4373d27b3b85c5a0d3167b1f3fc107d8d64e98c6a27b11fb6fd2529850d073521a94a68e58bb3ffa79c0acdbbc9b6e67
data/README.md CHANGED
@@ -15,7 +15,19 @@ Linux based systems.
15
15
 
16
16
  ## Development
17
17
 
18
- The recommended way to set up Katello for development to use the [katello-devel-installer](https://github.com/Katello/katello-installer#development-usage) directly or via [katello-deploy](https://github.com/Katello/katello-deploy#development-deployment).
18
+ The most common way to set up Katello for development is to use
19
+ [katello-deploy](https://github.com/Katello/katello-deploy#development-deployment).
20
+ This will set up a Vagrant instance with the Katello codebase checked out. You
21
+ can also run `setup.rb` directly with katello-deploy if you prefer to not use
22
+ Vagrant.
23
+
24
+ There is also
25
+ [katello-devel-installer](https://github.com/Katello/katello-installer#development-usage)
26
+ if you would like to use that.
27
+
28
+ If you have questions or issues with any of the above methods, feel free to ask
29
+ for assistance on #theforeman-dev IRC channel or via the foreman-dev mailing
30
+ list.
19
31
 
20
32
  ### Test Run
21
33
 
@@ -29,14 +41,13 @@ At this point, the development environment should be completely setup and the Ka
29
41
  rails s
30
42
  ```
31
43
 
32
- 2. Access Foreman in your browser (e.g. `http://<hostname>:3000/`)
33
- 3. Login to Foreman (default: `admin` and `changeme`)
34
- 4. Create an initial Foreman organization
35
- 5. Navigate to the Katello engine (e.g. `http://<hostname>:3000/katello`)
44
+ 1. Access Foreman in your browser (e.g. `https://<hostname>/`). Note that while Rails will listen on port 3000, the dev installer will set up a reverse proxy so HTTPS on port 443 will work.
45
+ 1. Login to Foreman (default: `admin` and `changeme`)
46
+ 1. If you go to `https://<hostname>/about` and view the "Plugins" tab, you should see a "Katello" plugin listed.
36
47
 
37
48
  ### Reset Development Environment
38
49
 
39
- In order to reset the development environment, all backend data and the database needs to be reset. To reiterate, the following will destroy all data in Pulp, Candlepin and your Foreman/Katello database. From the Foreman checkout run:
50
+ In order to reset the development environment, all backend data and the database needs to be reset. To reiterate, *the following will destroy all data in Pulp, Candlepin and your Foreman/Katello database*. From the Foreman checkout run:
40
51
 
41
52
  ```bash
42
53
  rake katello:reset
@@ -50,7 +61,7 @@ That's rather unfortunate. But don't worry! We can help. Just file a bug
50
61
 
51
62
  ## Contributing
52
63
 
53
- See [getting involved](http://www.katello.org/get-involved/).
64
+ See the [developer documentation](http://www.katello.org/developers/index.html).
54
65
 
55
66
  ## Contact & Resources
56
67
 
@@ -2,7 +2,6 @@
2
2
  //= require "katello/common/katello.common.js"
3
3
  //= require "katello/common/katello"
4
4
  //= require "katello/common/menu"
5
- //= require "katello/common/chosen.jquery"
6
5
  //= require "katello/common/spin.min"
7
6
  //= require "katello/common/jquery.jeditable.custominputs"
8
7
  //= require "katello/common/katello_object"
@@ -112,11 +112,6 @@ KT.common = (function() {
112
112
  }
113
113
  });
114
114
  },
115
- orgSwitcherSetup : function() {
116
- $('.favorite').live('click', function(e) {
117
- KT.orgswitcher.checkboxChanged($(this).parent().find('.default_org'));
118
- });
119
- },
120
115
  rootURL : function() {
121
116
  if (root_url === undefined) {
122
117
  root_url = KT.routes.options.prefix;
@@ -169,9 +164,10 @@ KT.common = (function() {
169
164
  }
170
165
  },
171
166
  link_hover_setup : function(shade){
172
- $('a').live('mouseenter',
173
- function(){ KT.common.icon_hover_change($(this), shade); }
174
- ).live('mouseleave',
167
+ $('a').on('mouseenter',
168
+ function(){
169
+ KT.common.icon_hover_change($(this), shade); }
170
+ ).on('mouseleave',
175
171
  function(){ KT.common.icon_hover_change($(this), shade); }
176
172
  );
177
173
  }
@@ -250,8 +250,6 @@ $(document).ready(function (){
250
250
  // Add a handler for ellipsis
251
251
  $(".tipsify").tooltip({ placement: 'bottom', delay : 350 });
252
252
  $(".tipsify-left").tooltip({ placement: 'left'});
253
-
254
- KT.common.orgSwitcherSetup();
255
253
  });
256
254
 
257
255
  /**
@@ -268,14 +266,6 @@ $(window).ready(function(){
268
266
  $('body').css('cursor', 'default');
269
267
  });
270
268
 
271
- //allow all buttons with class .button to be clicked via enter or space button
272
- $('.button').live('keyup', function(e){
273
- if(e.which === 13 || e.which === 32)
274
- {
275
- $(this).click();
276
- }
277
- });
278
-
279
269
  window.alert = function(message){KT.common.customAlert(message);return false;};
280
270
  $.rails.confirm = function(message) {
281
271
  KT.common.customConfirm({message: message}); return false;
@@ -4,6 +4,5 @@
4
4
  //= require "jquery.ui.tabs"
5
5
  //= require "jquery.ui.progressbar"
6
6
  //= require "jquery.ui.effect.all"
7
- //= require "katello/jquery.ba-bbq"
8
7
  //= require "katello/jquery.periodicalupdater"
9
8
  //= require "katello/jquery.trunk8"
@@ -77,7 +77,7 @@ function ktSetParam(name, value) {
77
77
  var paramContainer = ktFindParamContainer(name);
78
78
  if(value) {
79
79
  if(! paramContainer) { // we create the param for kt_activation_keys
80
- $("div#parameters a.btn-success").click();
80
+ $("div#parameters a[target~='#global_parameters_table']").click();
81
81
  paramContainer = $("div#parameters .fields").last();
82
82
  paramContainer.find("input").val(name);
83
83
  }
@@ -118,7 +118,7 @@ KT.hosts.onKatelloHostEditLoad = function(){
118
118
 
119
119
  $.each(prefxies, function(index, prefix) {
120
120
  $.each(attributes, function(attrIndex, attribute) {
121
- $('#' + prefix + '_' + attribute).live('change', function () {
121
+ $('body').on('change', '#' + prefix + '_' + attribute, function () {
122
122
  KT.hosts.toggle_installation_medium();
123
123
  });
124
124
  });
@@ -1,5 +1,5 @@
1
1
  $(document).ready(function() {
2
- $('#download_debug_cert_key').live('click', function(e) {
2
+ $('body').on('click', '#download_debug_cert_key', function(e) {
3
3
  e.preventDefault();
4
4
  window.location.href = $("#download_debug_cert_key").data("url");
5
5
  return false;
@@ -37,7 +37,7 @@ KT.redhat_provider_page = (function($) {
37
37
  id = checkbox.attr("value"),
38
38
  set_checkbox = checkbox.parents(".repo_set").find('.repo_set_enable');
39
39
 
40
- if (checkbox.attr("checked") !== undefined) {
40
+ if (checkbox.is(":checked")) {
41
41
  options['repo'] = "1";
42
42
  } else {
43
43
  options['repo'] = "0";
@@ -11,15 +11,13 @@ $(document).ready(function() {
11
11
  KT.content.reset_products(KT.repo_status);
12
12
  KT.content_actions.addSyncing(ids);
13
13
 
14
-
15
-
16
-
17
14
  $('#select_all').click(KT.content.select_all);
18
15
  $('#select_none').click(KT.content.select_none);
19
16
  $('#collapse_all').click(KT.content.collapse_all);
20
17
  $('#expand_all').click(KT.content.expand_all);
21
18
 
22
19
  KT.content.showAll();
20
+ KT.content.select_repo();
23
21
 
24
22
  $("#products_table").delegate(".cancel_sync", "click", function(){
25
23
  var repo_id = $(this).parents("tr").attr("data-id");
@@ -35,7 +33,6 @@ $(document).ready(function() {
35
33
  KT.content.updateProduct(item.product_id, false, 0);
36
34
  });
37
35
  KT.content_actions.addSyncing(ids);
38
-
39
36
  })
40
37
  .bind("ajax:beforeSend",
41
38
  function(evt, data, status, xhr) {
@@ -44,7 +41,6 @@ $(document).ready(function() {
44
41
  }
45
42
  });
46
43
 
47
-
48
44
  $("#sync_toggle").change(function(){
49
45
  var img = "<img src='" + KT.common.spinner_path() + "'>";
50
46
  $("#sync_toggle_cont").append(img);
@@ -57,6 +53,10 @@ $(document).ready(function() {
57
53
  $("#sync_toggle_cont").find("img").remove();
58
54
  });
59
55
 
56
+ $.each($("input[name='repoids[]']"), function(index, checkbox) {
57
+ $(checkbox).click(KT.content.select_repo);
58
+ });
59
+
60
60
  });
61
61
 
62
62
  KT.content_actions = (function(){
@@ -151,11 +151,9 @@ KT.content_actions = (function(){
151
151
  addSyncing: addSyncing,
152
152
  startUpdater: startUpdater,
153
153
  getSyncing: function(){return syncing}
154
-
155
154
  };
156
155
  })();
157
156
 
158
-
159
157
  KT.content = (function(){
160
158
 
161
159
  var draw_syncing = function(repo_id, progress){
@@ -243,10 +241,12 @@ KT.content = (function(){
243
241
  element.text(text);
244
242
  },
245
243
  select_all = function(){
246
- $("#products_table").find("input[type=checkbox]").attr('checked',true);
244
+ $("#products_table").find("input[type=checkbox]").prop('checked',true);
245
+ KT.content.select_repo();
247
246
  },
248
247
  select_none = function(){
249
248
  $("#products_table").find("input[type=checkbox]").removeAttr('checked');
249
+ KT.content.select_repo();
250
250
  },
251
251
  select_repo = function(){
252
252
  if($("input[name='repoids[]']:checked").length > 0) {
@@ -270,17 +270,13 @@ KT.content = (function(){
270
270
  var total = 0;
271
271
  $.each(percentages, function(i, val){total += val;});
272
272
  updateProduct(prod_id, percentages.length === 0, total/percentages.length);
273
-
274
273
  });
275
-
276
274
  },
277
275
  showOnlySyncing = function(){
278
276
  $("#products_table").find("tbody").find("tr").hide();
279
277
  $.each(KT.content_actions.getSyncing(), function(index, repoid){
280
278
  var repo = $("#repo-" + repoid);
281
279
  showChain(repo);
282
-
283
-
284
280
  });
285
281
  },
286
282
  showChain = function(element){
@@ -301,6 +297,11 @@ KT.content = (function(){
301
297
  });
302
298
  },
303
299
  expand_all = function() {
300
+ var sync_toggle = $("#sync_toggle");
301
+ if($(sync_toggle).is(":checked")) {
302
+ $(sync_toggle).removeAttr("checked");
303
+ KT.content.showAll();
304
+ }
304
305
  $("#products_table").find("tr").removeClass("collapsed").addClass("expanded").each(function(){
305
306
  $(this).expand();
306
307
  });
@@ -1,7 +1,5 @@
1
1
  $primary_color: rgb(0, 112, 143);
2
2
  $static_width: 1152px;
3
- $fa-font-path: "../bastion/font-awesome";
4
-
5
3
 
6
4
  // Foreman Overrides
7
5
  fieldset {
@@ -1,9 +1,5 @@
1
1
  @import "katello/overrides";
2
-
3
- @import "bastion/font-awesome/scss/font-awesome";
4
-
5
2
  @import "katello/katello_base";
6
-
7
3
  @import "katello/look";
8
4
 
9
5
  @import "katello/fancyqueries";
@@ -12,12 +8,11 @@
12
8
  @import "katello/widgets/tabs";
13
9
  @import "katello/katello_sprites";
14
10
 
15
- @import "katello/jquery-ui-1.8.11.custom";
16
- @import "katello/jquery.loadmask";
17
- @import "katello/jquery.jnotify";
18
- @import "katello/jquery.treeTable";
19
- @import "katello/jquery.jscrollpane";
20
- @import "katello/ui.spinner";
11
+ @import "jquery-ui-1.8.11.custom.css";
12
+ @import "jquery.loadmask.css";
13
+ @import "jquery.treeTable.css";
14
+ @import "jquery.jscrollpane.css";
15
+ @import "ui.spinner.css";
21
16
 
22
17
  @import "katello/contents";
23
18
  @import "katello/generic";
@@ -7,9 +7,9 @@ module Katello
7
7
  wrap_parameters false
8
8
 
9
9
  around_filter :repackage_message
10
- before_filter :find_system, :only => [:consumer_show, :consumer_destroy, :consumer_checkin, :enabled_repos,
11
- :upload_package_profile, :regenerate_identity_certificates, :facts,
12
- :available_releases]
10
+ before_filter :find_host, :only => [:consumer_show, :consumer_destroy, :consumer_checkin, :enabled_repos,
11
+ :upload_package_profile, :regenerate_identity_certificates, :facts,
12
+ :available_releases, :serials]
13
13
  before_filter :authorize, :only => [:consumer_create, :list_owners, :rhsm_index]
14
14
  before_filter :authorize_client_or_user, :only => [:consumer_show, :upload_package_profile, :regenerate_identity_certificates]
15
15
  before_filter :authorize_client_or_admin, :only => [:hypervisors_update]
@@ -90,7 +90,7 @@ module Katello
90
90
  #api :GET, "/consumers/:id", N_("Show a system")
91
91
  #param :id, String, :desc => N_("UUID of the consumer"), :required => true
92
92
  def consumer_show
93
- render :json => Resources::Candlepin::Consumer.get(@system.uuid)
93
+ render :json => Resources::Candlepin::Consumer.get(params[:id])
94
94
  end
95
95
 
96
96
  #api :GET, "/owners/:organization_id/environments", N_("List environments for RHSM")
@@ -111,34 +111,39 @@ module Katello
111
111
  #api :POST, "/hypervisors", N_("Update the hypervisors information for environment")
112
112
  #desc 'See virt-who tool for more details.'
113
113
  def hypervisors_update
114
- cp_response, _ = System.register_hypervisors(@environment, @content_view, params.except(:controller, :action, :format))
115
- render :json => cp_response
114
+ login = User.consumer? ? User.anonymous_api_admin.login : User.current.login
115
+ task = User.as(login) do
116
+ sync_task(::Actions::Katello::Host::Hypervisors, @environment, @content_view,
117
+ params.except(:controller, :action, :format))
118
+ end
119
+ render :json => task.output[:results]
116
120
  end
117
121
 
118
122
  #api :PUT, "/consumers/:id/checkin/", N_("Update consumer check-in time")
119
123
  #param :date, String, :desc => N_("check-in time")
120
124
  def consumer_checkin
121
- @system.checkin(params[:date])
122
- render :json => Resources::Candlepin::Consumer.get(@system.uuid)
125
+ @host.update_attributes(:last_checkin => params[:date])
126
+ Candlepin::Consumer.new(@host.subscription_facet.uuid).checkin(params[:date])
127
+ render :json => Resources::Candlepin::Consumer.get(@host.subscription_facet.uuid)
123
128
  end
124
129
 
125
130
  #api :PUT, "/consumers/:id/packages", N_("Update installed packages")
126
131
  #api :PUT, "/consumers/:id/profile", N_("Update installed packages")
127
132
  #param :id, String, :desc => N_("UUID of the consumer"), :required => true
128
133
  def upload_package_profile
129
- fail HttpErrors::BadRequest, _("No package profile received for %s") % @system.name unless params.key?(:_json)
130
- @system.upload_package_profile(params[:_json])
131
- render :json => Resources::Candlepin::Consumer.get(@system.uuid)
134
+ User.as_anonymous_admin do
135
+ sync_task(::Actions::Katello::Host::UploadPackageProfile, @host, params[:_json])
136
+ end
137
+ render :json => Resources::Candlepin::Consumer.get(@host.subscription_facet.uuid)
132
138
  end
133
139
 
134
140
  def available_releases
135
- render :json => @system.available_releases
141
+ render :json => @host.content_facet.try(:available_releases) || []
136
142
  end
137
143
 
138
144
  def list_owners
139
145
  orgs = User.current.allowed_organizations
140
146
  # rhsm expects owner (Candlepin format)
141
- # rubocop:disable SymbolName
142
147
  respond_for_index :collection => orgs.map { |o| { :key => o.label, :displayName => o.name } }
143
148
  end
144
149
 
@@ -146,8 +151,8 @@ module Katello
146
151
  #param :id, String, :desc => N_("UUID of the consumer")
147
152
  #desc 'Schedules the consumer identity certificate regeneration'
148
153
  def regenerate_identity_certificates
149
- @system.regenerate_identity_certificates
150
- render :json => Resources::Candlepin::Consumer.get(@system.uuid)
154
+ Candlepin::Consumer.new(params[:uuid]).regenerate_identity_certificates
155
+ render :json => Resources::Candlepin::Consumer.get(@host.uuid)
151
156
  end
152
157
 
153
158
  api :PUT, "/systems/:id/enabled_repos", N_("Update the information about enabled repositories")
@@ -161,7 +166,7 @@ module Katello
161
166
  end
162
167
  end
163
168
  param :id, String, :desc => N_("UUID of the system"), :required => true
164
- def enabled_repos # rubocop:disable Metrics/MethodLength
169
+ def enabled_repos
165
170
  repos_params = params['enabled_repos'] rescue raise(HttpErrors::BadRequest, _("Expected attribute is missing:") + " enabled_repos")
166
171
  repos_params = repos_params['repos'] || []
167
172
 
@@ -169,17 +174,16 @@ module Katello
169
174
  if !repo['baseurl'].blank?
170
175
  URI(repo['baseurl'].first).path
171
176
  else
172
- logger.warn("System #{@system.name} (#{@system.id}) attempted to bind to unspecific repo (#{repo}).")
177
+ logger.warn("System #{@host.name} (#{@host.id}) attempted to bind to unspecific repo (#{repo}).")
173
178
  nil
174
179
  end
175
180
  end
176
181
 
177
- processed_ids, error_ids = @system.save_bound_repos_by_path!(paths.compact)
178
-
179
- result = {:processed_ids => processed_ids,
180
- :error_ids => error_ids,
181
- :result => "ok"}
182
- result[:result] = "error" if error_ids.present?
182
+ result = nil
183
+ User.as_anonymous_admin do
184
+ @host.content_host.save_bound_repos_by_path!(paths.compact)
185
+ result = @host.content_facet.update_repositories_by_paths(paths.compact)
186
+ end
183
187
 
184
188
  respond_for_show :resource => result
185
189
  end
@@ -187,25 +191,21 @@ module Katello
187
191
  #api :POST, "/environments/:environment_id/consumers", N_("Register a consumer in environment")
188
192
  def consumer_create
189
193
  content_view_environment = find_content_view_environment
190
- foreman_host = find_foreman_host(content_view_environment.environment.organization)
191
-
192
- sync_task(::Actions::Katello::System::Destroy, foreman_host.content_host) if foreman_host.try(:content_host)
194
+ host = Katello::Host::SubscriptionFacet.find_or_create_host(params[:facts]['network.hostname'],
195
+ content_view_environment.environment.organization, rhsm_params)
193
196
 
194
- @system = System.new(system_params.merge(:environment => content_view_environment.environment,
195
- :content_view => content_view_environment.content_view,
196
- :serviceLevel => params[:service_level],
197
- :host_id => foreman_host.try(:id)))
197
+ sync_task(::Actions::Katello::Host::Register, host, System.new, rhsm_params, content_view_environment)
198
+ host.reload
198
199
 
199
- sync_task(::Actions::Katello::System::Create, @system)
200
- @system.reload
201
- render :json => Resources::Candlepin::Consumer.get(@system.uuid)
200
+ render :json => Resources::Candlepin::Consumer.get(host.subscription_facet.uuid)
202
201
  end
203
202
 
204
203
  #api :DELETE, "/consumers/:id", N_("Unregister a consumer")
205
204
  #param :id, String, :desc => N_("UUID of the consumer"), :required => true
206
205
  def consumer_destroy
207
- User.current = User.anonymous_admin
208
- sync_task(::Actions::Katello::System::Destroy, @system)
206
+ User.as_anonymous_admin do
207
+ sync_task(::Actions::Katello::Host::Unregister, @host)
208
+ end
209
209
  render :text => _("Deleted consumer '%s'") % params[:id], :status => 204
210
210
  end
211
211
 
@@ -215,23 +215,20 @@ module Katello
215
215
  def consumer_activate
216
216
  # Activation keys are userless by definition so use the internal generic user
217
217
  # Set it before calling find_activation_keys to allow communication with candlepin
218
- User.current = User.anonymous_admin
218
+ User.current = User.anonymous_admin
219
219
  activation_keys = find_activation_keys
220
- foreman_host = find_foreman_host(activation_keys.first.organization)
221
-
222
- sync_task(::Actions::Katello::System::Destroy, foreman_host.content_host) if foreman_host.try(:content_host)
220
+ host = Katello::Host::SubscriptionFacet.find_or_create_host(params[:facts]['network.hostname'],
221
+ activation_keys.first.organization, rhsm_params)
223
222
 
224
- @system = System.new(system_params.merge(:host_id => foreman_host.try(:id)))
225
- sync_task(::Actions::Katello::System::Create, @system, activation_keys)
226
- @system.reload
223
+ sync_task(::Actions::Katello::Host::Register, host, System.new, rhsm_params, nil, activation_keys)
224
+ host.reload
227
225
 
228
- render :json => Resources::Candlepin::Consumer.get(@system.uuid)
226
+ render :json => Resources::Candlepin::Consumer.get(host.subscription_facet.uuid)
229
227
  end
230
228
 
231
229
  #api :GET, "/status", N_("Shows version information")
232
230
  #description N_("This service is available for unauthenticated users")
233
231
  def server_status
234
- # rubocop:disable SymbolName
235
232
  status = { :managerCapabilities => Resources::Candlepin::CandlepinPing.ping['managerCapabilities'],
236
233
  :result => Resources::Candlepin::CandlepinPing.ping['result'],
237
234
  :rulesSource => Resources::Candlepin::CandlepinPing.ping['rulesSource'],
@@ -244,18 +241,19 @@ module Katello
244
241
  end
245
242
 
246
243
  def facts
247
- attrs = params.clone
248
- slice_attrs = [:name, :description, :location,
249
- :facts, :guestIds, :installedProducts,
250
- :releaseVer, :serviceLevel, :lastCheckin, :autoheal
251
- ]
252
- attrs[:installedProducts] = [] if attrs.key?(:installedProducts) && attrs[:installedProducts].nil?
253
244
  User.as_anonymous_admin do
254
- sync_task(::Actions::Katello::System::Update, @system, attrs.slice(*slice_attrs))
245
+ sync_task(::Actions::Katello::Host::Update, @host, rhsm_params)
246
+ Katello::Host::SubscriptionFacet.update_facts(@host, rhsm_params[:facts])
255
247
  end
256
248
  render :json => {:content => _("Facts successfully updated.")}, :status => 200
257
249
  end
258
250
 
251
+ def serials
252
+ @host.subscription_facet.last_checkin = DateTime.now
253
+ @host.subscription_facet.save!
254
+ render :json => Katello::Resources::Candlepin::Consumer.serials(@host.subscription_facet.uuid)
255
+ end
256
+
259
257
  private
260
258
 
261
259
  def disable_strong_params
@@ -270,21 +268,22 @@ module Katello
270
268
  params[:organization_id] = params[:owner] if params[:owner]
271
269
  end
272
270
 
273
- def find_system(uuid = nil)
274
- @system = System.where(:uuid => uuid || params[:id]).first
275
- if @system.nil?
271
+ def find_host(uuid = nil)
272
+ uuid ||= params[:id]
273
+ facet = Katello::Host::SubscriptionFacet.where(:uuid => uuid).first
274
+ if facet.nil?
276
275
  # check with candlepin if consumer is Gone, raises RestClient::Gone
277
- Resources::Candlepin::Consumer.get params[:id]
278
- fail HttpErrors::NotFound, _("Couldn't find consumer '%s'") % params[:id]
276
+ User.as_anonymous_admin { Resources::Candlepin::Consumer.get(uuid) }
277
+ fail HttpErrors::NotFound, _("Couldn't find consumer '%s'") % uuid
279
278
  end
280
- @system
279
+ @host = facet.host
281
280
  end
282
281
 
283
282
  def find_content_view_environment
284
283
  environment = nil
285
284
 
286
285
  if params.key?(:environment_id)
287
- environment = get_content_view_environment_by_cp_id(params[:environment_id])
286
+ environment = get_content_view_environment("cp_id", params[:environment_id])
288
287
  elsif params.key?(:organization_id) && !params.key?(:environment_id)
289
288
  organization = find_organization
290
289
  environment = organization.library.content_view_environment
@@ -300,14 +299,14 @@ module Katello
300
299
  # Hypervisors are restricted to the content host's environment and content view
301
300
  def find_hypervisor_environment_and_content_view
302
301
  if User.consumer?
303
- find_system(User.current.uuid)
304
- @organization = @system.organization
305
- @environment = @system.environment
306
- @content_view = @system.content_view
302
+ @host = find_host(User.current.uuid)
303
+ @organization = @host.content_facet.content_view.organization
304
+ @environment = @host.content_facet.lifecycle_environment
305
+ @content_view = @host.content_facet.content_view
307
306
  params[:owner] = @organization.label
308
307
  params[:env] = @content_view.cp_environment_label(@environment)
309
308
  else
310
- @organization = Organization.find_by_label(params[:owner])
309
+ @organization = Organization.find_by(:label => params[:owner])
311
310
  deny_access unless @organization
312
311
  if params[:env] == 'Library'
313
312
  @environment = @organization.library
@@ -316,9 +315,9 @@ module Katello
316
315
  deny_access unless @content_view && @content_view.readable?
317
316
  else
318
317
  (env_name, cv_name) = params[:env].split('/')
319
- @environment = @organization.kt_environments.find_by_label(env_name)
318
+ @environment = @organization.kt_environments.find_by(:label => env_name)
320
319
  deny_access unless @environment && @environment.readable?
321
- @content_view = @environment.content_views.find_by_label(cv_name)
320
+ @content_view = @environment.content_views.find_by(:label => cv_name)
322
321
  deny_access unless @content_view && @content_view.readable?
323
322
  end
324
323
  end
@@ -328,7 +327,7 @@ module Katello
328
327
  organization = nil
329
328
 
330
329
  if params.key?(:organization_id)
331
- organization = Organization.find_by_label(params[:organization_id])
330
+ organization = Organization.find_by(:label => params[:organization_id])
332
331
  end
333
332
 
334
333
  if organization.nil?
@@ -350,7 +349,7 @@ module Katello
350
349
  if ak_names = params[:activation_keys]
351
350
  ak_names = ak_names.split(",")
352
351
  activation_keys = ak_names.map do |ak_name|
353
- activation_key = organization.activation_keys.find_by_name(ak_name)
352
+ activation_key = organization.activation_keys.find_by(:name => ak_name)
354
353
  fail HttpErrors::NotFound, _("Couldn't find activation key '%s'") % ak_name unless activation_key
355
354
 
356
355
  if !activation_key.unlimited_content_hosts && activation_key.usage_count >= activation_key.max_content_hosts
@@ -368,11 +367,6 @@ module Katello
368
367
  activation_keys
369
368
  end
370
369
 
371
- def find_foreman_host(organization)
372
- Host.where(:name => params[:facts]['network.hostname'],
373
- :organization_id => organization.id).first if params[:facts]
374
- end
375
-
376
370
  def get_content_view_environment(key, value)
377
371
  cve = nil
378
372
  if value
@@ -383,10 +377,6 @@ module Katello
383
377
  cve
384
378
  end
385
379
 
386
- def get_content_view_environment_by_cp_id(id)
387
- get_content_view_environment("cp_id", id)
388
- end
389
-
390
380
  def get_content_view_environments(label = nil, organization = nil)
391
381
  organization ||= @organization
392
382
 
@@ -394,27 +384,11 @@ module Katello
394
384
  where("#{Organization.table_name}.id = ?", organization.id)
395
385
  environments = environments.where("#{Katello::ContentViewEnvironment.table_name}.label = ?", label) if label
396
386
 
397
- environments.delete_if do |env|
398
- if env.content_view.default
399
- !env.environment.readable?
400
- else
401
- !env.content_view.readable?
402
- end
403
- end
404
-
405
- environments
387
+ environments.reject { |env| (env.content_view.default && !env.environment.readable?) || !env.content_view.readable? }
406
388
  end
407
389
 
408
- def system_params
409
- system_params = params.slice(:name, :organization_id, :facts, :installedProducts)
410
-
411
- if params.key?(:cp_type)
412
- system_params[:cp_type] = params[:cp_type]
413
- elsif params.key?(:type)
414
- system_params[:cp_type] = params[:type]
415
- end
416
-
417
- system_params
390
+ def rhsm_params
391
+ params.slice(:name, :type, :facts, :installedProducts, :autoheal, :releaseVer, :serviceLevel, :uuid, :capabilities, :guestIds, :lastCheckin)
418
392
  end
419
393
 
420
394
  def logger
@@ -453,7 +427,7 @@ module Katello
453
427
 
454
428
  def client_authorized?
455
429
  authorized = authenticate_client && User.consumer?
456
- authorized = (User.current.uuid == @system.uuid) if @system && User.consumer?
430
+ authorized = (User.current.uuid == @host.subscription_facet.uuid) if @host && User.consumer?
457
431
  authorized
458
432
  end
459
433