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
@@ -14,7 +14,7 @@ timezone --utc <%= @host.params['time-zone'] || 'UTC' %>
14
14
  <% dhcp = !@static -%>
15
15
  <% end -%>
16
16
 
17
- network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname <%= @host %><%= " --device=#{@host.mac}" -%>
17
+ network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select{ |item| item.present? }.join(',')}" %> --hostname <%= @host %><%= " --device=#{@host.mac}" -%>
18
18
 
19
19
  # Partition table should create /boot and a volume atomicos
20
20
  <% if @dynamic -%>
@@ -35,7 +35,7 @@ skipx
35
35
  <% dhcp = !@static -%>
36
36
  <% end -%>
37
37
 
38
- network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname <%= @host %><%= os_major >= 6 ? " --device=#{@host.mac}" : '' -%>
38
+ network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select{ |item| item.present? }.join(',')}" %> --hostname <%= @host %><%= os_major >= 6 ? " --device=#{@host.mac}" : '' -%>
39
39
 
40
40
  rootpw --iscrypted <%= root_pass %>
41
41
  firewall --<%= os_major >= 6 ? 'service=' : '' %>ssh
@@ -1,3 +1,4 @@
1
+ attribute :organization_id
1
2
  child :organization => :organization do |_r|
2
3
  attribute :name
3
4
  attribute :label
@@ -2,7 +2,9 @@ attributes :id, :uuid
2
2
  attributes :content_view_id, :content_view_name
3
3
  attributes :lifecycle_environment_id, :lifecycle_environment_name
4
4
  attributes :content_source_id, :content_source_name
5
- attributes :kickstart_repository_id
5
+ attributes :kickstart_repository_id, :errata_counts
6
+ attributes :applicable_rpm_count => :applicable_package_count
7
+ attributes :upgradable_rpm_count => :upgradable_package_count
6
8
 
7
9
  child :content_view => :content_view do
8
10
  attributes :id, :name
@@ -15,16 +17,3 @@ end
15
17
  child :content_source => :content_source do
16
18
  attributes :id, :name, :url
17
19
  end
18
-
19
- node :errata_counts do |content_facet|
20
- errata = content_facet.installable_errata
21
- partial('katello/api/v2/errata/counts', :object => Katello::RelationPresenter.new(errata))
22
- end
23
-
24
- node :applicable_package_count do |facet|
25
- facet.applicable_rpms.count
26
- end
27
-
28
- node :upgradable_package_count do |facet|
29
- facet.installable_rpms.count
30
- end
@@ -13,7 +13,7 @@ attributes :gpg_key_id
13
13
  attributes :available_content => :available_content, :if => params[:include_available_content]
14
14
 
15
15
  child :sync_plan do
16
- attributes :name, :description, :sync_date, :interval, :next_sync
16
+ attributes :id, :name, :description, :sync_date, :interval, :next_sync
17
17
  end
18
18
 
19
19
  node :repository_count do |product|
@@ -2,7 +2,7 @@ object @resource
2
2
 
3
3
  extends 'katello/api/v2/common/identifier'
4
4
 
5
- attributes :content_type, :url, :relative_path
5
+ attributes :content_type, :url, :relative_path, :arch
6
6
  attributes :pulp_id => :backend_identifier
7
7
 
8
8
  child :product do |_product|
@@ -4,7 +4,14 @@ object @resource
4
4
 
5
5
  glue :content do
6
6
  extends 'katello/api/v2/common/identifier'
7
- attributes :type, :updated, :vendor, :gpgUrl, :contentUrl
7
+ attributes :type, :updated, :vendor, :gpgUrl, :contentUrl, :label
8
+ end
9
+ attribute :enabled
10
+
11
+ if @resource.product
12
+ child :product => :product do
13
+ attributes :id, :name
14
+ end
8
15
  end
9
16
 
10
17
  child @resource.repositories => :repositories do
@@ -16,10 +16,3 @@ attributes :name => :product_name
16
16
  attributes :unmapped_guest
17
17
  attributes :virt_only
18
18
  attributes :virt_who
19
-
20
- node :host, :if => lambda { |sub| sub && sub.hypervisor } do |subscription|
21
- {
22
- id: subscription.hypervisor.id,
23
- name: subscription.hypervisor.name
24
- }
25
- end
@@ -6,49 +6,16 @@ attributes :arch
6
6
  attributes :description
7
7
  attributes :support_type
8
8
 
9
+ node(:host_count) do |subscription|
10
+ subscription.hosts.count
11
+ end
12
+
9
13
  node :provided_products, :if => lambda { |sub| sub && !sub.products.blank? } do |subscription|
10
14
  subscription.products.map do |product|
11
15
  {id: product[:id], name: product[:name]}
12
16
  end
13
17
  end
14
18
 
15
- node :systems do |subscription|
16
- subscription.hosts.map do |host|
17
- facts = host.facts
18
- {
19
- uuid: host.subscription_facet.try(:uuid),
20
- host_id: host.id,
21
- name: host.name,
22
- environment: { id: host.content_facet.try(:lifecycle_environment).try(:id),
23
- name: host.content_facet.try(:lifecycle_environment).try(:name) },
24
- content_view: { id: host.content_facet.try(:content_view).try(:id),
25
- name: host.content_facet.try(:content_view).try(:name) },
26
- created: host.subscription_facet.try(:registered_at),
27
- checkin_time: host.subscription_facet.try(:last_checkin),
28
- entitlement_status: host.subscription_status,
29
- service_level: host.subscription_facet.try(:service_level),
30
- autoheal: host.subscription_facet.try(:autoheal),
31
- facts: {
32
- dmi: {
33
- memory: {
34
- size: facts['dmi::memory::size']
35
- }
36
- },
37
- memory: {
38
- memtotal: facts['memory::memtotal']
39
- },
40
- cpu: {
41
- 'cpu_socket(s)' => facts['cpu::cpu_socket(s)'],
42
- 'core(s)_per_socket' => facts['cpu::core(s)_per_socket']
43
- },
44
- virt: {
45
- is_guest: facts['virt::is_guest']
46
- }
47
- }
48
- }
49
- end
50
- end
51
-
52
19
  node :activation_keys do |subscription|
53
20
  subscription.activation_keys.readable.map do |key|
54
21
  {
@@ -23,6 +23,7 @@ Foreman::Application.routes.draw do
23
23
 
24
24
  resources :hosts, :only => [] do
25
25
  get 'puppet_environment_for_content_view', :on => :collection
26
+ get :content_hosts, :on => :collection
26
27
  end
27
28
 
28
29
  resources :smart_proxies, :only => [] do
@@ -1,5 +1,5 @@
1
1
  class UpdateProductsAddOrganization < ActiveRecord::Migration
2
- class Katello::Product < ActiveRecord::Base
2
+ class Katello::Product < ApplicationRecord
3
3
  belongs_to :provider
4
4
  self.inheritance_column = nil
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class ContentViewPuppetEnvironmentId < ActiveRecord::Migration
2
- class ::Environment < ActiveRecord::Base
2
+ class ::Environment < ApplicationRecord
3
3
  def self.find_by_katello_id(org, env, content_view)
4
4
  katello_id = Environment.construct_katello_id(org, env, content_view)
5
5
  Environment.where(:katello_id => katello_id).first
@@ -1,5 +1,5 @@
1
1
  class AddUnlimitedToActivationKeys < ActiveRecord::Migration
2
- class ::Katello::ActivationKeys < ActiveRecord::Base
2
+ class ::Katello::ActivationKeys < ApplicationRecord
3
3
  end
4
4
 
5
5
  def up
@@ -1,5 +1,5 @@
1
1
  class AddUnlimitedToHostCollection < ActiveRecord::Migration
2
- class ::Katello::HostCollections < ActiveRecord::Base
2
+ class ::Katello::HostCollections < ApplicationRecord
3
3
  end
4
4
 
5
5
  def up
@@ -1,5 +1,5 @@
1
1
  class DisownForemanTemplates < ActiveRecord::Migration
2
- class FakeConfigTemplate < ActiveRecord::Base
2
+ class FakeConfigTemplate < ApplicationRecord
3
3
  if ActiveRecord::Base.connection.table_exists?('config_templates')
4
4
  self.table_name = 'config_templates'
5
5
  else
@@ -1,5 +1,5 @@
1
1
  class RemoveDistributors < ActiveRecord::Migration
2
- class Katello::Distributor < ActiveRecord::Base
2
+ class Katello::Distributor < ApplicationRecord
3
3
  self.table_name = 'katello_distributors'
4
4
  end
5
5
 
@@ -1,5 +1,5 @@
1
1
  class DropMarketingEngineeringProducts < ActiveRecord::Migration
2
- class Katello::MarketingProduct < ActiveRecord::Base
2
+ class Katello::MarketingProduct < ApplicationRecord
3
3
  self.table_name = "katello_products"
4
4
  end
5
5
 
@@ -1,7 +1,7 @@
1
1
  class MigrateContentHosts < ActiveRecord::Migration
2
2
  HYPERVISOR_CLASS = 'Katello::Hypervisor'.freeze
3
3
 
4
- class Location < ActiveRecord::Base
4
+ class Location < ApplicationRecord
5
5
  self.table_name = "taxonomies"
6
6
 
7
7
  def self.default_location
@@ -10,20 +10,20 @@ class MigrateContentHosts < ActiveRecord::Migration
10
10
  end
11
11
  end
12
12
 
13
- class Organization < ActiveRecord::Base
13
+ class Organization < ApplicationRecord
14
14
  self.table_name = "taxonomies"
15
15
 
16
16
  has_many :kt_environments, :class_name => "MigrateContentHosts::KTEnvironment",
17
17
  :dependent => :restrict_with_exception, :inverse_of => :organization
18
18
  end
19
19
 
20
- class SmartProxy < ActiveRecord::Base
20
+ class SmartProxy < ApplicationRecord
21
21
  self.table_name = "smart_proxies"
22
22
 
23
23
  belongs_to :content_host, :class_name => "MigrateContentHosts::System", :inverse_of => :capsule
24
24
  end
25
25
 
26
- class KTEnvironment < ActiveRecord::Base
26
+ class KTEnvironment < ApplicationRecord
27
27
  self.table_name = "katello_environments"
28
28
 
29
29
  belongs_to :organization, :class_name => "MigrateContentHosts::Organization", :inverse_of => :kt_environments
@@ -34,7 +34,7 @@ class MigrateContentHosts < ActiveRecord::Migration
34
34
  :dependent => :restrict_with_exception, :foreign_key => :environment_id
35
35
  end
36
36
 
37
- class ContentView < ActiveRecord::Base
37
+ class ContentView < ApplicationRecord
38
38
  self.table_name = "katello_content_views"
39
39
 
40
40
  has_many :systems, :class_name => "MigrateContentHosts::System", :dependent => :restrict_with_exception
@@ -42,7 +42,7 @@ class MigrateContentHosts < ActiveRecord::Migration
42
42
  :inverse_of => :content_view, :dependent => :restrict_with_exception
43
43
  end
44
44
 
45
- class Repository < ActiveRecord::Base
45
+ class Repository < ApplicationRecord
46
46
  self.table_name = "katello_repositories"
47
47
 
48
48
  has_many :content_facet_repositories, :class_name => "MigrateContentHosts::ContentFacetRepository", :dependent => :destroy
@@ -52,41 +52,41 @@ class MigrateContentHosts < ActiveRecord::Migration
52
52
  has_many :systems, :through => :system_repositories
53
53
  end
54
54
 
55
- class SystemRepository < ActiveRecord::Base
55
+ class SystemRepository < ApplicationRecord
56
56
  self.table_name = "katello_system_repositories"
57
57
  belongs_to :system, :inverse_of => :system_repositories, :class_name => 'MigrateContentHosts::System'
58
58
  belongs_to :repository, :inverse_of => :system_repositories, :class_name => 'MigrateContentHosts::Repository'
59
59
  end
60
60
 
61
- class HostCollection < ActiveRecord::Base
61
+ class HostCollection < ApplicationRecord
62
62
  self.table_name = "katello_host_collection"
63
63
 
64
64
  has_many :system_host_collections, :class_name => "MigrateContentHosts::SystemHostCollection", :dependent => :destroy
65
65
  has_many :systems, :through => :system_host_collections, :class_name => "MigrateContentHosts::System"
66
66
  end
67
67
 
68
- class SystemHostCollections < ActiveRecord::Base
68
+ class SystemHostCollections < ApplicationRecord
69
69
  self.table_name = "katello_system_host_collections"
70
70
 
71
71
  belongs_to :system, :inverse_of => :system_host_collections, :class_name => 'MigrateContentHosts::System'
72
72
  belongs_to :host_collection, :inverse_of => :system_host_collections
73
73
  end
74
74
 
75
- class Erratum < ActiveRecord::Base
75
+ class Erratum < ApplicationRecord
76
76
  self.table_name = "katello_errata"
77
77
 
78
78
  has_many :systems_applicable, :through => :system_errata, :class_name => "MigrateContentHosts::System", :source => :system
79
79
  has_many :content_facet_errata, :class_name => "MigrateContentHosts::ContentFacetErratum", :source => :erratum
80
80
  end
81
81
 
82
- class SystemErratum < ActiveRecord::Base
82
+ class SystemErratum < ApplicationRecord
83
83
  self.table_name = "katello_system_errata"
84
84
 
85
85
  belongs_to :system, :inverse_of => :system_errata, :class_name => 'MigrateContentHosts::System'
86
86
  belongs_to :erratum, :inverse_of => :system_errata, :class_name => 'MigrateContentHosts::Erratum'
87
87
  end
88
88
 
89
- class ActivationKey < ActiveRecord::Base
89
+ class ActivationKey < ApplicationRecord
90
90
  self.table_name = "katello_activation_keys"
91
91
 
92
92
  has_many :system_activation_keys, :class_name => "MigrateContentHosts::SystemActivationKey", :dependent => :destroy
@@ -94,14 +94,14 @@ class MigrateContentHosts < ActiveRecord::Migration
94
94
  has_many :subscription_facets, :through => :subscription_facet_activation_keys
95
95
  end
96
96
 
97
- class SystemActivationKey < ActiveRecord::Base
97
+ class SystemActivationKey < ApplicationRecord
98
98
  self.table_name = "katello_system_activation_keys"
99
99
 
100
100
  belongs_to :system, :inverse_of => :system_activation_keys
101
101
  belongs_to :activation_key, :inverse_of => :system_activation_keys
102
102
  end
103
103
 
104
- class Host < ActiveRecord::Base
104
+ class Host < ApplicationRecord
105
105
  self.table_name = "hosts"
106
106
  self.inheritance_column = nil
107
107
 
@@ -112,7 +112,7 @@ class MigrateContentHosts < ActiveRecord::Migration
112
112
  belongs_to :location, :class_name => "MigrateContentHosts::Location"
113
113
  end
114
114
 
115
- class System < ActiveRecord::Base
115
+ class System < ApplicationRecord
116
116
  self.table_name = "katello_systems"
117
117
  self.inheritance_column = nil
118
118
 
@@ -139,7 +139,7 @@ class MigrateContentHosts < ActiveRecord::Migration
139
139
  has_one :capsule, :class_name => "MigrateContentHosts::SmartProxy", :inverse_of => :content_host, :foreign_key => :content_host_id, :dependent => :nullify
140
140
  end
141
141
 
142
- class ContentFacet < ActiveRecord::Base
142
+ class ContentFacet < ApplicationRecord
143
143
  self.table_name = "katello_content_facets"
144
144
 
145
145
  belongs_to :host, :inverse_of => :content_facet, :class_name => "MigrateContentHosts::Host"
@@ -152,21 +152,21 @@ class MigrateContentHosts < ActiveRecord::Migration
152
152
  has_many :content_facet_errata, :class_name => "MigrateContentHosts::ContentFacetErratum", :dependent => :destroy, :inverse_of => :content_facet
153
153
  end
154
154
 
155
- class ContentFacetRepository < ActiveRecord::Base
155
+ class ContentFacetRepository < ApplicationRecord
156
156
  self.table_name = "katello_content_facet_repositories"
157
157
 
158
158
  belongs_to :content_facet, :inverse_of => :content_facet_repositories, :class_name => 'MigrateContentHosts::ContentFacet'
159
159
  belongs_to :repository, :inverse_of => :content_facet_repositories, :class_name => 'MigrateContentHosts::Repository'
160
160
  end
161
161
 
162
- class ContentFacetErratum < ActiveRecord::Base
162
+ class ContentFacetErratum < ApplicationRecord
163
163
  self.table_name = "katello_content_facet_errata"
164
164
 
165
165
  belongs_to :content_facet, :inverse_of => :content_facet_errata, :class_name => 'MigrateContentHosts::ContentFacet'
166
166
  belongs_to :erratum, :inverse_of => :content_facet_errata, :class_name => 'MigrateContentHosts::Erratum'
167
167
  end
168
168
 
169
- class SubscriptionFacet < ActiveRecord::Base
169
+ class SubscriptionFacet < ApplicationRecord
170
170
  self.table_name = "katello_subscription_facets"
171
171
 
172
172
  belongs_to :host, :inverse_of => :subscription_facet, :class_name => "MigrateContentHosts::Host"
@@ -174,7 +174,7 @@ class MigrateContentHosts < ActiveRecord::Migration
174
174
  has_many :subscription_facet_activation_keys, :class_name => "MigrateContentHosts::SubscriptionFacetActivationKey", :dependent => :destroy, :inverse_of => :subscription_facet
175
175
  end
176
176
 
177
- class SubscriptionFacetActivationKey < ActiveRecord::Base
177
+ class SubscriptionFacetActivationKey < ApplicationRecord
178
178
  self.table_name = "katello_subscription_facet_activation_keys"
179
179
 
180
180
  belongs_to :subscription_facet, :inverse_of => :subscription_facet_activation_keys, :class_name => 'MigrateContentHosts::SubscriptionFacet'
@@ -1,21 +1,21 @@
1
1
  class HostCollectionToHosts < ActiveRecord::Migration
2
- class Host < ActiveRecord::Base
2
+ class Host < ApplicationRecord
3
3
  self.table_name = "hosts"
4
4
  end
5
5
 
6
- class System < ActiveRecord::Base
6
+ class System < ApplicationRecord
7
7
  self.table_name = "katello_systems"
8
8
  end
9
9
 
10
- class HostCollection < ActiveRecord::Base
10
+ class HostCollection < ApplicationRecord
11
11
  self.table_name = "katello_host_collections"
12
12
  end
13
13
 
14
- class SystemHostCollections < ActiveRecord::Base
14
+ class SystemHostCollections < ApplicationRecord
15
15
  self.table_name = "katello_system_host_collections"
16
16
  end
17
17
 
18
- class HostCollectionHosts < ActiveRecord::Base
18
+ class HostCollectionHosts < ApplicationRecord
19
19
  self.table_name = "katello_host_collection_hosts"
20
20
  end
21
21
 
@@ -1,5 +1,5 @@
1
1
  class AddMirrorOnSyncToRepositories < ActiveRecord::Migration
2
- class RepositoryMirrorOnSync < ActiveRecord::Base
2
+ class RepositoryMirrorOnSync < ApplicationRecord
3
3
  self.table_name = "katello_repositories"
4
4
  end
5
5
  def change
@@ -1,5 +1,5 @@
1
1
  class AddDownloadPolicyToKatelloRepositories < ActiveRecord::Migration
2
- class DownloadPolicyRepository < ActiveRecord::Base
2
+ class DownloadPolicyRepository < ApplicationRecord
3
3
  self.table_name = "katello_repositories"
4
4
  end
5
5
  def change
@@ -1,9 +1,9 @@
1
1
  class MoveSystemDescriptionToHost < ActiveRecord::Migration
2
- class Host < ActiveRecord::Base
2
+ class Host < ApplicationRecord
3
3
  self.table_name = "hosts"
4
4
  end
5
5
 
6
- class System < ActiveRecord::Base
6
+ class System < ApplicationRecord
7
7
  self.table_name = "katello_systems"
8
8
  end
9
9
 
@@ -1,5 +1,5 @@
1
1
  class RemoveKatelloFromNotificationName < ActiveRecord::Migration
2
- class FakeMailNotification < ActiveRecord::Base
2
+ class FakeMailNotification < ApplicationRecord
3
3
  self.table_name = 'mail_notifications'
4
4
  end
5
5