Sha256: 93e880e7e37819ac5059b799c11db6a1cf3fceaea7d2f70fa88d5df9b44958b9

Contents?: true

Size: 988 Bytes

Versions: 83

Compression:

Stored size: 988 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_primary
          output[:pulp_tasks] = repo.backend_service(capsule).delete
        end
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
katello-4.7.6 app/lib/actions/pulp/repository/destroy.rb
katello-4.7.5 app/lib/actions/pulp/repository/destroy.rb
katello-4.7.4 app/lib/actions/pulp/repository/destroy.rb
katello-4.7.3 app/lib/actions/pulp/repository/destroy.rb
katello-4.7.2 app/lib/actions/pulp/repository/destroy.rb
katello-4.7.1 app/lib/actions/pulp/repository/destroy.rb
katello-4.6.2.1 app/lib/actions/pulp/repository/destroy.rb
katello-4.6.2 app/lib/actions/pulp/repository/destroy.rb
katello-4.7.0 app/lib/actions/pulp/repository/destroy.rb
katello-4.6.1 app/lib/actions/pulp/repository/destroy.rb
katello-4.7.0.rc2 app/lib/actions/pulp/repository/destroy.rb
katello-4.7.0.rc1 app/lib/actions/pulp/repository/destroy.rb
katello-4.4.2.2 app/lib/actions/pulp/repository/destroy.rb
katello-4.4.2.1 app/lib/actions/pulp/repository/destroy.rb
katello-4.4.2 app/lib/actions/pulp/repository/destroy.rb
katello-4.5.1 app/lib/actions/pulp/repository/destroy.rb
katello-4.6.0 app/lib/actions/pulp/repository/destroy.rb
katello-4.6.0.rc2 app/lib/actions/pulp/repository/destroy.rb
katello-4.6.0.rc1 app/lib/actions/pulp/repository/destroy.rb
katello-4.5.0 app/lib/actions/pulp/repository/destroy.rb