Sha256: 3a8af7134339061fd84940ac31107e2604377a2660e420b5c8bb11b48e00bcbf

Contents?: true

Size: 683 Bytes

Versions: 30

Compression:

Stored size: 683 Bytes

Contents

module Actions
  module Katello
    module ActivationKey
      class Destroy < Actions::EntryAction
        def plan(activation_key, options = {})
          skip_candlepin = options.fetch(:skip_candlepin, false)
          action_subject(activation_key)

          plan_action(Candlepin::ActivationKey::Destroy, cp_id: activation_key.cp_id) if !skip_candlepin && activation_key.cp_id.present?
          plan_self
        end

        def finalize
          activation_key = ::Katello::ActivationKey.find(input[:activation_key][:id])
          activation_key.destroy!
        end

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

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
katello-4.6.2.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.6.2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.6.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.2.2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.2.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.5.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.6.0 app/lib/actions/katello/activation_key/destroy.rb
katello-4.6.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.6.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.5.0 app/lib/actions/katello/activation_key/destroy.rb
katello-4.5.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.5.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.0.2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.0.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.3.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.0 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.4.0.rc1 app/lib/actions/katello/activation_key/destroy.rb