Sha256: 07f383915ec2bdff67b73a0de73c0129b21b8da81ce2df72ca25f15467c0e82b

Contents?: true

Size: 704 Bytes

Versions: 2

Compression:

Stored size: 704 Bytes

Contents

module Actions
  module Katello
    module Applicability
      module Repository
        class Regenerate < Actions::EntryAction
          middleware.use Actions::Middleware::ExecuteIfContentsChanged

          input_format do
            param :repo_id, Integer
            param :contents_changed
          end

          def run
            ::Katello::Repository.find(input[:repo_id]).content_facets.each do |facet|
              ::Katello::EventQueue.push_event(::Katello::Events::GenerateHostApplicability::EVENT_TYPE, facet.host.id)
            end
          end

          def humanized_name
            _("Generate repository applicability")
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
katello-3.16.0.rc1.1 app/lib/actions/katello/applicability/repository/regenerate.rb
katello-3.16.0.rc1 app/lib/actions/katello/applicability/repository/regenerate.rb