Sha256: d8ee75a3f3d66ae3d232b466690fb7e57e1c8e639c1f7b0800146c134196142d

Contents?: true

Size: 820 Bytes

Versions: 1

Compression:

Stored size: 820 Bytes

Contents

module Actions
  module Pulp3
    module ContentGuard
      class RefreshAllDistributions < Pulp3::Abstract
        def plan(smart_proxy)
          sequence do
            plan_action(Actions::Pulp3::ContentGuard::Refresh, smart_proxy)

            protected_types = [::Katello::Repository::YUM_TYPE, ::Katello::Repository::FILE_TYPE, ::Katello::Repository::DEB_TYPE]
            roots = ::Katello::RootRepository.where(:content_type => protected_types).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
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
katello-3.18.5 app/lib/actions/pulp3/content_guard/refresh_all_distributions.rb