Sha256: 5b2dab39cbd12181a967b2b7f095bedf54e5790753ae6abc923b7a83eda1d81c

Contents?: true

Size: 848 Bytes

Versions: 6

Compression:

Stored size: 848 Bytes

Contents

module Actions
  module Katello
    module Repository
      class VerifyChecksum < Actions::EntryAction
        include Helpers::Presenter
        include Actions::Katello::PulpSelector

        def plan(repo)
          action_subject(repo)

          if SmartProxy.pulp_primary.pulp3_support?(repo)
            plan_action(Actions::Pulp3::Repository::Repair, repo.id, SmartProxy.pulp_primary)
          else
            options = {}
            options[:validate_contents] = true
            plan_action(Actions::Katello::Repository::Sync, repo, options)
          end
        end

        def presenter
          found = all_planned_actions(Katello::Repository::Sync)
          found = all_planned_actions(Pulp3::Repository::Repair) if found.empty?
          Helpers::Presenter::Delegated.new(self, found)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
katello-4.1.4 app/lib/actions/katello/repository/verify_checksum.rb
katello-4.1.3 app/lib/actions/katello/repository/verify_checksum.rb
katello-4.1.2.1 app/lib/actions/katello/repository/verify_checksum.rb
katello-4.1.2 app/lib/actions/katello/repository/verify_checksum.rb
katello-4.1.1 app/lib/actions/katello/repository/verify_checksum.rb
katello-4.1.0 app/lib/actions/katello/repository/verify_checksum.rb