Sha256: 55e7a60b9bd21bdf344efc576fef5e6f70dd577e25ea4120d06057f0d0eaf6a7

Contents?: true

Size: 987 Bytes

Versions: 46

Compression:

Stored size: 987 Bytes

Contents

module Actions
  module Pulp
    module Repository
      class Destroy < Pulp::AbstractAsyncTask
        input_format do
          param :repository_id
          param :capsule_id
          param :content_view_puppet_environment_id
        end

        def invoke_external_task
          begin
            if input[:content_view_puppet_environment_id]
              repo = ::Katello::ContentViewPuppetEnvironment.find(input[:content_view_puppet_environment_id]).nonpersisted_repository
            else
              repo = ::Katello::Repository.find(input[:repository_id])
            end
          rescue ActiveRecord::RecordNotFound
            Rails.logger.warn("Tried to delete repository #{input[:repository_id]}, but it did not exist.")
            return []
          end
          capsule = input[:capsule_id] ? smart_proxy(input[:capsule_id]) : SmartProxy.pulp_master
          output[:pulp_tasks] = repo.backend_service(capsule).delete
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

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