Sha256: 1600f120ceecb0a03f59eeebf47c182c86e26144fdd8646eda2872e885dbb3f0

Contents?: true

Size: 1000 Bytes

Versions: 7

Compression:

Stored size: 1000 Bytes

Contents

module Actions
  module Pulp3
    module Repository
      class CopyContent < Pulp3::AbstractAsyncTask
        def plan(source_repository, smart_proxy, target_repository, options)
          plan_self(options.merge(:source_repository_id => source_repository.id,
                                  :target_repository_id => target_repository.id,
                                  :smart_proxy_id => smart_proxy.id))
        end

        def invoke_external_task
          source = ::Katello::Repository.find(input[:source_repository_id])
          target = ::Katello::Repository.find(input[:target_repository_id] || input[:target_repository])
          service = target.backend_service(smart_proxy)
          output[:pulp_tasks] = if input[:copy_all]
                                  service.copy_all(source)
                                else
                                  service.copy_content_for_source(source, input)
                                end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
katello-3.17.3 app/lib/actions/pulp3/repository/copy_content.rb
katello-3.17.2 app/lib/actions/pulp3/repository/copy_content.rb
katello-3.17.1 app/lib/actions/pulp3/repository/copy_content.rb
katello-3.18.0.rc2.1 app/lib/actions/pulp3/repository/copy_content.rb
katello-3.18.0.rc2 app/lib/actions/pulp3/repository/copy_content.rb
katello-3.17.0 app/lib/actions/pulp3/repository/copy_content.rb
katello-3.18.0.rc1 app/lib/actions/pulp3/repository/copy_content.rb