Sha256: a8b51dfd9f1843762fefd44fd7729079bf709d574d6f9550223a3e3b9c0c316c

Contents?: true

Size: 867 Bytes

Versions: 11

Compression:

Stored size: 867 Bytes

Contents

module Actions
  module Katello
    module ContentViewVersion
      class Destroy < Actions::Base
        def plan(version, options = {})
          version.validate_destroyable!(skip_environment_check: options[:skip_environment_check])

          destroy_env_content = !options.fetch(:skip_destroy_env_content, false)
          repos = destroy_env_content ? version.repositories : version.archived_repos

          sequence do
            concurrence do
              repos.each do |repo|
                repo_options = options.clone
                plan_action(Repository::Destroy, repo, repo_options)
              end
            end
          end

          plan_self(:id => version.id)
        end

        def finalize
          version = ::Katello::ContentViewVersion.find_by(id: input[:id])
          version&.destroy!
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
katello-4.8.4 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.9.1 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.8.3 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.9.0 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.8.2 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.9.0.rc2 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.9.0.rc1 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.8.1 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.8.0 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.8.0.rc2 app/lib/actions/katello/content_view_version/destroy.rb
katello-4.8.0.rc1 app/lib/actions/katello/content_view_version/destroy.rb