lib/kontena/plugin/digital_ocean/nodes/restart_command.rb in kontena-plugin-digitalocean-0.3.1.rc1 vs lib/kontena/plugin/digital_ocean/nodes/restart_command.rb in kontena-plugin-digitalocean-0.3.1
- old
+ new
@@ -1,6 +1,6 @@
-require_relative '../prompts'
+require 'kontena/plugin/digital_ocean/prompts'
module Kontena::Plugin::DigitalOcean::Nodes
class RestartCommand < Kontena::Command
include Kontena::Cli::Common
include Kontena::Cli::GridOptions
@@ -9,14 +9,13 @@
parameter "[NAME]", "Node name"
option "--token", "TOKEN", "DigitalOcean API token", environment_variable: "DO_TOKEN"
def execute
suppress_warnings # until DO merges resource_kit pr #32
+ require 'kontena/machine/digital_ocean'
require_api_url
require_current_grid
do_token = ask_do_token
-
- require_relative '../../../machine/digital_ocean'
node_name = ask_node(require_token)
client = DropletKit::Client.new(access_token: do_token)
droplet = client.droplets.all.find{|d| d.name == node_name}
if droplet