Sha256: 59cb5653359023d7bb284eded1ba8fa38156986f4af6542a92e725cbe1f0ee69

Contents?: true

Size: 653 Bytes

Versions: 172

Compression:

Stored size: 653 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) unless skip_candlepin
          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

172 entries across 172 versions & 1 rubygems

Version Path
katello-4.1.4 app/lib/actions/katello/activation_key/destroy.rb
katello-4.0.3 app/lib/actions/katello/activation_key/destroy.rb
katello-3.18.5 app/lib/actions/katello/activation_key/destroy.rb
katello-4.2.0.1.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.2.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.1.3 app/lib/actions/katello/activation_key/destroy.rb
katello-4.2.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.0.2.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.1.2.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.0.2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.1.2 app/lib/actions/katello/activation_key/destroy.rb
katello-3.18.4 app/lib/actions/katello/activation_key/destroy.rb
katello-4.1.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.1.0 app/lib/actions/katello/activation_key/destroy.rb
katello-4.0.1.2 app/lib/actions/katello/activation_key/destroy.rb
katello-3.18.3.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.1.0.rc2.2 app/lib/actions/katello/activation_key/destroy.rb
katello-4.1.0.rc2.1 app/lib/actions/katello/activation_key/destroy.rb
katello-4.0.1.1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.18.3 app/lib/actions/katello/activation_key/destroy.rb