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-3.3.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-3.3.0.rc1.1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.3.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.2.1.1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.2.1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.2.0 app/lib/actions/katello/activation_key/destroy.rb
katello-3.2.0.rc3 app/lib/actions/katello/activation_key/destroy.rb
katello-3.2.0.rc2 app/lib/actions/katello/activation_key/destroy.rb
katello-3.2.0.rc1.1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.2.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.1.0.1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.1.0 app/lib/actions/katello/activation_key/destroy.rb
katello-3.1.0.rc2.1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.0.2 app/lib/actions/katello/activation_key/destroy.rb
katello-2.4.5 app/lib/actions/katello/activation_key/destroy.rb
katello-3.1.0.rc1 app/lib/actions/katello/activation_key/destroy.rb
katello-3.0.1 app/lib/actions/katello/activation_key/destroy.rb
katello-2.4.4 app/lib/actions/katello/activation_key/destroy.rb
katello-3.0.0 app/lib/actions/katello/activation_key/destroy.rb
katello-2.4.3 app/lib/actions/katello/activation_key/destroy.rb