Class: Actions::Pulp3::ContentGuard::RefreshAllDistributions

Inherits:
Abstract
  • Object
show all
Defined in:
app/lib/actions/pulp3/content_guard/refresh_all_distributions.rb

Instance Method Summary collapse

Methods inherited from Abstract

#smart_proxy

Instance Method Details

#plan(smart_proxy) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'app/lib/actions/pulp3/content_guard/refresh_all_distributions.rb', line 5

def plan(smart_proxy)
  sequence do
    plan_action(Actions::Pulp3::ContentGuard::Refresh, smart_proxy)

    roots = ::Katello::RootRepository.where.not(:content_type => ::Katello::Repository::DOCKER_TYPE).where(:unprotected => false)
    repositories = ::Katello::Repository.where(:root => roots)
    if repositories.any?
      plan_action(::Actions::BulkAction, Actions::Pulp3::Repository::RefreshDistribution, repositories, smart_proxy.id, assume_content_guard_exists: true)
    end
  end
end