Sha256: 70d5ea34a2d70d28cdcd60e00d5ed422a1dee2b27f9747062228f68e9ced7be2

Contents?: true

Size: 544 Bytes

Versions: 9

Compression:

Stored size: 544 Bytes

Contents

module Actions
  module Candlepin
    module Product
      class DeletePools < Candlepin::Abstract
        input_format do
          param :organization_label
          param :cp_id
        end

        def run
          output[:response] = ::Katello::Resources::Candlepin::Product.pools(input[:organization_label], input[:cp_id]).each do |pool|
            ::Katello::Pool.find_all_by_cp_id(pool['id']).each(&:destroy)
            ::Katello::Resources::Candlepin::Pool.destroy(pool['id'])
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
katello-2.4.5 app/lib/actions/candlepin/product/delete_pools.rb
katello-2.4.4 app/lib/actions/candlepin/product/delete_pools.rb
katello-2.4.3 app/lib/actions/candlepin/product/delete_pools.rb
katello-2.4.2 app/lib/actions/candlepin/product/delete_pools.rb
katello-2.4.1 app/lib/actions/candlepin/product/delete_pools.rb
katello-2.4.0 app/lib/actions/candlepin/product/delete_pools.rb
katello-2.4.0.rc3 app/lib/actions/candlepin/product/delete_pools.rb
katello-2.4.0.rc2 app/lib/actions/candlepin/product/delete_pools.rb
katello-2.4.0.rc1 app/lib/actions/candlepin/product/delete_pools.rb