Class: Actions::Katello::Product::RepositoriesGpgReset

Inherits:
AbstractAsyncTask
  • Object
show all
Defined in:
app/lib/actions/katello/product/repositories_gpg_reset.rb

Instance Method Summary collapse

Methods inherited from AbstractAsyncTask

#humanized_output, #rescue_strategy

Instance Method Details

#plan(product) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'app/lib/actions/katello/product/repositories_gpg_reset.rb', line 5

def plan(product)
  key_id = product.gpg_key_id
  # Plan Repository::Update only for repositories which have different gpg key
  product.repositories.each do |repo|
    if repo.gpg_key_id != key_id
      plan_action(::Actions::Katello::Repository::Update,
                  repo,
                  :gpg_key_id => key_id)
    end
  end
end