Sha256: be057426ac73d95c8cb06e3f75b5b3cc620945f2aef301646d1a2b984342d527

Contents?: true

Size: 939 Bytes

Versions: 104

Compression:

Stored size: 939 Bytes

Contents

module Actions
  module Katello
    module ContentView
      class Destroy < Actions::EntryAction
        middleware.use ::Actions::Middleware::RemoteAction

        def plan(content_view, options = {})
          action_subject(content_view)
          if options.fetch(:check_ready_to_destroy, true)
            content_view.check_ready_to_destroy!
          end

          sequence do
            concurrence do
              content_view.content_view_versions.each do |version|
                plan_action(ContentViewVersion::Destroy, version, options)
              end
            end

            plan_self
          end
        end

        def finalize
          content_view = ::Katello::ContentView.find(input[:content_view][:id])
          content_view.content_view_repositories.each(&:destroy)
          content_view.destroy!
        end

        def humanized_name
          _("Delete")
        end
      end
    end
  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
katello-3.2.0.rc1.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.2.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.1.0.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.1.0 app/lib/actions/katello/content_view/destroy.rb
katello-3.1.0.rc2.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.2 app/lib/actions/katello/content_view/destroy.rb
katello-2.4.5 app/lib/actions/katello/content_view/destroy.rb
katello-3.1.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.1 app/lib/actions/katello/content_view/destroy.rb
katello-2.4.4 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.0 app/lib/actions/katello/content_view/destroy.rb
katello-2.4.3 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.0.rc7 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.0.rc5 app/lib/actions/katello/content_view/destroy.rb
katello-2.4.2 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.0.rc4 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.0.rc3 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.0.rc2 app/lib/actions/katello/content_view/destroy.rb
katello-3.0.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-2.4.1 app/lib/actions/katello/content_view/destroy.rb