katello 3.4.5 → 3.5.0.rc1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of katello might be problematic. Click here for more details.

Files changed (206) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -0
  3. data/app/assets/stylesheets/katello/katello.scss +7 -5
  4. data/app/controllers/katello/api/v2/activation_keys_controller.rb +3 -3
  5. data/app/controllers/katello/api/v2/api_controller.rb +8 -0
  6. data/app/controllers/katello/api/v2/capsule_content_controller.rb +6 -1
  7. data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +2 -1
  8. data/app/controllers/katello/api/v2/content_view_versions_controller.rb +1 -1
  9. data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
  10. data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -1
  11. data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -2
  12. data/app/controllers/katello/api/v2/host_tracer_controller.rb +1 -1
  13. data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +6 -6
  14. data/app/controllers/katello/api/v2/repositories_controller.rb +6 -7
  15. data/app/controllers/katello/api/v2/repository_sets_controller.rb +25 -4
  16. data/app/controllers/katello/concerns/api/v2/content_overrides_controller.rb +2 -4
  17. data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +10 -27
  18. data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +10 -14
  19. data/app/controllers/katello/concerns/hosts_controller_extensions.rb +33 -0
  20. data/app/helpers/katello/hosts_and_hostgroups_helper.rb +2 -1
  21. data/app/helpers/katello/organizations_helper.rb +1 -1
  22. data/app/helpers/katello/providers_helper.rb +1 -1
  23. data/app/lib/actions/candlepin/abstract_async_task.rb +1 -1
  24. data/app/lib/actions/candlepin/candlepin_listening_service.rb +17 -6
  25. data/app/lib/actions/candlepin/import_pool_handler.rb +21 -56
  26. data/app/lib/actions/candlepin/listen_on_candlepin_events.rb +1 -0
  27. data/app/lib/actions/candlepin/owner/import_products.rb +1 -3
  28. data/app/lib/actions/candlepin/product/content_create.rb +2 -0
  29. data/app/lib/actions/candlepin/product/content_update.rb +2 -0
  30. data/app/lib/actions/candlepin/product/create.rb +2 -10
  31. data/app/lib/actions/candlepin/product/create_unlimited_subscription.rb +8 -1
  32. data/app/lib/actions/katello/capsule_content/sync.rb +12 -3
  33. data/app/lib/actions/katello/host/attach_subscriptions.rb +1 -1
  34. data/app/lib/actions/katello/host/hypervisors_update.rb +2 -4
  35. data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
  36. data/app/lib/actions/katello/organization/create.rb +2 -2
  37. data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -2
  38. data/app/lib/actions/katello/product/content_create.rb +4 -4
  39. data/app/lib/actions/katello/product/create.rb +13 -11
  40. data/app/lib/actions/katello/repository/sync.rb +0 -1
  41. data/app/lib/actions/katello/repository/update.rb +2 -1
  42. data/app/lib/actions/pulp/consumer/generate_applicability.rb +5 -1
  43. data/app/lib/actions/pulp/repository/create.rb +1 -0
  44. data/app/lib/actions/pulp/repository/create_in_plan.rb +4 -4
  45. data/app/lib/actions/pulp/repository/sync.rb +1 -1
  46. data/app/lib/katello/http_resource.rb +1 -1
  47. data/app/lib/katello/lazy_accessor.rb +1 -1
  48. data/app/lib/katello/resources/candlepin.rb +2 -2
  49. data/app/lib/katello/util/data.rb +6 -0
  50. data/app/lib/katello/util/support.rb +1 -1
  51. data/app/models/katello/activation_key.rb +25 -7
  52. data/app/models/katello/concerns/host_managed_extensions.rb +60 -17
  53. data/app/models/katello/concerns/subscription_facet_host_extensions.rb +31 -10
  54. data/app/models/katello/content_facet_applicable_rpm.rb +0 -2
  55. data/app/models/katello/content_facet_erratum.rb +0 -2
  56. data/app/models/katello/content_facet_repository.rb +0 -2
  57. data/app/models/katello/content_view.rb +3 -4
  58. data/app/models/katello/content_view_component.rb +1 -3
  59. data/app/models/katello/content_view_docker_filter_rule.rb +0 -2
  60. data/app/models/katello/content_view_environment.rb +2 -4
  61. data/app/models/katello/content_view_erratum_filter_rule.rb +0 -2
  62. data/app/models/katello/content_view_filter.rb +0 -2
  63. data/app/models/katello/content_view_package_filter_rule.rb +0 -2
  64. data/app/models/katello/content_view_package_group_filter_rule.rb +0 -2
  65. data/app/models/katello/content_view_puppet_environment.rb +0 -2
  66. data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -2
  67. data/app/models/katello/content_view_puppet_module.rb +0 -2
  68. data/app/models/katello/content_view_repository.rb +0 -2
  69. data/app/models/katello/content_view_version.rb +0 -2
  70. data/app/models/katello/erratum_bugzilla.rb +0 -2
  71. data/app/models/katello/erratum_cve.rb +0 -2
  72. data/app/models/katello/erratum_package.rb +0 -2
  73. data/app/models/katello/ext/label_from_name.rb +1 -1
  74. data/app/models/katello/glue/candlepin/pool.rb +18 -11
  75. data/app/models/katello/glue/candlepin/product.rb +1 -2
  76. data/app/models/katello/glue/pulp/repo.rb +13 -6
  77. data/app/models/katello/glue/pulp/repos.rb +16 -16
  78. data/app/models/katello/gpg_key.rb +0 -2
  79. data/app/models/katello/host/content_facet.rb +21 -0
  80. data/app/models/katello/host/info_provider.rb +56 -0
  81. data/app/models/katello/host/subscription_facet.rb +5 -3
  82. data/app/models/katello/host_collection.rb +0 -2
  83. data/app/models/katello/host_collection_hosts.rb +0 -2
  84. data/app/models/katello/host_installed_package.rb +0 -2
  85. data/app/models/katello/host_tracer.rb +0 -2
  86. data/app/models/katello/key_host_collection.rb +0 -2
  87. data/app/models/katello/kt_environment.rb +0 -2
  88. data/app/models/katello/model.rb +1 -1
  89. data/app/models/katello/pool.rb +3 -3
  90. data/app/models/katello/product.rb +10 -3
  91. data/app/models/katello/provider.rb +0 -2
  92. data/app/models/katello/repository.rb +0 -2
  93. data/app/models/katello/repository_docker_manifest.rb +0 -2
  94. data/app/models/katello/repository_erratum.rb +0 -2
  95. data/app/models/katello/repository_file.rb +0 -2
  96. data/app/models/katello/repository_ostree_branch.rb +0 -2
  97. data/app/models/katello/repository_package_group.rb +0 -1
  98. data/app/models/katello/repository_puppet_module.rb +0 -2
  99. data/app/models/katello/repository_rpm.rb +0 -2
  100. data/app/models/katello/rpm.rb +2 -2
  101. data/app/models/katello/subscription_facet_activation_key.rb +0 -2
  102. data/app/models/katello/subscription_facet_pool.rb +6 -0
  103. data/app/models/katello/subscription_product.rb +0 -1
  104. data/app/models/katello/sync_plan.rb +0 -2
  105. data/app/models/katello/task_status.rb +2 -4
  106. data/app/models/setting/content.rb +2 -0
  107. data/app/services/katello/candlepin/consumer.rb +1 -2
  108. data/app/services/katello/candlepin/message_handler.rb +88 -0
  109. data/app/services/katello/repository_type_manager.rb +1 -1
  110. data/app/views/dashboard/_content_views_widget.html.erb +2 -2
  111. data/app/views/dashboard/_errata_widget.html.erb +3 -3
  112. data/app/views/foreman/smart_proxies/_content_sync.html.erb +25 -8
  113. data/app/views/foreman/unattended/kickstart-katello-atomic.erb +1 -1
  114. data/app/views/foreman/unattended/kickstart-katello.erb +1 -1
  115. data/app/views/katello/api/v2/common/_org_reference.json.rabl +1 -0
  116. data/app/views/katello/api/v2/content_facet/base.json.rabl +3 -14
  117. data/app/views/katello/api/v2/products/base.json.rabl +1 -1
  118. data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
  119. data/app/views/katello/api/v2/repository_sets/show.json.rabl +8 -1
  120. data/app/views/katello/api/v2/subscriptions/base.json.rabl +0 -7
  121. data/app/views/katello/api/v2/subscriptions/show.json.rabl +4 -37
  122. data/config/routes/overrides.rb +1 -0
  123. data/db/migrate/20140422000001_update_products_add_organization.rb +1 -1
  124. data/db/migrate/20140610154745_content_view_puppet_environment_id.rb +1 -1
  125. data/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb +1 -1
  126. data/db/migrate/20140626204902_add_unlimited_to_host_collection.rb +1 -1
  127. data/db/migrate/20141209103005_disown_foreman_templates.rb +1 -1
  128. data/db/migrate/20150901213759_remove_distributors.rb +1 -1
  129. data/db/migrate/20150908222711_drop_marketing_engineering_products.rb +1 -1
  130. data/db/migrate/20150930183738_migrate_content_hosts.rb +20 -20
  131. data/db/migrate/20151014144004_host_collection_to_hosts.rb +5 -5
  132. data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +1 -1
  133. data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +1 -1
  134. data/db/migrate/20160222143432_move_system_description_to_host.rb +2 -2
  135. data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +1 -1
  136. data/db/migrate/20160426145517_move_host_description_to_host_comment.rb +1 -1
  137. data/db/migrate/20160617124149_remove_duplicate_view_filters.rb +4 -4
  138. data/db/migrate/20160619223332_fix_viewer_role.rb +4 -4
  139. data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +1 -1
  140. data/db/migrate/20160924213020_change_katello_widget_names.rb +1 -1
  141. data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +2 -2
  142. data/db/migrate/20161026191118_fix_invalid_interfaces.rb +1 -1
  143. data/db/migrate/20170321012632_fill_in_content_view_components.rb +3 -3
  144. data/db/migrate/20170718142148_create_katello_subscription_facet_pools.rb +15 -0
  145. data/db/migrate/20170821170915_add_index_to_installed_packages.rb +5 -0
  146. data/db/migrate/20170821170916_add_nvra_index_to_installed_packages.rb +5 -0
  147. data/db/migrate/20170913183848_add_errata_counts.rb +23 -0
  148. data/db/seeds.d/101-locations.rb +2 -2
  149. data/db/seeds.d/102-organizations.rb +3 -3
  150. data/db/seeds.d/103-provisioning_templates.rb +29 -31
  151. data/db/seeds.d/104-proxy.rb +10 -12
  152. data/db/seeds.d/106-mail_notifications.rb +30 -32
  153. data/db/seeds.d/107-enable_dynflow.rb +3 -4
  154. data/db/seeds.d/108-subcription-bookmarks.rb +12 -10
  155. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.routes.js +1 -1
  156. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +1 -1
  157. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architecture.factory.js +15 -0
  158. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architectures.module.js +14 -0
  159. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
  160. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -0
  161. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +2 -2
  162. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +107 -0
  163. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +113 -0
  164. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +13 -0
  165. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +25 -4
  166. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +4 -4
  167. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +15 -12
  168. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +1 -1
  169. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +11 -5
  170. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-activation-keys.html +15 -12
  171. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-content-hosts.html +16 -12
  172. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +9 -6
  173. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata-counts.html +6 -12
  174. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +4 -1
  175. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +1 -0
  176. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/views/packages.html +5 -2
  177. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +20 -2
  178. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +9 -1
  179. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +22 -3
  180. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +17 -1
  181. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +1 -1
  182. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.module.js +1 -0
  183. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js +16 -0
  184. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +4 -0
  185. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +0 -19
  186. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html +31 -0
  187. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.routes.js +1 -1
  188. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +6 -3
  189. data/lib/katello/permissions/host_permissions.rb +1 -0
  190. data/lib/katello/plugin.rb +7 -5
  191. data/lib/katello/tasks/clean_installed_packages.rake +54 -0
  192. data/lib/katello/tasks/import_subscriptions.rake +8 -0
  193. data/lib/katello/tasks/{setup.rake → reset.rake} +10 -0
  194. data/lib/katello/tasks/test.rake +18 -0
  195. data/lib/katello/version.rb +1 -1
  196. data/vendor/assets/stylesheets/katello/{jquery-ui-1.8.11.custom.css → jquery-ui-1.8.11.custom.css.scss} +0 -0
  197. data/vendor/assets/stylesheets/katello/{jquery.loadmask.css → jquery.loadmask.css.scss} +0 -0
  198. data/vendor/assets/stylesheets/katello/{jquery.treeTable.scss → jquery.treeTable.css.scss} +0 -0
  199. data/vendor/assets/stylesheets/katello/{ui.spinner.css → ui.spinner.css.scss} +0 -0
  200. metadata +43 -21
  201. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-activation-keys.controller.js +0 -30
  202. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-content-hosts.controller.js +0 -45
  203. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-activation-keys.html +0 -48
  204. data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-content-hosts.html +0 -62
  205. data/lib/katello/tasks/upgrades/2.4/import_subscriptions.rake +0 -12
  206. data/lib/katello/tasks/upgrades/3.3/import_subscriptions.rake +0 -12
@@ -60,7 +60,7 @@ angular.module('Bastion.subscriptions').config(['$stateProvider', function ($sta
60
60
  }
61
61
  })
62
62
  .state('subscription.content-hosts', {
63
- url: '/content-hosts',
63
+ url: '/content-hosts?search',
64
64
  permission: 'view_subscriptions',
65
65
  controller: 'SubscriptionContentHostsController',
66
66
  templateUrl: 'subscriptions/details/views/subscription-content-hosts.html',
@@ -3,9 +3,12 @@
3
3
  No tasks exist for this resource.
4
4
  </span>
5
5
 
6
+ <div data-block="search">
7
+ <input type="text" class="form-control" placeholder="{{ 'Filter' | translate }}" ng-model="taskFilter" />
8
+ </div>
9
+
6
10
  <div data-block="table">
7
- <table bst-table="table"
8
- ng-class="{'table-mask': table.working}" class="table table-striped table-bordered">
11
+ <table bst-table="table" ng-class="{'table-mask': table.working}" class="table table-striped table-bordered">
9
12
  <thead>
10
13
  <tr bst-table-head>
11
14
  <th bst-table-column="Status"><span translate>Status</span></th>
@@ -16,7 +19,7 @@
16
19
  </thead>
17
20
 
18
21
  <tbody>
19
- <tr bst-table-row ng-repeat="task in table.rows">
22
+ <tr bst-table-row ng-repeat="task in table.rows | filter:taskFilter">
20
23
  <td bst-table-cell>
21
24
  <div ng-class="{ active: (task.state === 'pending' || task.state === 'running') }" class="progress progress-striped">
22
25
  <span uib-progressbar animate="false" value="task.progressbar.value" type="{{task.progressbar.type}}"></span>
@@ -34,6 +34,7 @@ Foreman::AccessControl.permission(:edit_hosts).actions.concat [
34
34
  ]
35
35
 
36
36
  Foreman::AccessControl.permission(:view_hosts).actions.concat [
37
+ 'hosts/content_hosts',
37
38
  'hosts/puppet_environment_for_content_view',
38
39
  'katello/api/v2/host_autocomplete/auto_complete_search',
39
40
  'katello/api/v2/host_errata/index',
@@ -1,7 +1,7 @@
1
1
  require 'katello/permission_creator'
2
2
 
3
3
  Foreman::Plugin.register :katello do
4
- requires_foreman '>= 1.15'
4
+ requires_foreman '>= 1.16'
5
5
 
6
6
  sub_menu :top_menu, :content_menu, :caption => N_('Content'), :after => :monitor_menu do
7
7
  menu :top_menu,
@@ -239,10 +239,10 @@ Foreman::Plugin.register :katello do
239
239
  end
240
240
 
241
241
  tests_to_skip("AccessPermissionsTest" => [
242
- 'foreman_tasks/api/tasks/callback should have a permission that grants access',
243
- 'bastion/bastion/index should have a permission that grants access',
244
- 'bastion/bastion/index_ie should have a permission that grants access'
245
- ])
242
+ 'foreman_tasks/api/tasks/callback should have a permission that grants access',
243
+ 'bastion/bastion/index should have a permission that grants access',
244
+ 'bastion/bastion/index_ie should have a permission that grants access'
245
+ ])
246
246
 
247
247
  add_controller_action_scope(HostsController, :index) do |base_scope|
248
248
  base_scope
@@ -256,6 +256,8 @@ Foreman::Plugin.register :katello do
256
256
  .preload(content_facet: [:bound_repositories, :content_view, :lifecycle_environment])
257
257
  end
258
258
 
259
+ register_info_provider Katello::Host::InfoProvider
260
+
259
261
  Katello::PermissionCreator.new(self).define
260
262
  add_all_permissions_to_default_roles
261
263
  end
@@ -0,0 +1,54 @@
1
+ namespace :katello do
2
+ desc "Clean duplicate installed packages"
3
+ task :clean_installed_packages => :environment do
4
+ User.current = User.anonymous_admin
5
+
6
+ puts "Populating cache"
7
+ cache = PackageCache.new
8
+ cache.populate
9
+
10
+ total = ::Host.count
11
+ count = 1
12
+ ::Host.find_each do |host|
13
+ puts "Host #{count}/#{total} #{host.name}"
14
+
15
+ if host.installed_package_ids.any?
16
+ nvras = host.installed_packages.pluck(:nvra)
17
+ ids = nvras.map { |nvra| cache.fetch(nvra) }
18
+ existing_ids = host.installed_package_ids.to_a
19
+ unless existing_ids.sort == ids.sort
20
+ host.sync_package_associations(ids)
21
+ end
22
+ end
23
+ count += 1
24
+ end
25
+
26
+ existing = Katello::HostInstalledPackage.select(:installed_package_id).uniq.pluck(:installed_package_id)
27
+
28
+ batch = 20_000
29
+ until Katello::InstalledPackage.where('id not in (?)', existing).limit(1).count == 0
30
+ deleted = Katello::InstalledPackage.where('id not in (?)', existing).where("id < #{batch}").delete_all
31
+ sleep(3) if deleted > 0
32
+ puts "Batch of installed packages deleted, #{Katello::InstalledPackage.count} remaining in total"
33
+ batch += 20_000
34
+ end
35
+
36
+ Setting[:bulk_query_installed_packages] = true
37
+ end
38
+
39
+ class PackageCache
40
+ def initialize
41
+ @cache = {}
42
+ end
43
+
44
+ def populate
45
+ Katello::InstalledPackage.select("nvra, MIN(id) as id").group("nvra").each do |pkg|
46
+ @cache[pkg.nvra] = pkg.id
47
+ end
48
+ end
49
+
50
+ def fetch(nvra)
51
+ @cache[nvra] ||= Katello::InstalledPackage.where(:nvra => nvra).first.id
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,8 @@
1
+ namespace :katello do
2
+ task :import_subscriptions => ["environment"] do
3
+ User.current = User.anonymous_api_admin
4
+ puts _("Importing Subscriptions")
5
+ Katello::Subscription.import_all
6
+ Katello::Pool.import_all
7
+ end
8
+ end
@@ -26,6 +26,15 @@ namespace :katello do
26
26
  end
27
27
  end
28
28
 
29
+ task :reset_default_smart_proxy do
30
+ User.current = User.anonymous_admin
31
+ hostname = Socket.gethostname.chomp
32
+ Setting['ssl_ca_file'] = "/etc/pki/katello/certs/katello-default-ca.crt"
33
+ Setting['ssl_certificate'] = "/etc/pki/katello/certs/#{hostname}-foreman-client.crt"
34
+ Setting['ssl_priv_key'] = "/etc/pki/katello/private/#{hostname}-foreman-client.key"
35
+ SmartProxy.where(name: hostname, url: "https://#{hostname}:9090").first_or_create!
36
+ end
37
+
29
38
  desc "Resets Foreman/Katello development environemnt. WARNING: This will destroy all your Foreman and Katello data."
30
39
  task :reset_backends do
31
40
  Rake::Task['katello:reset_backends:candlepin'].invoke
@@ -43,5 +52,6 @@ namespace :katello do
43
52
  # Otherwise migration and seeds fail because they require a reloaded environment
44
53
  system('rake db:migrate')
45
54
  system('rake db:seed')
55
+ Rake::Task['katello:reset_default_smart_proxy'].invoke
46
56
  end
47
57
  end
@@ -103,6 +103,24 @@ namespace :test do
103
103
  Rake::Task[test_task.name].invoke
104
104
  end
105
105
 
106
+ desc "Delete scenario vcr cassettes and run the katello scenario tests in live mode"
107
+ task :live_scenarios => ['db:test:prepare'] do
108
+ files = Dir[File.join(::Katello::Engine.root, 'test/fixtures/vcr_cassettes/scenarios/', '**/*.yml')]
109
+ files.each { |file| File.delete(file) }
110
+
111
+ ENV['mode'] = 'all'
112
+ test_task = Rake::TestTask.new('katello_scenario_test_task') do |t|
113
+ t.libs << ["test", "#{Katello::Engine.root}/test"]
114
+ t.test_files = [
115
+ "#{Katello::Engine.root}/test/scenarios/*_test.rb"
116
+ ]
117
+ t.verbose = true
118
+ t.warning = false
119
+ end
120
+
121
+ Rake::Task[test_task.name].invoke
122
+ end
123
+
106
124
  desc "Run the Katello plugin unit glue test suite."
107
125
  task :glue => ['db:test:prepare'] do
108
126
  test_task = Rake::TestTask.new('katello_glue_test_task') do |t|
@@ -1,3 +1,3 @@
1
1
  module Katello
2
- VERSION = "3.4.5".freeze
2
+ VERSION = "3.5.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.4.5
4
+ version: 3.5.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: 2017-08-29 00:00:00.000000000 Z
11
+ date: 2017-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -136,26 +136,40 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: apipie-rails
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: 0.5.4
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: 0.5.4
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: runcible
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - ">="
144
158
  - !ruby/object:Gem::Version
145
- version: 1.10.0
159
+ version: 2.1.0
146
160
  - - "<"
147
161
  - !ruby/object:Gem::Version
148
- version: 2.0.0
162
+ version: 3.0.0
149
163
  type: :runtime
150
164
  prerelease: false
151
165
  version_requirements: !ruby/object:Gem::Requirement
152
166
  requirements:
153
167
  - - ">="
154
168
  - !ruby/object:Gem::Version
155
- version: 1.10.0
169
+ version: 2.1.0
156
170
  - - "<"
157
171
  - !ruby/object:Gem::Version
158
- version: 2.0.0
172
+ version: 3.0.0
159
173
  - !ruby/object:Gem::Dependency
160
174
  name: anemone
161
175
  requirement: !ruby/object:Gem::Requirement
@@ -196,7 +210,7 @@ dependencies:
196
210
  requirements:
197
211
  - - ">="
198
212
  - !ruby/object:Gem::Version
199
- version: 5.0.0
213
+ version: 5.0.5
200
214
  - - "<"
201
215
  - !ruby/object:Gem::Version
202
216
  version: 6.0.0
@@ -206,7 +220,7 @@ dependencies:
206
220
  requirements:
207
221
  - - ">="
208
222
  - !ruby/object:Gem::Version
209
- version: 5.0.0
223
+ version: 5.0.5
210
224
  - - "<"
211
225
  - !ruby/object:Gem::Version
212
226
  version: 6.0.0
@@ -891,6 +905,7 @@ files:
891
905
  - app/models/katello/gpg_key.rb
892
906
  - app/models/katello/hash_util.rb
893
907
  - app/models/katello/host/content_facet.rb
908
+ - app/models/katello/host/info_provider.rb
894
909
  - app/models/katello/host/subscription_facet.rb
895
910
  - app/models/katello/host_collection.rb
896
911
  - app/models/katello/host_collection_hosts.rb
@@ -927,6 +942,7 @@ files:
927
942
  - app/models/katello/rpm.rb
928
943
  - app/models/katello/subscription.rb
929
944
  - app/models/katello/subscription_facet_activation_key.rb
945
+ - app/models/katello/subscription_facet_pool.rb
930
946
  - app/models/katello/subscription_product.rb
931
947
  - app/models/katello/subscription_status.rb
932
948
  - app/models/katello/sync_plan.rb
@@ -951,6 +967,7 @@ files:
951
967
  - app/services/cert/rhsm_client.rb
952
968
  - app/services/katello/authentication/client_authentication.rb
953
969
  - app/services/katello/candlepin/consumer.rb
970
+ - app/services/katello/candlepin/message_handler.rb
954
971
  - app/services/katello/event_queue.rb
955
972
  - app/services/katello/proxy_status/pulp.rb
956
973
  - app/services/katello/proxy_status/pulp_node.rb
@@ -1388,6 +1405,10 @@ files:
1388
1405
  - db/migrate/20170222131211_change_pool_columns_to_dates.rb
1389
1406
  - db/migrate/20170321012632_fill_in_content_view_components.rb
1390
1407
  - db/migrate/20170523182831_create_docker_meta_tag.rb
1408
+ - db/migrate/20170718142148_create_katello_subscription_facet_pools.rb
1409
+ - db/migrate/20170821170915_add_index_to_installed_packages.rb
1410
+ - db/migrate/20170821170916_add_nvra_index_to_installed_packages.rb
1411
+ - db/migrate/20170913183848_add_errata_counts.rb
1391
1412
  - db/seeds.d/101-locations.rb
1392
1413
  - db/seeds.d/102-organizations.rb
1393
1414
  - db/seeds.d/103-provisioning_templates.rb
@@ -1424,6 +1445,8 @@ files:
1424
1445
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/new-activation-key.controller.js
1425
1446
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html
1426
1447
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/views/activation-keys.html
1448
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architecture.factory.js
1449
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architectures.module.js
1427
1450
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js
1428
1451
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js
1429
1452
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js
@@ -1443,12 +1466,14 @@ files:
1443
1466
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-errata-modal.controller.js
1444
1467
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-host-collections-modal.controller.js
1445
1468
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-packages-modal.controller.js
1469
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js
1446
1470
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-subscriptions-modal.controller.js
1447
1471
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-destroy-modal.html
1448
1472
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-environment-modal.html
1449
1473
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-errata-modal.html
1450
1474
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-host-collections-modal.html
1451
1475
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-packages-modal.html
1476
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html
1452
1477
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-subscriptions-modal.html
1453
1478
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/errata-content-hosts.html
1454
1479
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/errata-details.html
@@ -1823,18 +1848,15 @@ files:
1823
1848
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/puppet-modules.routes.js
1824
1849
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/puppet-modules/views/puppet-modules.html
1825
1850
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/content-override-helper.service.js
1851
+ - engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js
1826
1852
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-sets-enabled.filter.js
1827
1853
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-sets.module.js
1828
1854
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/setting.factory.js
1829
1855
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/settings/settings.module.js
1830
1856
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/content-access-mode-banner.directive.js
1831
- - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-activation-keys.controller.js
1832
- - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-content-hosts.controller.js
1833
1857
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js
1834
1858
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-product-details.controller.js
1835
1859
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-products.controller.js
1836
- - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-activation-keys.html
1837
- - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-content-hosts.html
1838
1860
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html
1839
1861
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html
1840
1862
  - engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-products.html
@@ -1924,15 +1946,17 @@ files:
1924
1946
  - lib/katello/repository_types/puppet.rb
1925
1947
  - lib/katello/repository_types/yum.rb
1926
1948
  - lib/katello/tasks/clean_backend_objects.rake
1949
+ - lib/katello/tasks/clean_installed_packages.rake
1927
1950
  - lib/katello/tasks/clean_published_repo_directories.rake
1928
1951
  - lib/katello/tasks/delete_orphaned_content.rake
1929
1952
  - lib/katello/tasks/import_applicability.rake
1953
+ - lib/katello/tasks/import_subscriptions.rake
1930
1954
  - lib/katello/tasks/jenkins.rake
1931
1955
  - lib/katello/tasks/regenerate_ueber_certs.rake
1932
1956
  - lib/katello/tasks/reimport.rake
1933
1957
  - lib/katello/tasks/repository.rake
1958
+ - lib/katello/tasks/reset.rake
1934
1959
  - lib/katello/tasks/rubocop.rake
1935
- - lib/katello/tasks/setup.rake
1936
1960
  - lib/katello/tasks/test.rake
1937
1961
  - lib/katello/tasks/unify_hosts.rake
1938
1962
  - lib/katello/tasks/update_subscription_facet_backend_data.rake
@@ -1941,13 +1965,11 @@ files:
1941
1965
  - lib/katello/tasks/upgrades/2.4/import_package_groups.rake
1942
1966
  - lib/katello/tasks/upgrades/2.4/import_puppet_modules.rake
1943
1967
  - lib/katello/tasks/upgrades/2.4/import_rpms.rake
1944
- - lib/katello/tasks/upgrades/2.4/import_subscriptions.rake
1945
1968
  - lib/katello/tasks/upgrades/3.0/add_export_distributor.rake
1946
1969
  - lib/katello/tasks/upgrades/3.0/delete_docker_v1_content.rake
1947
1970
  - lib/katello/tasks/upgrades/3.0/update_puppet_repository_distributors.rake
1948
1971
  - lib/katello/tasks/upgrades/3.0/update_subscription_facet_backend_data.rake
1949
1972
  - lib/katello/tasks/upgrades/3.3/hypervisors.rake
1950
- - lib/katello/tasks/upgrades/3.3/import_subscriptions.rake
1951
1973
  - lib/katello/tasks/upgrades/3.4/remove_unused_products.rake
1952
1974
  - lib/katello/tasks/virt_who_report.rake
1953
1975
  - lib/katello/url_constrained_cookie_store.rb
@@ -2035,13 +2057,13 @@ files:
2035
2057
  - vendor/assets/javascripts/katello/jquery.treeTable.js
2036
2058
  - vendor/assets/javascripts/katello/jquery.trunk8.js
2037
2059
  - vendor/assets/stylesheets/katello/facebox.css
2038
- - vendor/assets/stylesheets/katello/jquery-ui-1.8.11.custom.css
2060
+ - vendor/assets/stylesheets/katello/jquery-ui-1.8.11.custom.css.scss
2039
2061
  - vendor/assets/stylesheets/katello/jquery.jnotify.css
2040
- - vendor/assets/stylesheets/katello/jquery.loadmask.css
2062
+ - vendor/assets/stylesheets/katello/jquery.loadmask.css.scss
2041
2063
  - vendor/assets/stylesheets/katello/jquery.multiselect.css
2042
2064
  - vendor/assets/stylesheets/katello/jquery.multiselect.filter.css
2043
- - vendor/assets/stylesheets/katello/jquery.treeTable.scss
2044
- - vendor/assets/stylesheets/katello/ui.spinner.css
2065
+ - vendor/assets/stylesheets/katello/jquery.treeTable.css.scss
2066
+ - vendor/assets/stylesheets/katello/ui.spinner.css.scss
2045
2067
  homepage: http://www.katello.org
2046
2068
  licenses: []
2047
2069
  metadata: {}
@@ -2056,9 +2078,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2056
2078
  version: '0'
2057
2079
  required_rubygems_version: !ruby/object:Gem::Requirement
2058
2080
  requirements:
2059
- - - ">="
2081
+ - - ">"
2060
2082
  - !ruby/object:Gem::Version
2061
- version: '0'
2083
+ version: 1.3.1
2062
2084
  requirements: []
2063
2085
  rubyforge_project:
2064
2086
  rubygems_version: 2.4.6
@@ -1,30 +0,0 @@
1
- /**
2
- * @ngdoc object
3
- * @name Bastion.subscriptions.controller:SubscriptionActivationKeysController
4
- *
5
- * @requires $scope
6
- * @requires $q
7
- * @requires translate
8
- * @requires Subscription
9
- *
10
- * @description
11
- * Provides the functionality for the subscription details for activation keys.
12
- */
13
- angular.module('Bastion.subscriptions').controller('SubscriptionActivationKeysController',
14
- ['$scope', '$q', 'translate', 'Subscription',
15
- function ($scope, $q, translate, Subscription) {
16
-
17
- if ($scope.activationKeys) {
18
- $scope.working = false;
19
- } else {
20
- $scope.working = true;
21
- }
22
-
23
- $scope.table = {};
24
-
25
- Subscription.get({id: $scope.$stateParams.subscriptionId}, function (subscription) {
26
- $scope.activationKeys = subscription['activation_keys'];
27
- $scope.working = false;
28
- });
29
- }]
30
- );