Sha256: 820cd230fb1fd5b01d0279c8ae50eca977fd2511cdd756dea8cfd157fe956c2e

Contents?: true

Size: 641 Bytes

Versions: 9

Compression:

Stored size: 641 Bytes

Contents

module Actions
  module Katello
    module System
      class HostDestroy < Actions::EntryAction
        def plan(host)
          action_subject(host)
          sequence do
            if host.content_host
              plan_action(Katello::System::Destroy, host.content_host)
            end
            plan_self(:host_id => host.id)
          end
        end

        def humanized_name
          _("Destroy Host")
        end

        def finalize
          host = Host.find(input[:host_id])
          unless host.reload.destroy
            fail host.errors.full_messages.join('; ')
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
katello-2.4.5 app/lib/actions/katello/system/host_destroy.rb
katello-2.4.4 app/lib/actions/katello/system/host_destroy.rb
katello-2.4.3 app/lib/actions/katello/system/host_destroy.rb
katello-2.4.2 app/lib/actions/katello/system/host_destroy.rb
katello-2.4.1 app/lib/actions/katello/system/host_destroy.rb
katello-2.4.0 app/lib/actions/katello/system/host_destroy.rb
katello-2.4.0.rc3 app/lib/actions/katello/system/host_destroy.rb
katello-2.4.0.rc2 app/lib/actions/katello/system/host_destroy.rb
katello-2.4.0.rc1 app/lib/actions/katello/system/host_destroy.rb