Sha256: 13508948b8d93fd4d655bad7b87b4ca99d2a4fe88a3d5cf9a84a0cb79a5b6c6a

Contents?: true

Size: 810 Bytes

Versions: 16

Compression:

Stored size: 810 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,
                        owner: repository.product.organization.label,
                        product_id: repository.product.cp_id,
                        content_id: repository.content_id)
            if repository.other_repos_with_same_content.empty?
              plan_action(Candlepin::Product::ContentDestroy,
                          owner: repository.product.organization.label,
                          content_id: repository.content_id)
            end
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
katello-3.5.2 app/lib/actions/katello/product/content_destroy.rb
katello-3.5.1.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.5.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.5.0.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.5.0 app/lib/actions/katello/product/content_destroy.rb
katello-3.5.0.rc2 app/lib/actions/katello/product/content_destroy.rb
katello-3.5.0.rc1 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.5 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.4 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.2 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.0.2 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.0.1 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.0 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.0.rc2 app/lib/actions/katello/product/content_destroy.rb
katello-3.4.0.rc1 app/lib/actions/katello/product/content_destroy.rb