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.15.0.rc1.3 app/lib/actions/katello/content_view/destroy.rb
katello-3.15.0.rc1.2 app/lib/actions/katello/content_view/destroy.rb
katello-3.15.0.rc1.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.15.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.14.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.13.4 app/lib/actions/katello/content_view/destroy.rb
katello-3.14.0 app/lib/actions/katello/content_view/destroy.rb
katello-3.13.3 app/lib/actions/katello/content_view/destroy.rb
katello-3.14.0.rc2 app/lib/actions/katello/content_view/destroy.rb
katello-3.13.2 app/lib/actions/katello/content_view/destroy.rb
katello-3.14.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.13.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.13.0 app/lib/actions/katello/content_view/destroy.rb
katello-3.13.0.rc2.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.13.0.rc2 app/lib/actions/katello/content_view/destroy.rb
katello-3.12.3 app/lib/actions/katello/content_view/destroy.rb
katello-3.12.2 app/lib/actions/katello/content_view/destroy.rb
katello-3.13.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.12.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.11.2 app/lib/actions/katello/content_view/destroy.rb