katello 3.0.2 → 3.1.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 (215) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/katello/sync_management/sync_management.js +14 -5
  3. data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +4 -4
  4. data/app/controllers/katello/api/v2/activation_keys_controller.rb +2 -0
  5. data/app/controllers/katello/api/v2/api_controller.rb +1 -1
  6. data/app/controllers/katello/api/v2/content_uploads_controller.rb +1 -1
  7. data/app/controllers/katello/api/v2/content_view_puppet_modules_controller.rb +2 -12
  8. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +4 -4
  9. data/app/controllers/katello/api/v2/content_views_controller.rb +2 -4
  10. data/app/controllers/katello/api/v2/environments_controller.rb +0 -16
  11. data/app/controllers/katello/api/v2/host_contents_controller.rb +9 -0
  12. data/app/controllers/katello/api/v2/host_errata_controller.rb +1 -1
  13. data/app/controllers/katello/api/v2/host_packages_controller.rb +1 -1
  14. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +25 -6
  15. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +3 -2
  16. data/app/controllers/katello/api/v2/repositories_controller.rb +6 -3
  17. data/app/controllers/katello/api/v2/sync_plans_controller.rb +2 -1
  18. data/app/controllers/katello/api/v2/systems_controller.rb +1 -13
  19. data/app/controllers/katello/application_controller.rb +15 -18
  20. data/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb +11 -7
  21. data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
  22. data/app/controllers/katello/concerns/authorization/api/v2/content_views_controller.rb +1 -1
  23. data/app/controllers/katello/concerns/organizations_controller_extensions.rb +1 -1
  24. data/app/controllers/katello/concerns/smart_proxies_controller_extensions.rb +2 -2
  25. data/app/helpers/katello/application_helper.rb +1 -1
  26. data/app/helpers/katello/concerns/settings_helper_extensions.rb +3 -2
  27. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +1 -1
  28. data/app/helpers/katello/katello_form_builder.rb +1 -1
  29. data/app/helpers/katello/katello_url_helper.rb +2 -2
  30. data/app/lib/actions/candlepin/candlepin_listening_service.rb +3 -3
  31. data/app/lib/actions/candlepin/consumer/remove_subscription.rb +6 -0
  32. data/app/lib/actions/candlepin/import_pool_handler.rb +2 -1
  33. data/app/lib/actions/katello/capsule_content/create_repos.rb +1 -1
  34. data/app/lib/actions/katello/capsule_content/sync.rb +4 -5
  35. data/app/lib/actions/katello/content_view/errata_mail.rb +1 -1
  36. data/app/lib/actions/katello/content_view/presenters/incremental_updates_presenter.rb +1 -1
  37. data/app/lib/actions/katello/content_view/promote.rb +8 -3
  38. data/app/lib/actions/katello/content_view/publish.rb +8 -3
  39. data/app/lib/actions/katello/content_view/remove.rb +2 -2
  40. data/app/lib/actions/katello/content_view_version/incremental_update.rb +1 -1
  41. data/app/lib/actions/katello/host/erratum/applicable_errata_install.rb +1 -1
  42. data/app/lib/actions/katello/host/generate_applicability.rb +1 -1
  43. data/app/lib/actions/katello/host/hypervisors_update.rb +23 -5
  44. data/app/lib/actions/katello/host/register.rb +2 -11
  45. data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
  46. data/app/lib/actions/katello/host/update.rb +1 -1
  47. data/app/lib/actions/katello/host/update_content_view.rb +5 -1
  48. data/app/lib/actions/katello/repository/errata_mail.rb +1 -1
  49. data/app/lib/actions/katello/repository/export.rb +1 -1
  50. data/app/lib/actions/katello/repository/sync.rb +2 -0
  51. data/app/lib/actions/pulp/abstract_async_task.rb +1 -1
  52. data/app/lib/actions/pulp/abstract_async_task_group.rb +76 -0
  53. data/app/lib/actions/pulp/consumer/create.rb +1 -1
  54. data/app/lib/actions/pulp/repos/update.rb +2 -1
  55. data/app/lib/actions/pulp/repository/associate_importer.rb +4 -0
  56. data/app/lib/actions/pulp/repository/import_upload.rb +0 -4
  57. data/app/lib/actions/pulp/repository/refresh.rb +7 -18
  58. data/app/lib/actions/pulp/repository/regenerate_applicability.rb +2 -2
  59. data/app/lib/actions/pulp/repository/sync.rb +1 -1
  60. data/app/lib/actions/pulp/repository/update_importer.rb +4 -0
  61. data/app/lib/katello/api/v2/error_handling.rb +1 -1
  62. data/app/lib/katello/bulk_actions.rb +7 -8
  63. data/app/lib/katello/capsule_content.rb +11 -11
  64. data/app/lib/katello/errors.rb +2 -0
  65. data/app/lib/katello/glue/queue.rb +1 -1
  66. data/app/lib/katello/resources/candlepin.rb +3 -3
  67. data/app/lib/katello/resources/cdn.rb +1 -1
  68. data/app/lib/katello/util/cdn_var_substitutor.rb +1 -1
  69. data/app/lib/katello/util/package.rb +1 -1
  70. data/app/lib/katello/util/package_filter.rb +4 -4
  71. data/app/lib/katello/util/search.rb +3 -3
  72. data/app/lib/katello/validators/content_view_puppet_module_validator.rb +20 -14
  73. data/app/models/katello/activation_key.rb +4 -4
  74. data/app/models/katello/concerns/content_facet_host_extensions.rb +2 -2
  75. data/app/models/katello/concerns/host_managed_extensions.rb +6 -2
  76. data/app/models/katello/concerns/operatingsystem_extensions.rb +2 -2
  77. data/app/models/katello/concerns/organization_extensions.rb +5 -1
  78. data/app/models/katello/concerns/smart_proxy_extensions.rb +2 -13
  79. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +27 -2
  80. data/app/models/katello/content_view.rb +5 -5
  81. data/app/models/katello/content_view_erratum_filter_rule.rb +3 -3
  82. data/app/models/katello/content_view_filter.rb +3 -3
  83. data/app/models/katello/content_view_history.rb +4 -4
  84. data/app/models/katello/content_view_repository.rb +1 -1
  85. data/app/models/katello/erratum.rb +14 -10
  86. data/app/models/katello/glue.rb +0 -2
  87. data/app/models/katello/glue/candlepin/consumer.rb +4 -4
  88. data/app/models/katello/glue/candlepin/content.rb +2 -2
  89. data/app/models/katello/glue/candlepin/pool.rb +6 -0
  90. data/app/models/katello/glue/candlepin/product.rb +1 -1
  91. data/app/models/katello/glue/provider.rb +1 -1
  92. data/app/models/katello/glue/pulp/consumer.rb +3 -3
  93. data/app/models/katello/glue/pulp/repo.rb +26 -31
  94. data/app/models/katello/glue/pulp/repos.rb +1 -1
  95. data/app/models/katello/host/content_facet.rb +6 -1
  96. data/app/models/katello/host/subscription_facet.rb +1 -8
  97. data/app/models/katello/host_collection.rb +1 -82
  98. data/app/models/katello/hypervisor.rb +1 -1
  99. data/app/models/katello/kt_environment.rb +3 -2
  100. data/app/models/katello/package_group.rb +2 -2
  101. data/app/models/katello/ping.rb +4 -4
  102. data/app/models/katello/provider.rb +8 -1
  103. data/app/models/katello/pulp_sync_status.rb +7 -7
  104. data/app/models/katello/pulp_task_status.rb +1 -1
  105. data/app/models/katello/repository.rb +6 -6
  106. data/app/models/katello/rhsm_fact_parser.rb +0 -9
  107. data/app/models/katello/sync_plan.rb +14 -21
  108. data/app/models/katello/system.rb +6 -12
  109. data/app/models/katello/task_status.rb +3 -24
  110. data/app/models/setting/{katello.rb → content.rb} +10 -2
  111. data/app/overrides/add_about_page.rb +3 -3
  112. data/app/overrides/add_organization_attributes.rb +2 -2
  113. data/app/overrides/add_subscription_status.rb +1 -1
  114. data/app/services/katello/candlepin/consumer.rb +8 -8
  115. data/app/services/katello/pulp/consumer.rb +1 -1
  116. data/app/services/katello/pulp/consumer_group.rb +3 -3
  117. data/app/services/katello/pulp/docker_manifest.rb +1 -1
  118. data/app/services/katello/pulp/erratum.rb +1 -1
  119. data/app/services/katello/pulp/ostree_branch.rb +1 -1
  120. data/app/services/katello/pulp/package_group.rb +1 -1
  121. data/app/services/katello/pulp/puppet_module.rb +1 -1
  122. data/app/services/katello/pulp/rpm.rb +3 -3
  123. data/app/services/katello/puppet_class_importer_extensions.rb +1 -1
  124. data/app/views/dashboard/_subscription_status_widget.html.erb +1 -1
  125. data/app/views/foreman/smart_proxies/_content_sync.html.erb +1 -1
  126. data/app/views/foreman/unattended/finish-katello.erb +2 -2
  127. data/app/views/foreman/unattended/kickstart-katello.erb +2 -2
  128. data/app/views/foreman/unattended/userdata-katello.erb +2 -0
  129. data/app/views/katello/api/v2/common/_syncable.json.rabl +1 -1
  130. data/app/views/katello/api/v2/errata/show.json.rabl +2 -2
  131. data/app/views/katello/api/v2/{systems/releases.json.rabl → host_subscriptions/available_release_versions.json.rabl} +0 -0
  132. data/app/views/katello/api/v2/products/base.json.rabl +0 -19
  133. data/app/views/katello/api/v2/products/show.json.rabl +21 -2
  134. data/app/views/katello/api/v2/subscription_facet/base_with_root.json.rabl +2 -1
  135. data/app/views/katello/api/v2/subscriptions/show.json.rabl +19 -17
  136. data/config/katello.yml +242 -0
  137. data/config/routes/api/v2.rb +7 -6
  138. data/config/routes/overrides.rb +10 -5
  139. data/db/migrate/20140117160939_refactor_content_views.rb +4 -4
  140. data/db/migrate/20140318174203_drop_cdn_import_success_column.rb +1 -1
  141. data/db/migrate/20140404122011_drop_repositories_enabled_column.rb +1 -1
  142. data/db/migrate/20140610083129_add_pulp_proxy_to_host.rb +1 -1
  143. data/db/migrate/20140930170628_add_errata.rb +1 -1
  144. data/db/migrate/20141222151001_add_host_content_view_environment.rb +1 -1
  145. data/db/migrate/20150602153756_remove_user_notices.rb +1 -1
  146. data/db/migrate/20150602153757_remove_notices.rb +2 -2
  147. data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
  148. data/db/migrate/20160203195736_remove_docker_image_schema.rb +3 -1
  149. data/db/migrate/20160505181337_rename_katello_settings.rb +9 -0
  150. data/db/migrate/20160520175340_add_host_applicable_package.rb +8 -0
  151. data/db/migrate/20160605160933_remove_jobs.rb +25 -0
  152. data/db/migrate/20160605162929_remove_system_smart_proxy.rb +5 -0
  153. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/activation-key-associations.controller.js +14 -5
  154. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/details/views/activation-key-associations-content-hosts.html +8 -8
  155. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-action-packages.controller.js +16 -4
  156. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/bulk-actions-packages.html +27 -2
  157. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +17 -19
  158. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +1 -2
  159. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-packages.controller.js +1 -0
  160. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/views/content-host-packages.html +2 -0
  161. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +3 -3
  162. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details.controller.js +1 -1
  163. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +4 -4
  164. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-provisioning-info.html +1 -1
  165. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-subscriptions.html +2 -2
  166. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts-table-collapsed.html +1 -1
  167. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts-table-full.html +1 -1
  168. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-details.controller.js +1 -1
  169. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/details/content-view-versions.controller.js +0 -1
  170. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/gpg-key-details.controller.js +1 -1
  171. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/details/views/gpg-key-details.html +6 -6
  172. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.controller.js +3 -3
  173. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/gpg-keys.module.js +7 -7
  174. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/new-gpg-key.controller.js +1 -1
  175. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/new/views/gpg-key-new.html +2 -2
  176. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/gpg-keys/views/gpg-keys.html +1 -1
  177. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-subscription.factory.js +2 -1
  178. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/katello-features.run.js +5 -5
  179. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/check-current-organization.run.js +2 -2
  180. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/organizations/fenced-pages.service.js +2 -1
  181. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-associations-content-hosts.controller.js +1 -1
  182. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-associations-content-hosts.html +1 -1
  183. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/manifest/manifest-import.controller.js +3 -0
  184. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/new/views/new-sync-plan-form.html +1 -0
  185. data/engines/bastion_katello/lib/bastion_katello/version.rb +1 -1
  186. data/lib/katello.rb +0 -1
  187. data/lib/katello/engine.rb +12 -8
  188. data/lib/katello/permissions/content_host_permissions.rb +1 -1
  189. data/lib/katello/tasks/clean_backend_objects.rake +5 -6
  190. data/lib/katello/tasks/delete_orphaned_content.rake +1 -1
  191. data/lib/katello/tasks/jenkins.rake +1 -3
  192. data/lib/katello/tasks/jshint.rake +28 -29
  193. data/lib/katello/tasks/jsroutes.rake +2 -2
  194. data/lib/katello/tasks/regenerate_repo_metadata.rake +3 -5
  195. data/lib/katello/tasks/reindex.rake +17 -16
  196. data/lib/katello/tasks/rubocop.rake +1 -3
  197. data/lib/katello/tasks/setup.rake +3 -4
  198. data/lib/katello/tasks/test.rake +8 -23
  199. data/lib/katello/tasks/upgrades/2.4/import_distributions.rake +1 -2
  200. data/lib/katello/tasks/upgrades/2.4/import_package_groups.rake +1 -2
  201. data/lib/katello/tasks/upgrades/2.4/import_puppet_modules.rake +1 -2
  202. data/lib/katello/tasks/upgrades/2.4/import_rpms.rake +1 -1
  203. data/lib/katello/tasks/upgrades/2.4/import_subscriptions.rake +1 -2
  204. data/lib/katello/tasks/upgrades/3.0/add_export_distributor.rake +1 -1
  205. data/lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake +1 -1
  206. data/lib/katello/tasks/yard.rake +2 -2
  207. data/lib/katello/version.rb +1 -1
  208. metadata +14 -15
  209. data/app/models/katello/job.rb +0 -197
  210. data/app/models/katello/job_task.rb +0 -10
  211. data/app/views/katello/api/v2/systems_bulk_actions/applicable_errata.json.rabl +0 -7
  212. data/app/views/katello/api/v2/systems_bulk_actions/available_incremental_updates.json.rabl +0 -21
  213. data/app/views/katello/api/v2/systems_bulk_actions/erratum.json.rabl +0 -7
  214. data/app/views/katello/api/v2/systems_bulk_actions/job.json.rabl +0 -1
  215. data/db/migrate/20160619223332_fix_viewer_role.rb +0 -41
@@ -1,8 +1,7 @@
1
1
  namespace :katello do
2
2
  namespace :upgrades do
3
3
  namespace '2.4' do
4
- task :import_puppet_modules => ["environment"] do
5
-
4
+ task :import_puppet_modules => ["environment"] do
6
5
  User.current = User.anonymous_api_admin
7
6
  puts _("Importing Puppet Modules")
8
7
  Katello::PuppetModule.import_all
@@ -1,7 +1,7 @@
1
1
  namespace :katello do
2
2
  namespace :upgrades do
3
3
  namespace '2.4' do
4
- task :import_rpms => ["environment"] do
4
+ task :import_rpms => ["environment"] do
5
5
  User.current = User.anonymous_api_admin
6
6
 
7
7
  puts _("Importing Rpms")
@@ -1,8 +1,7 @@
1
1
  namespace :katello do
2
2
  namespace :upgrades do
3
3
  namespace '2.4' do
4
- task :import_subscriptions => ["environment"] do
5
-
4
+ task :import_subscriptions => ["environment"] do
6
5
  User.current = User.anonymous_api_admin
7
6
  puts _("Importing Subscriptions")
8
7
  Katello::Subscription.import_all
@@ -1,7 +1,7 @@
1
1
  namespace :katello do
2
2
  namespace :upgrades do
3
3
  namespace '3.0' do
4
- task :add_export_distributor => ["environment"] do
4
+ task :add_export_distributor => ["environment"] do
5
5
  User.current = User.anonymous_api_admin
6
6
  puts _("Refreshing existing repositories to add export distributor")
7
7
 
@@ -1,7 +1,7 @@
1
1
  namespace :katello do
2
2
  namespace :upgrades do
3
3
  namespace '3.0' do
4
- task :update_subscription_facet_backend_data => ["environment"] do
4
+ task :update_subscription_facet_backend_data => ["environment"] do
5
5
  User.current = User.anonymous_api_admin
6
6
  puts _("Updating backend data for subscription facets")
7
7
 
@@ -1,9 +1,9 @@
1
1
  begin
2
2
  require 'yard'
3
3
  YARD::Rake::YardocTask.new do |t|
4
- t.files = ['app/**/*.rb' ] # optional
4
+ t.files = ['app/**/*.rb'] # optional
5
5
  t.options = ['--output-dir=yard']
6
6
  end
7
- rescue LoadError
7
+ rescue LoadError # rubocop:disable Lint/HandleExceptions
8
8
  # yard not present, skipping this definition
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "3.0.2"
2
+ VERSION = "3.1.0.rc1".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katello
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.1.0.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - N/A
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-06 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -447,6 +447,7 @@ files:
447
447
  - app/controllers/katello/api/v2/gpg_keys_controller.rb
448
448
  - app/controllers/katello/api/v2/host_autocomplete_controller.rb
449
449
  - app/controllers/katello/api/v2/host_collections_controller.rb
450
+ - app/controllers/katello/api/v2/host_contents_controller.rb
450
451
  - app/controllers/katello/api/v2/host_errata_controller.rb
451
452
  - app/controllers/katello/api/v2/host_packages_controller.rb
452
453
  - app/controllers/katello/api/v2/host_subscriptions_controller.rb
@@ -673,6 +674,7 @@ files:
673
674
  - app/lib/actions/middleware/remote_action.rb
674
675
  - app/lib/actions/pulp/abstract.rb
675
676
  - app/lib/actions/pulp/abstract_async_task.rb
677
+ - app/lib/actions/pulp/abstract_async_task_group.rb
676
678
  - app/lib/actions/pulp/consumer.rb
677
679
  - app/lib/actions/pulp/consumer/abstract_content_action.rb
678
680
  - app/lib/actions/pulp/consumer/content_install.rb
@@ -873,8 +875,6 @@ files:
873
875
  - app/models/katello/host_installed_package.rb
874
876
  - app/models/katello/hypervisor.rb
875
877
  - app/models/katello/installed_package.rb
876
- - app/models/katello/job.rb
877
- - app/models/katello/job_task.rb
878
878
  - app/models/katello/key_host_collection.rb
879
879
  - app/models/katello/kt_environment.rb
880
880
  - app/models/katello/model.rb
@@ -910,7 +910,7 @@ files:
910
910
  - app/models/katello/system_activation_key.rb
911
911
  - app/models/katello/system_repository.rb
912
912
  - app/models/katello/task_status.rb
913
- - app/models/setting/katello.rb
913
+ - app/models/setting/content.rb
914
914
  - app/overrides/add_about_page.rb
915
915
  - app/overrides/add_activation_keys_input.rb
916
916
  - app/overrides/add_organization_attributes.rb
@@ -1045,6 +1045,7 @@ files:
1045
1045
  - app/views/katello/api/v2/host_errata/system_task.json.rabl
1046
1046
  - app/views/katello/api/v2/host_packages/base.json.rabl
1047
1047
  - app/views/katello/api/v2/host_packages/index.json.rabl
1048
+ - app/views/katello/api/v2/host_subscriptions/available_release_versions.json.rabl
1048
1049
  - app/views/katello/api/v2/host_subscriptions/content_override.json.rabl
1049
1050
  - app/views/katello/api/v2/host_subscriptions/events.json.rabl
1050
1051
  - app/views/katello/api/v2/host_subscriptions/index.json.rabl
@@ -1129,15 +1130,10 @@ files:
1129
1130
  - app/views/katello/api/v2/systems/package_profile.json.rabl
1130
1131
  - app/views/katello/api/v2/systems/pools.json.rabl
1131
1132
  - app/views/katello/api/v2/systems/regenerate_identity_certificates.json.rabl
1132
- - app/views/katello/api/v2/systems/releases.json.rabl
1133
1133
  - app/views/katello/api/v2/systems/remove_host_collections.json.rabl
1134
1134
  - app/views/katello/api/v2/systems/show.json.rabl
1135
1135
  - app/views/katello/api/v2/systems/subscriptions.json.rabl
1136
1136
  - app/views/katello/api/v2/systems/upload_package_profile.json.rabl
1137
- - app/views/katello/api/v2/systems_bulk_actions/applicable_errata.json.rabl
1138
- - app/views/katello/api/v2/systems_bulk_actions/available_incremental_updates.json.rabl
1139
- - app/views/katello/api/v2/systems_bulk_actions/erratum.json.rabl
1140
- - app/views/katello/api/v2/systems_bulk_actions/job.json.rabl
1141
1137
  - app/views/katello/api/v2/tasks/index.json.rabl
1142
1138
  - app/views/katello/api/v2/tasks/show.json.rabl
1143
1139
  - app/views/katello/api/v2/tasks/task_status_show.json.rabl
@@ -1196,6 +1192,7 @@ files:
1196
1192
  - config/initializers/rabl_init.rb
1197
1193
  - config/initializers/runcible.rb
1198
1194
  - config/katello.yaml.example
1195
+ - config/katello.yml
1199
1196
  - config/locales/README
1200
1197
  - config/locales/bn.yml
1201
1198
  - config/locales/compare_upstream.sh
@@ -1336,8 +1333,11 @@ files:
1336
1333
  - db/migrate/20160404132250_remove_katello_from_notification_name.rb
1337
1334
  - db/migrate/20160413230128_add_kickstart_repository_to_hosts_and_hostgroups.rb
1338
1335
  - db/migrate/20160426145517_move_host_description_to_host_comment.rb
1336
+ - db/migrate/20160505181337_rename_katello_settings.rb
1337
+ - db/migrate/20160520175340_add_host_applicable_package.rb
1339
1338
  - db/migrate/20160530184400_add_repo_id_indexes.rb
1340
- - db/migrate/20160619223332_fix_viewer_role.rb
1339
+ - db/migrate/20160605160933_remove_jobs.rb
1340
+ - db/migrate/20160605162929_remove_system_smart_proxy.rb
1341
1341
  - db/seeds.d/101-locations.rb
1342
1342
  - db/seeds.d/102-organizations.rb
1343
1343
  - db/seeds.d/103-provisioning_templates.rb
@@ -1962,14 +1962,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
1962
1962
  version: '0'
1963
1963
  required_rubygems_version: !ruby/object:Gem::Requirement
1964
1964
  requirements:
1965
- - - ">="
1965
+ - - ">"
1966
1966
  - !ruby/object:Gem::Version
1967
- version: '0'
1967
+ version: 1.3.1
1968
1968
  requirements: []
1969
1969
  rubyforge_project:
1970
- rubygems_version: 2.4.6
1970
+ rubygems_version: 2.2.5
1971
1971
  signing_key:
1972
1972
  specification_version: 4
1973
1973
  summary: ''
1974
1974
  test_files: []
1975
- has_rdoc:
@@ -1,197 +0,0 @@
1
- module Katello
2
- class Job < Katello::Model
3
- self.include_root_in_json = false
4
-
5
- include Glue
6
-
7
- belongs_to :job_owner, :polymorphic => true
8
-
9
- has_many :job_tasks, :class_name => "Katello::JobTask", :dependent => :destroy
10
- has_many :task_statuses, :through => :job_tasks
11
-
12
- validates_lengths_from_database
13
-
14
- class << self
15
- def refresh_tasks(ids)
16
- unless ids.nil? || ids.empty?
17
- uuids = TaskStatus.where(:id => ids).pluck(:uuid)
18
- uuids.each do |uuid|
19
- pulp_task = Katello.pulp_server.resources.task.poll(uuid)
20
- PulpTaskStatus.dump_state(pulp_task, TaskStatus.find_by(:uuid => pulp_task[:task_id]))
21
- end
22
- end
23
- end
24
-
25
- def refresh_for_owner(owner)
26
- # retrieve any 'in progress' tasks associated with the owner (e.g. system group)
27
- task_status_table = Katello::TaskStatus.table_name
28
- job_table = Katello::Job.table_name
29
- job_task_table = Katello::JobTask.table_name
30
-
31
- tasks = TaskStatus.where("#{task_status_table}.state" => [:waiting, :running]).where(
32
- "#{job_table}.job_owner_id" => owner.id, "#{job_table}.job_owner_type" => owner.class.name).joins(
33
- "INNER JOIN #{job_task_table} ON #{job_task_table}.task_status_id = #{task_status_table}.id").joins(
34
- "INNER JOIN #{job_table} ON #{job_table}.id = #{job_task_table}.job_id")
35
-
36
- ids = tasks.select("#{task_status_table}.id").collect { |row| row[:id] }
37
-
38
- # refresh the tasks via pulp
39
- refresh_tasks(ids) unless ids.empty?
40
-
41
- # retrieve the jobs for the current owner (e.g. system group)
42
- Job.where(:job_owner_id => owner.id, :job_owner_type => owner.class.name)
43
- end
44
- end
45
-
46
- def create_tasks(organization, pulp_tasks, task_type, parameters)
47
- # create an array of task status objects
48
-
49
- tasks = []
50
- pulp_tasks.each do |task|
51
- # if the task was returned with a UUID belonging to a system, associate that system with the task
52
- unless task[:call_request_tags].blank?
53
- uuid = task[:call_request_tags].first.split('pulp:consumer:').last
54
- system = System.where(:uuid => uuid).first
55
- end
56
-
57
- task_status = PulpTaskStatus.new(
58
- :organization => organization,
59
- :task_owner => system,
60
- :task_type => task_type,
61
- :parameters => parameters
62
- )
63
- task_status.merge_pulp_task!(task)
64
- task_status.save!
65
- tasks.push(task_status)
66
- end
67
-
68
- # add the task statuses to the job
69
- unless tasks.empty?
70
- self.task_statuses = tasks
71
- self.save!
72
- end
73
-
74
- tasks
75
- end
76
-
77
- def as_json(_options = {})
78
- first_task = self.task_statuses.first
79
- #check for first task
80
- if first_task.nil?
81
- return {:id => self.id, :state => 'error', :status_message => 'No tasks in job.'}
82
- else
83
- #since this is a collection of tasks, where
84
- # the type and parameters will all be the same
85
- # lets not return them in each task object, but instead
86
- # put them in the job
87
- tasks = self.task_statuses.collect do |t|
88
- {
89
- :id => t.id,
90
- :result => t.result,
91
- :progress => t.progress,
92
- :state => t.state,
93
- :uuid => t.uuid,
94
- :start_time => t.start_time,
95
- :finish_time => t.finish_time
96
- }
97
- end
98
- return {
99
- :id => self.id,
100
- :pulp_id => self.pulp_id,
101
- :created_at => first_task.created_at,
102
- :task_type => first_task.task_type,
103
- :parameters => first_task.parameters,
104
- :tasks => tasks,
105
-
106
- :state => self.state,
107
- :finish_time => self.finish_time,
108
- :status_message => self.status_message
109
- }
110
- end
111
- end
112
-
113
- def messages
114
- # Return a hash of the messages that may be rendered to the user to represent the status of the job.
115
- first_task = self.task_statuses.first
116
- #check for first task
117
- if first_task.nil?
118
- return {:id => self.id}
119
- else
120
- return {
121
- :task_type => TaskStatus::TYPES[first_task.task_type][:english_name],
122
- :summary_message => summary_message(first_task),
123
- :requested_action_message => requested_action_message(first_task),
124
- :pending_action_message => (pending_action_message(first_task) if state == :running),
125
- :parameters_message => parameters_message(first_task)
126
- }
127
- end
128
- end
129
-
130
- def finish_time
131
- self.task_statuses.order('finish_time DESC').last.finish_time
132
- end
133
-
134
- def pending?
135
- self.state == :running || self.state == :waiting
136
- end
137
-
138
- def state
139
- # determine the overall status of the job by evaluating the status of it's tasks
140
- # - running (aka installing), if 1 or more tasks are waiting or running
141
- # - error, if waiting+running is 0 and at least 1 error has occurred
142
- # - finished, otherwise...
143
- running = 0
144
- error = 0
145
- self.task_statuses.each do |task|
146
- if task.state == TaskStatus::Status::WAITING.to_s || task.state == TaskStatus::Status::RUNNING.to_s
147
- running += 1
148
- elsif task.state == TaskStatus::Status::ERROR.to_s
149
- error += 1
150
- end
151
- end
152
-
153
- state = :finished # assume the job is finished, by default
154
- if (running > 0)
155
- state = :running
156
- elsif (error > 0)
157
- state = :error
158
- end
159
- state
160
- end
161
-
162
- def status_message
163
- first_task = self.task_statuses.first
164
- details = TaskStatus::TYPES[first_task.task_type]
165
- details[:event_messages][self.state].first
166
- end
167
-
168
- private
169
-
170
- def pending_action_message(task)
171
- task.pending_message
172
- end
173
-
174
- def requested_action_message(task)
175
- task.message
176
- end
177
-
178
- def parameters_message(_task)
179
- first_task = self.task_statuses.first
180
- first_task.humanize_parameters unless first_task.nil?
181
- end
182
-
183
- def summary_message(_task)
184
- summary = ""
185
- first_task = self.task_statuses.first
186
- unless first_task.nil?
187
- job_template = TaskStatus::TYPES[first_task.task_type]
188
- if job_template[:user_message]
189
- summary = job_template[:user_message] % first_task.user.login
190
- else
191
- summary = job_template[:english_name]
192
- end
193
- end
194
- summary
195
- end
196
- end
197
- end
@@ -1,10 +0,0 @@
1
- module Katello
2
- class JobTask < Katello::Model
3
- self.include_root_in_json = false
4
-
5
- belongs_to :job, :inverse_of => :job_tasks
6
- belongs_to :task_status, :inverse_of => :job_task
7
-
8
- validates_lengths_from_database
9
- end
10
- end
@@ -1,7 +0,0 @@
1
- object false
2
-
3
- extends "katello/api/v2/common/metadata"
4
-
5
- node :results do
6
- partial("katello/api/v2/systems_bulk_actions/erratum", :object => @collection[:results])
7
- end
@@ -1,21 +0,0 @@
1
- collection @collection
2
-
3
- child :content_view_version => :content_view_version do
4
- attributes :name, :id, :version
5
-
6
- child :content_view => :content_view do
7
- attributes :id, :name, :label
8
- end
9
- end
10
-
11
- child :environments => :environments do
12
- attributes :name, :id
13
- end
14
-
15
- attributes :next_version, :content_host_count
16
-
17
- child :components => :components do
18
- attributes :name, :id
19
- attributes :next_incremental_version => :next_version
20
- attributes :content_view_id
21
- end
@@ -1,7 +0,0 @@
1
- extends "katello/api/v2/errata/show"
2
-
3
- node :applicable_consumers do |erratum|
4
- erratum.hosts_available.where(:host_id => @systems.map(&:host_id)).
5
- select(["#{Katello::Host::ContentFacet.table_name}.uuid", "#{Host.table_name}.name"]).
6
- collect { |system| {:name => system.name, :uuid => system.uuid} }
7
- end
@@ -1 +0,0 @@
1
- attributes :id
@@ -1,41 +0,0 @@
1
- class FixViewerRole < ActiveRecord::Migration
2
- class Role < ActiveRecord::Base
3
- has_many :filters
4
- end
5
-
6
- class Filter < ActiveRecord::Base
7
- belongs_to :role
8
- has_many :filterings, :dependent => :destroy
9
- has_many :permissions, :through => :filterings
10
-
11
- scope :unlimited, -> { where(:search => nil, :taxonomy_search => nil) }
12
-
13
- def resource_type
14
- type = @resource_type || permissions.first.try(:resource_type)
15
- type.blank? ? nil : type
16
- end
17
- end
18
-
19
- class Filtering < ActiveRecord::Base
20
- belongs_to :filter
21
- belongs_to :permission
22
- end
23
-
24
- class Permission < ActiveRecord::Base
25
- end
26
-
27
- def change
28
- viewer = Role.find_by name: 'Viewer'
29
- view_permission = Permission.find_by name: 'view_content_views'
30
-
31
- unless viewer.nil?
32
- filters = viewer.filters.unlimited.select { |filter| filter.resource_type == 'Katello::ContentView' }
33
- unless filters.empty?
34
- filters.each do |filter|
35
- unwanted_filterings = filter.filterings.select { |filtering| filtering.permission_id != view_permission.id }
36
- filter.filterings.delete(unwanted_filterings)
37
- end
38
- end
39
- end
40
- end
41
- end