Class: Actions::Katello::Repository::VerifyChecksum

Inherits:
EntryAction
  • Object
show all
Includes:
Helpers::Presenter
Defined in:
app/lib/actions/katello/repository/verify_checksum.rb

Instance Method Summary collapse

Instance Method Details

#plan(repo) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'app/lib/actions/katello/repository/verify_checksum.rb', line 7

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

#presenterObject



19
20
21
22
23
# File 'app/lib/actions/katello/repository/verify_checksum.rb', line 19

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