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.8.0 app/lib/actions/katello/content_view/destroy.rb
katello-3.8.0.rc3 app/lib/actions/katello/content_view/destroy.rb
katello-3.8.0.rc2 app/lib/actions/katello/content_view/destroy.rb
katello-3.7.0 app/lib/actions/katello/content_view/destroy.rb
katello-3.8.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.7.0.rc2 app/lib/actions/katello/content_view/destroy.rb
katello-3.7.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.5.2 app/lib/actions/katello/content_view/destroy.rb
katello-3.6.0 app/lib/actions/katello/content_view/destroy.rb
katello-3.6.0.1.rc2 app/lib/actions/katello/content_view/destroy.rb
katello-3.6.0.rc2 app/lib/actions/katello/content_view/destroy.rb
katello-3.6.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.5.1.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.5.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.5.0.1 app/lib/actions/katello/content_view/destroy.rb
katello-3.5.0 app/lib/actions/katello/content_view/destroy.rb
katello-3.5.0.rc2 app/lib/actions/katello/content_view/destroy.rb
katello-3.5.0.rc1 app/lib/actions/katello/content_view/destroy.rb
katello-3.4.5 app/lib/actions/katello/content_view/destroy.rb
katello-3.4.4 app/lib/actions/katello/content_view/destroy.rb