lib/kontena/plugin/digital_ocean/master/create_command.rb in kontena-plugin-digitalocean-0.3.1.rc1 vs lib/kontena/plugin/digital_ocean/master/create_command.rb in kontena-plugin-digitalocean-0.3.1

- old
+ new

@@ -1,7 +1,6 @@ -require 'securerandom' -require_relative '../prompts' +require 'kontena/plugin/digital_ocean/prompts' module Kontena::Plugin::DigitalOcean::Master class CreateCommand < Kontena::Command include Kontena::Cli::Common include Kontena::Plugin::DigitalOcean::Prompts @@ -15,16 +14,17 @@ option "--vault-secret", "VAULT_SECRET", "Secret key for Vault (optional)" option "--vault-iv", "VAULT_IV", "Initialization vector for Vault (optional)" option "--mongodb-uri", "URI", "External MongoDB uri (optional)" option "--version", "VERSION", "Define installed Kontena version", default: 'latest' - def execute suppress_warnings # until DO merges resource_kit pr #32 do_token = ask_do_token - require_relative '../../../machine/digital_ocean' + require 'securerandom' + require 'kontena/machine/digital_ocean' + do_token = ask_do_token do_region = ask_droplet_region(do_token) do_size = ask_droplet_size(do_token, do_region) do_ssh_key_id = ask_ssh_key(do_token) provisioner = provisioner(do_token)