Sha256: c7bfff4b6c4723e82db7f9afad61ba0a81e747c990c8717545cc7c4e339e8bb6

Contents?: true

Size: 1.29 KB

Versions: 25

Compression:

Stored size: 1.29 KB

Contents

module Actions
  module Katello
    module ContentViewVersion
      class RepublishRepositories < Actions::EntryAction
        def plan(content_view_version, options = {force: false})
          force = options[:force]
          action_subject(content_view_version.content_view)
          plan_self(:version_id => content_view_version.id)
          repositories = if force
                           content_view_version.repositories
                         else
                           content_view_version.repositories.joins(:root).where.not(root: { mirroring_policy: ::Katello::RootRepository::MIRRORING_POLICY_COMPLETE })
                         end
          plan_action(::Actions::Katello::Repository::BulkMetadataGenerate, repositories)
        end

        def run
          #dummy run phase to save input
        end

        def resource_locks
          :link
        end

        def humanized_name
          if input && 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

25 entries across 25 versions & 1 rubygems

Version Path
katello-4.14.2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.15.0 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.15.0.rc2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.15.0.rc1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.14.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.14.0 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.14.0.rc3 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.14.0.rc2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.14.0.rc1.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.14.0.rc1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.13.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.13.0 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.12.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.13.0.rc1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.12.0 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.12.0.rc3 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.12.0.rc2 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.12.0.rc1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.11.1 app/lib/actions/katello/content_view_version/republish_repositories.rb
katello-4.11.0 app/lib/actions/katello/content_view_version/republish_repositories.rb