Sha256: 0913e9cf6d5e9ff839de18e95042858d4a50edaac9185f6f0671cb72e27877ae

Contents?: true

Size: 1.11 KB

Versions: 11

Compression:

Stored size: 1.11 KB

Contents

module Actions
  module Katello
    module Repository
      class CloneYumMetadata < Actions::Base
        def plan(source_repo, target_repo, options = {})
          sequence do
            # Check for matching content before indexing happens, the content in pulp is
            # actually updated, but it is not reflected in the database yet.
            output = {}
            if !target_repo.previous_changes.include?(:unprotected) &&
                target_repo.environment && !options[:force_yum_metadata_regeneration]
              output = plan_action(Katello::Repository::CheckMatchingContent,
                                   :source_repo_id => source_repo.id,
                                   :target_repo_id => target_repo.id).output
            end

            plan_action(Katello::Repository::IndexContent, id: target_repo.id)

            plan_action(Katello::Repository::MetadataGenerate,
                        target_repo,
                        :source_repository => source_repo,
                        :matching_content => output[:matching_content])
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
katello-3.8.1 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.7.1.1 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.7.1 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.8.0 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.8.0.rc3 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.8.0.rc2 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.7.0 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.8.0.rc1 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.7.0.rc2 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.7.0.rc1 app/lib/actions/katello/repository/clone_yum_metadata.rb
katello-3.5.2 app/lib/actions/katello/repository/clone_yum_metadata.rb