lib/katello/plugin.rb in katello-3.16.2 vs lib/katello/plugin.rb in katello-3.17.0.rc1
- old
+ new
@@ -1,8 +1,8 @@
require 'katello/permission_creator'
require 'katello/repository_types.rb'
-
+require 'katello/host_status_manager.rb'
# rubocop:disable Metrics/BlockLength
Foreman::Plugin.register :katello do
requires_foreman '>= 1.24'
sub_menu :top_menu, :content_menu, :caption => N_('Content'),
@@ -226,17 +226,20 @@
search_path_override("Katello") do |resource|
"/#{Katello::Util::Model.model_to_controller_path(resource)}/auto_complete_search"
end
apipie_documented_controllers ["#{Katello::Engine.root}/app/controllers/katello/api/v2/*.rb"]
apipie_ignored_controllers %w(::Api::V2::OrganizationsController)
+ ApipieDSL.configuration.dsl_classes_matchers.concat [
+ "#{Katello::Engine.root}/app/models/katello/**/*.rb"
+ ]
parameter_filter ::Host::Managed, :host_collection_ids => [],
:content_facet_attributes => [:content_view_id, :lifecycle_environment_id, :content_source_id,
:host, :kickstart_repository_id],
:subscription_facet_attributes => [:release_version, :autoheal, :purpose_usage, :purpose_role, :service_level, :host,
{:installed_products => [:product_id, :product_name, :arch, :version]}, :facts, :hypervisor_guest_uuids => [], :purpose_addon_ids => []]
- parameter_filter Hostgroup, :content_view_id, :lifecycle_environment_id, :content_source_id,
+ parameter_filter ::Hostgroup, :content_view_id, :lifecycle_environment_id, :content_source_id,
:kickstart_repository_id
parameter_filter Organization, :label, :service_level
parameter_filter SmartProxy, :download_policy, :lifecycle_environment_ids => []
logger :glue, :enabled => true
@@ -265,18 +268,13 @@
:name => _("Content Sync"),
:partial => "foreman/smart_proxies/content_sync",
:onlyif => proc { |proxy| proxy.has_feature?(SmartProxy::PULP_NODE_FEATURE) }
end
- register_custom_status(Katello::ErrataStatus)
- register_custom_status(Katello::SubscriptionStatus)
- register_custom_status(Katello::PurposeSlaStatus)
- register_custom_status(Katello::PurposeRoleStatus)
- register_custom_status(Katello::PurposeUsageStatus)
- register_custom_status(Katello::PurposeAddonsStatus)
- register_custom_status(Katello::PurposeStatus)
- register_custom_status(Katello::TraceStatus)
+ ::Katello::HostStatusManager::STATUSES.each do |status_class|
+ register_custom_status(status_class)
+ end
register_ping_extension { Katello::Ping.ping }
register_status_extension { Katello::Ping.status }
extend_rabl_template 'api/v2/smart_proxies/main', 'katello/api/v2/smart_proxies/pulp_info'
@@ -288,14 +286,20 @@
:partial => 'smart_proxies/show/storage',
:onlyif => proc { |proxy| proxy.has_feature?(SmartProxy::PULP_FEATURE) || proxy.has_feature?(SmartProxy::PULP_NODE_FEATURE) }
end
register_facet Katello::Host::ContentFacet, :content_facet do
- api_view :list => 'katello/api/v2/content_facet/base_with_root', :single => 'katello/api/v2/content_facet/show'
- api_docs :content_facet_attributes, ::Katello::Api::V2::HostContentsController
- template_compatibility_properties :content_source_id, :content_source
- extend_model ::Katello::Concerns::ContentFacetHostExtensions
+ configure_host do
+ api_view :list => 'katello/api/v2/content_facet/base_with_root', :single => 'katello/api/v2/content_facet/show'
+ api_docs :content_facet_attributes, ::Katello::Api::V2::HostContentsController
+ template_compatibility_properties :content_source_id, :content_source
+ extend_model ::Katello::Concerns::ContentFacetHostExtensions
+ end
+
+ configure_hostgroup(::Katello::Hostgroup::ContentFacet) do
+ set_dependent_action :destroy
+ end
end
register_facet Katello::Host::SubscriptionFacet, :subscription_facet do
api_view :list => 'katello/api/v2/subscription_facet/base_with_root', :single => 'katello/api/v2/subscription_facet/show'
api_docs :subscription_facet_attributes, ::Katello::Api::V2::HostSubscriptionsController
@@ -386,13 +390,13 @@
precompile = [
'katello/katello.css',
'katello/containers/container.css',
'bastion/bastion.css',
'bastion/bastion.js',
- /bastion\S+.(?:svg|eot|woff|ttf)$/,
'bastion_katello/bastion_katello.css',
'bastion_katello/bastion_katello.js',
- /bastion_katello\S+.(?:svg|eot|woff|ttf)$/
+ 'katello/sync_management',
+ 'katello/common'
]
precompile.concat(javascripts)
precompile.concat(images)
precompile.concat(vendor_images)