class Kontena::Plugin::Cloud::Platform::UseCommand

Public Instance Methods

execute() click to toggle source
# File lib/kontena/plugin/cloud/platform/use_command.rb, line 13
def execute
  if name && name.include?('/')
    platform = require_platform(name)
  else
    @current_organization = prompt_organization
    platform = prompt_platform
    require_platform(platform.to_path)
  end

  config.current_master = platform.to_path
  config.current_master.grid = platform.grid_id
  config.write
  puts "Using platform: #{pastel.cyan(platform.to_path)}"
end