Sha256: 89e655f62c7168a95b3341ebab2e4a55f679543502a3b76d5155f0979a37cea6

Contents?: true

Size: 789 Bytes

Versions: 165

Compression:

Stored size: 789 Bytes

Contents

module Actions
  module Pulp3
    module Repository
      class RemoveUnits < Pulp3::AbstractAsyncTask
        def plan(repository, smart_proxy, options)
          plan_self(repository_id: repository.id,
                    smart_proxy_id: smart_proxy.id,
                    options: options)
        end

        def invoke_external_task
          repo = ::Katello::Repository.find(input[:repository_id])
          content_unit_ids = input[:options][:contents]

          content_type = ::Katello::RepositoryTypeManager.find_content_type(input[:options][:content_unit_type].downcase)
          units = content_type.model_class.where(:id => content_unit_ids)

          output[:pulp_tasks] = repo.backend_service(smart_proxy).remove_content(units)
        end
      end
    end
  end
end

Version data entries

165 entries across 165 versions & 1 rubygems

Version Path
katello-4.16.0 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.15.1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.16.0.rc2 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.16.0.rc1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.14.3 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.14.2 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.15.0 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.15.0.rc2 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.15.0.rc1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.14.1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.14.0 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.14.0.rc3 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.14.0.rc2 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.14.0.rc1.1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.14.0.rc1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.13.1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.13.0 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.12.1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.13.0.rc1 app/lib/actions/pulp3/repository/remove_units.rb
katello-4.12.0 app/lib/actions/pulp3/repository/remove_units.rb