Class: Actions::Katello::Host::GenerateApplicability
- Inherits:
-
Base
- Object
- Base
- Actions::Katello::Host::GenerateApplicability
- Defined in:
- app/lib/actions/katello/host/generate_applicability.rb
Instance Method Summary collapse
Instance Method Details
#finalize ⇒ Object
15 16 17 18 19 20 |
# File 'app/lib/actions/katello/host/generate_applicability.rb', line 15 def finalize ::Host.where(:id => input[:host_ids]).each do |host| host.content_facet.try(:import_applicability) host.get_status(::Katello::ErrataStatus).refresh! end end |
#plan(hosts) ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/lib/actions/katello/host/generate_applicability.rb', line 7 def plan(hosts) uuids = hosts.map { |host| host.content_facet.try(:uuid) }.compact unless uuids.empty? plan_action(Pulp::Consumer::GenerateApplicability, :uuids => uuids) plan_self(:host_ids => hosts.map(&:id)) end end |