Sha256: 774dc66dc25818bdbc3df198790eb1754e843d30ddbfa8f41c0cf40ebe205be8

Contents?: true

Size: 1.18 KB

Versions: 16

Compression:

Stored size: 1.18 KB

Contents

module Actions
  module Katello
    module ContentViewVersion
      class RepublishRepositories < Actions::EntryAction
        def plan(content_view_version)
          action_subject(content_view_version.content_view)
          plan_self(:version_id => content_view_version.id)

          content_view_version.repositories.each do |repo|
            plan_action(::Actions::Katello::Repository::MetadataGenerate, repo, :force => true)
          end

          content_view_version.content_view_puppet_environments.each do |repo|
            plan_action(::Actions::Katello::Repository::MetadataGenerate, repo, :force => true)
          end
        end

        def run
          #dummy run phase to save input
        end

        def resource_locks
          :link
        end

        def humanized_name
          if input[:version_id]
            version = ::Katello::ContentViewVersion.find_by(:id => input[:version_id])
          end

          if version
            _("Republish Repositories of %{name} %{version}") % {:name => version.content_view.name, :version => version.version}
          else
            _("Republish Version Repositories")
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
katello-3.5.2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.5.1.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.5.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.5.0.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.5.0 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.5.0.rc2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.5.0.rc1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.5 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.4 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.0.2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.0.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.0 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.0.rc2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-3.4.0.rc1 app/lib/actions/katello/content_view_version/republish_repositories.rb