Sha256: 4bb03d14c9dd4ba5b647f2357c0a31c4119fd34f321940d8c1299067f94f5bb3

Contents?: true

Size: 668 Bytes

Versions: 15

Compression:

Stored size: 668 Bytes

Contents

module Actions
  module Katello
    module Product
      class ContentDestroy < Actions::Base
        def plan(repository)
          fail _("Cannot delete redhat product content") if repository.product.redhat?
          sequence do
            plan_action(Candlepin::Product::ContentRemove,
                        product_id: repository.product.cp_id,
                        content_id: repository.content_id)
            if repository.other_repos_with_same_content.empty?
              plan_action(Candlepin::Product::ContentDestroy,
                          content_id: repository.content_id)
            end
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
katello-3.3.2 app/lib/actions/katello/product/content_destroy.rb
katello-3.3.1.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.3.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.3.0.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.3.0 app/lib/actions/katello/product/content_destroy.rb
katello-3.3.0.rc2 app/lib/actions/katello/product/content_destroy.rb
katello-3.3.0.rc1.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.3.0.rc1 app/lib/actions/katello/product/content_destroy.rb
katello-3.2.1.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.2.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.2.0 app/lib/actions/katello/product/content_destroy.rb
katello-3.2.0.rc3 app/lib/actions/katello/product/content_destroy.rb
katello-3.2.0.rc2 app/lib/actions/katello/product/content_destroy.rb
katello-3.2.0.rc1.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.2.0.rc1 app/lib/actions/katello/product/content_destroy.rb