Sha256: 183132578b5e460f6d0a08853cee31f9833b353de49dfa59a4d661cc8df7382a

Contents?: true

Size: 1.26 KB

Versions: 4

Compression:

Stored size: 1.26 KB

Contents

module Actions
  module Katello
    module Repository
      class MetadataGenerate < Actions::Base
        include Actions::Katello::PulpSelector

        def plan(repository, options = {})
          dependency = options.fetch(:dependency, nil)
          force = options.fetch(:force, false)
          repository_creation = options.fetch(:repository_creation, false)
          source_repository = options.fetch(:source_repository, nil)
          source_repository ||= repository.target_repository if repository.link?
          smart_proxy_id = options.fetch(:capsule_id, SmartProxy.pulp_master.id)
          if repository_creation
            matching_content = false
          else
            matching_content = options.fetch(:matching_content, false)
          end

          plan_pulp_action([Pulp::Repository::DistributorPublish, Pulp3::Orchestration::Repository::GenerateMetadata],
                        repository, SmartProxy.find(smart_proxy_id),
                        :force => force,
                        :source_repository => source_repository,
                        :matching_content => matching_content,
                        :dependency => dependency,
                        :repository_creation => repository_creation)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
katello-3.13.4 app/lib/actions/katello/repository/metadata_generate.rb
katello-3.13.3 app/lib/actions/katello/repository/metadata_generate.rb
katello-3.13.2 app/lib/actions/katello/repository/metadata_generate.rb
katello-3.13.1 app/lib/actions/katello/repository/metadata_generate.rb