Sha256: b971b7c0f97ef7ebf4e4222fead12eee309450a79422d908e3e7a0e8057b738b

Contents?: true

Size: 505 Bytes

Versions: 3

Compression:

Stored size: 505 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 'kontena/machine/packet'
      restarter = Kontena::Machine::Packet::NodeRestarter.new(token)
      restarter.run!(project, name)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kontena-plugin-packet-0.2.7 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.2.7.rc1 lib/kontena/plugin/packet/nodes/restart_command.rb
kontena-plugin-packet-0.2.6 lib/kontena/plugin/packet/nodes/restart_command.rb