Sha256: 6c4898f66ac90c0e06fd56906cf7e1282718a32b4f0cf58d68f6d6b5e76cbcb5

Contents?: true

Size: 501 Bytes

Versions: 8

Compression:

Stored size: 501 Bytes

Contents

module Kontena::Cli::Nodes::Packet
  class RestartCommand < Clamp::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 'kontena/machine/packet'

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kontena-cli-0.14.7 lib/kontena/cli/nodes/packet/restart_command.rb
kontena-cli-0.14.6 lib/kontena/cli/nodes/packet/restart_command.rb
kontena-cli-0.14.5 lib/kontena/cli/nodes/packet/restart_command.rb
kontena-cli-0.14.4 lib/kontena/cli/nodes/packet/restart_command.rb
kontena-cli-0.14.3 lib/kontena/cli/nodes/packet/restart_command.rb
kontena-cli-0.14.2 lib/kontena/cli/nodes/packet/restart_command.rb
kontena-cli-0.14.1 lib/kontena/cli/nodes/packet/restart_command.rb
kontena-cli-0.14.0 lib/kontena/cli/nodes/packet/restart_command.rb