Sha256: db738f7e0ce11b1cf92edb799bba4a4cec0296ab79ff30c1c063568c39e96216

Contents?: true

Size: 516 Bytes

Versions: 10

Compression:

Stored size: 516 Bytes

Contents

module Kontena::Plugin::Packet::Nodes
  class RestartCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions

    parameter "NAME", "Node name"
    option "--token", "TOKEN", "Packet API token", required: true
    option "--project", "PROJECT ID", "Packet project id", required: true

    def execute
      require_relative '../../../machine/packet'

      restarter = Kontena::Machine::Packet::NodeRestarter.new(token)
      restarter.run!(project, name)
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kontena-plugin-packet-0.2.5 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.2.4 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.2.3 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.2.2 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.2.1 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.2.0 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.1.2 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.2.0.pre1 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.1.1 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.1.0 lib/kontena/plugin/packet/nodes/restart_command.rb