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.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/app/assets/stylesheets/katello/katello.scss +7 -5
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +3 -3
- data/app/controllers/katello/api/v2/api_controller.rb +8 -0
- data/app/controllers/katello/api/v2/capsule_content_controller.rb +6 -1
- data/app/controllers/katello/api/v2/content_view_filter_rules_controller.rb +2 -1
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/content_views_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_collections_controller.rb +1 -1
- data/app/controllers/katello/api/v2/host_subscriptions_controller.rb +2 -2
- data/app/controllers/katello/api/v2/host_tracer_controller.rb +1 -1
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +6 -6
- data/app/controllers/katello/api/v2/repositories_controller.rb +6 -7
- data/app/controllers/katello/api/v2/repository_sets_controller.rb +25 -4
- data/app/controllers/katello/concerns/api/v2/content_overrides_controller.rb +2 -4
- data/app/controllers/katello/concerns/api/v2/hostgroups_controller_extensions.rb +10 -27
- data/app/controllers/katello/concerns/api/v2/smart_proxies_controller_extensions.rb +10 -14
- data/app/controllers/katello/concerns/hosts_controller_extensions.rb +33 -0
- data/app/helpers/katello/hosts_and_hostgroups_helper.rb +2 -1
- data/app/helpers/katello/organizations_helper.rb +1 -1
- data/app/helpers/katello/providers_helper.rb +1 -1
- data/app/lib/actions/candlepin/abstract_async_task.rb +1 -1
- data/app/lib/actions/candlepin/candlepin_listening_service.rb +17 -6
- data/app/lib/actions/candlepin/import_pool_handler.rb +21 -56
- data/app/lib/actions/candlepin/listen_on_candlepin_events.rb +1 -0
- data/app/lib/actions/candlepin/owner/import_products.rb +1 -3
- data/app/lib/actions/candlepin/product/content_create.rb +2 -0
- data/app/lib/actions/candlepin/product/content_update.rb +2 -0
- data/app/lib/actions/candlepin/product/create.rb +2 -10
- data/app/lib/actions/candlepin/product/create_unlimited_subscription.rb +8 -1
- data/app/lib/actions/katello/capsule_content/sync.rb +12 -3
- data/app/lib/actions/katello/host/attach_subscriptions.rb +1 -1
- data/app/lib/actions/katello/host/hypervisors_update.rb +2 -4
- data/app/lib/actions/katello/host/remove_subscriptions.rb +1 -1
- data/app/lib/actions/katello/organization/create.rb +2 -2
- data/app/lib/actions/katello/organization/manifest_refresh.rb +1 -2
- data/app/lib/actions/katello/product/content_create.rb +4 -4
- data/app/lib/actions/katello/product/create.rb +13 -11
- data/app/lib/actions/katello/repository/sync.rb +0 -1
- data/app/lib/actions/katello/repository/update.rb +2 -1
- data/app/lib/actions/pulp/consumer/generate_applicability.rb +5 -1
- data/app/lib/actions/pulp/repository/create.rb +1 -0
- data/app/lib/actions/pulp/repository/create_in_plan.rb +4 -4
- data/app/lib/actions/pulp/repository/sync.rb +1 -1
- data/app/lib/katello/http_resource.rb +1 -1
- data/app/lib/katello/lazy_accessor.rb +1 -1
- data/app/lib/katello/resources/candlepin.rb +2 -2
- data/app/lib/katello/util/data.rb +6 -0
- data/app/lib/katello/util/support.rb +1 -1
- data/app/models/katello/activation_key.rb +25 -7
- data/app/models/katello/concerns/host_managed_extensions.rb +60 -17
- data/app/models/katello/concerns/subscription_facet_host_extensions.rb +31 -10
- data/app/models/katello/content_facet_applicable_rpm.rb +0 -2
- data/app/models/katello/content_facet_erratum.rb +0 -2
- data/app/models/katello/content_facet_repository.rb +0 -2
- data/app/models/katello/content_view.rb +3 -4
- data/app/models/katello/content_view_component.rb +1 -3
- data/app/models/katello/content_view_docker_filter_rule.rb +0 -2
- data/app/models/katello/content_view_environment.rb +2 -4
- data/app/models/katello/content_view_erratum_filter_rule.rb +0 -2
- data/app/models/katello/content_view_filter.rb +0 -2
- data/app/models/katello/content_view_package_filter_rule.rb +0 -2
- data/app/models/katello/content_view_package_group_filter_rule.rb +0 -2
- data/app/models/katello/content_view_puppet_environment.rb +0 -2
- data/app/models/katello/content_view_puppet_environment_puppet_module.rb +0 -2
- data/app/models/katello/content_view_puppet_module.rb +0 -2
- data/app/models/katello/content_view_repository.rb +0 -2
- data/app/models/katello/content_view_version.rb +0 -2
- data/app/models/katello/erratum_bugzilla.rb +0 -2
- data/app/models/katello/erratum_cve.rb +0 -2
- data/app/models/katello/erratum_package.rb +0 -2
- data/app/models/katello/ext/label_from_name.rb +1 -1
- data/app/models/katello/glue/candlepin/pool.rb +18 -11
- data/app/models/katello/glue/candlepin/product.rb +1 -2
- data/app/models/katello/glue/pulp/repo.rb +13 -6
- data/app/models/katello/glue/pulp/repos.rb +16 -16
- data/app/models/katello/gpg_key.rb +0 -2
- data/app/models/katello/host/content_facet.rb +21 -0
- data/app/models/katello/host/info_provider.rb +56 -0
- data/app/models/katello/host/subscription_facet.rb +5 -3
- data/app/models/katello/host_collection.rb +0 -2
- data/app/models/katello/host_collection_hosts.rb +0 -2
- data/app/models/katello/host_installed_package.rb +0 -2
- data/app/models/katello/host_tracer.rb +0 -2
- data/app/models/katello/key_host_collection.rb +0 -2
- data/app/models/katello/kt_environment.rb +0 -2
- data/app/models/katello/model.rb +1 -1
- data/app/models/katello/pool.rb +3 -3
- data/app/models/katello/product.rb +10 -3
- data/app/models/katello/provider.rb +0 -2
- data/app/models/katello/repository.rb +0 -2
- data/app/models/katello/repository_docker_manifest.rb +0 -2
- data/app/models/katello/repository_erratum.rb +0 -2
- data/app/models/katello/repository_file.rb +0 -2
- data/app/models/katello/repository_ostree_branch.rb +0 -2
- data/app/models/katello/repository_package_group.rb +0 -1
- data/app/models/katello/repository_puppet_module.rb +0 -2
- data/app/models/katello/repository_rpm.rb +0 -2
- data/app/models/katello/rpm.rb +2 -2
- data/app/models/katello/subscription_facet_activation_key.rb +0 -2
- data/app/models/katello/subscription_facet_pool.rb +6 -0
- data/app/models/katello/subscription_product.rb +0 -1
- data/app/models/katello/sync_plan.rb +0 -2
- data/app/models/katello/task_status.rb +2 -4
- data/app/models/setting/content.rb +2 -0
- data/app/services/katello/candlepin/consumer.rb +1 -2
- data/app/services/katello/candlepin/message_handler.rb +88 -0
- data/app/services/katello/repository_type_manager.rb +1 -1
- data/app/views/dashboard/_content_views_widget.html.erb +2 -2
- data/app/views/dashboard/_errata_widget.html.erb +3 -3
- data/app/views/foreman/smart_proxies/_content_sync.html.erb +25 -8
- data/app/views/foreman/unattended/kickstart-katello-atomic.erb +1 -1
- data/app/views/foreman/unattended/kickstart-katello.erb +1 -1
- data/app/views/katello/api/v2/common/_org_reference.json.rabl +1 -0
- data/app/views/katello/api/v2/content_facet/base.json.rabl +3 -14
- data/app/views/katello/api/v2/products/base.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
- data/app/views/katello/api/v2/repository_sets/show.json.rabl +8 -1
- data/app/views/katello/api/v2/subscriptions/base.json.rabl +0 -7
- data/app/views/katello/api/v2/subscriptions/show.json.rabl +4 -37
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20140422000001_update_products_add_organization.rb +1 -1
- data/db/migrate/20140610154745_content_view_puppet_environment_id.rb +1 -1
- data/db/migrate/20140626204657_add_unlimited_to_activation_keys.rb +1 -1
- data/db/migrate/20140626204902_add_unlimited_to_host_collection.rb +1 -1
- data/db/migrate/20141209103005_disown_foreman_templates.rb +1 -1
- data/db/migrate/20150901213759_remove_distributors.rb +1 -1
- data/db/migrate/20150908222711_drop_marketing_engineering_products.rb +1 -1
- data/db/migrate/20150930183738_migrate_content_hosts.rb +20 -20
- data/db/migrate/20151014144004_host_collection_to_hosts.rb +5 -5
- data/db/migrate/20160114200145_add_mirror_on_sync_to_repositories.rb +1 -1
- data/db/migrate/20160131182301_add_download_policy_to_katello_repositories.rb +1 -1
- data/db/migrate/20160222143432_move_system_description_to_host.rb +2 -2
- data/db/migrate/20160404132250_remove_katello_from_notification_name.rb +1 -1
- data/db/migrate/20160426145517_move_host_description_to_host_comment.rb +1 -1
- data/db/migrate/20160617124149_remove_duplicate_view_filters.rb +4 -4
- data/db/migrate/20160619223332_fix_viewer_role.rb +4 -4
- data/db/migrate/20160701180402_add_sortable_version_to_puppet_modules.rb +1 -1
- data/db/migrate/20160924213020_change_katello_widget_names.rb +1 -1
- data/db/migrate/20161014133811_move_content_view_version_description_to_histories.rb +2 -2
- data/db/migrate/20161026191118_fix_invalid_interfaces.rb +1 -1
- data/db/migrate/20170321012632_fill_in_content_view_components.rb +3 -3
- data/db/migrate/20170718142148_create_katello_subscription_facet_pools.rb +15 -0
- data/db/migrate/20170821170915_add_index_to_installed_packages.rb +5 -0
- data/db/migrate/20170821170916_add_nvra_index_to_installed_packages.rb +5 -0
- data/db/migrate/20170913183848_add_errata_counts.rb +23 -0
- data/db/seeds.d/101-locations.rb +2 -2
- data/db/seeds.d/102-organizations.rb +3 -3
- data/db/seeds.d/103-provisioning_templates.rb +29 -31
- data/db/seeds.d/104-proxy.rb +10 -12
- data/db/seeds.d/106-mail_notifications.rb +30 -32
- data/db/seeds.d/107-enable_dynflow.rb +3 -4
- data/db/seeds.d/108-subcription-bookmarks.rb +12 -10
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/activation-keys.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/activation-keys/new/views/activation-key-new.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architecture.factory.js +15 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/architectures/architectures.module.js +14 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion-katello-bootstrap.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/bastion_katello.js +3 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/capsule-content/capsule-content.controller.js +2 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-repository-sets-modal.controller.js +107 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-repository-sets-modal.html +113 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts-helper.service.js +13 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +25 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/content-host-details-info.controller.js +4 -4
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-info.html +15 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/details/views/content-host-repository-sets.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +11 -5
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-activation-keys.html +15 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-views/deletion/views/version-deletion-content-hosts.html +16 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/apply-errata.controller.js +9 -6
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata-counts.html +6 -12
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/errata/views/errata.html +4 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/packages/views/packages.html +5 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +20 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +9 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +22 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +17 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.controller.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/products.module.js +1 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/repository-sets/repository-set.factory.js +16 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-details.html +0 -19
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-info.html +31 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/subscriptions.routes.js +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/tasks/views/tasks-table.html +6 -3
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/plugin.rb +7 -5
- data/lib/katello/tasks/clean_installed_packages.rake +54 -0
- data/lib/katello/tasks/import_subscriptions.rake +8 -0
- data/lib/katello/tasks/{setup.rake → reset.rake} +10 -0
- data/lib/katello/tasks/test.rake +18 -0
- data/lib/katello/version.rb +1 -1
- data/vendor/assets/stylesheets/katello/{jquery-ui-1.8.11.custom.css → jquery-ui-1.8.11.custom.css.scss} +0 -0
- data/vendor/assets/stylesheets/katello/{jquery.loadmask.css → jquery.loadmask.css.scss} +0 -0
- data/vendor/assets/stylesheets/katello/{jquery.treeTable.scss → jquery.treeTable.css.scss} +0 -0
- data/vendor/assets/stylesheets/katello/{ui.spinner.css → ui.spinner.css.scss} +0 -0
- metadata +43 -21
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-activation-keys.controller.js +0 -30
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/subscription-content-hosts.controller.js +0 -45
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-activation-keys.html +0 -48
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/details/views/subscription-content-hosts.html +0 -62
- data/lib/katello/tasks/upgrades/2.4/import_subscriptions.rake +0 -12
- 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
|
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
|
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
|
@@ -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|
|
@@ -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
|
{
|
data/config/routes/overrides.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class ContentViewPuppetEnvironmentId < ActiveRecord::Migration
|
2
|
-
class ::Environment <
|
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,7 +1,7 @@
|
|
1
1
|
class MigrateContentHosts < ActiveRecord::Migration
|
2
2
|
HYPERVISOR_CLASS = 'Katello::Hypervisor'.freeze
|
3
3
|
|
4
|
-
class Location <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
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 <
|
2
|
+
class Host < ApplicationRecord
|
3
3
|
self.table_name = "hosts"
|
4
4
|
end
|
5
5
|
|
6
|
-
class System <
|
6
|
+
class System < ApplicationRecord
|
7
7
|
self.table_name = "katello_systems"
|
8
8
|
end
|
9
9
|
|
10
|
-
class HostCollection <
|
10
|
+
class HostCollection < ApplicationRecord
|
11
11
|
self.table_name = "katello_host_collections"
|
12
12
|
end
|
13
13
|
|
14
|
-
class SystemHostCollections <
|
14
|
+
class SystemHostCollections < ApplicationRecord
|
15
15
|
self.table_name = "katello_system_host_collections"
|
16
16
|
end
|
17
17
|
|
18
|
-
class HostCollectionHosts <
|
18
|
+
class HostCollectionHosts < ApplicationRecord
|
19
19
|
self.table_name = "katello_host_collection_hosts"
|
20
20
|
end
|
21
21
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class MoveSystemDescriptionToHost < ActiveRecord::Migration
|
2
|
-
class Host <
|
2
|
+
class Host < ApplicationRecord
|
3
3
|
self.table_name = "hosts"
|
4
4
|
end
|
5
5
|
|
6
|
-
class System <
|
6
|
+
class System < ApplicationRecord
|
7
7
|
self.table_name = "katello_systems"
|
8
8
|
end
|
9
9
|
|