Sha256: a1fc1fda344e06e26e99cb72864d6c2c1959ce643f8edc5d48e26e656fe56efc

Contents?: true

Size: 1.34 KB

Versions: 40

Compression:

Stored size: 1.34 KB

Contents

module Actions
  module Pulp
    module Repository
      class CopyAllUnits < Pulp::AbstractAsyncTask
        def plan(target_repo, _smart_proxy, source_repo, options = {})
          filter_ids = options.fetch(:filters, nil)&.map(&:id)
          rpm_filenames = options.fetch(:rpm_filenames, nil)
          solve_dependencies = options.fetch(:solve_dependencies, false)

          plan_self(source_repo_id: source_repo.id,
                    target_repo_id: target_repo.id,
                    filter_ids: filter_ids,
                    solve_dependencies: solve_dependencies,
                    rpm_filenames: rpm_filenames)
        end

        def invoke_external_task
          source_repo = ::Katello::Repository.find(input[:source_repo_id])
          target_repo = ::Katello::Repository.find(input[:target_repo_id])
          filters = ::Katello::ContentViewFilter.where(:id => input[:filter_ids])

          source_repo.backend_service(SmartProxy.pulp_master).copy_contents(target_repo,
                                                                            filters: filters,
                                                                            solve_dependencies: input[:solve_dependencies],
                                                                            rpm_filenames: input[:rpm_filenames])
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
katello-3.16.2 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.1.2 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.1.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.17.0.rc1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc5.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc5 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc4.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.15.3.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.15.3 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc4 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc3.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.15.2 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc3 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc2.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc2 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.15.1.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.16.0.rc1.1 app/lib/actions/pulp/repository/copy_all_units.rb
katello-3.15.1 app/lib/actions/pulp/repository/copy_all_units.rb