 _s           = require('underscore.string')
 async        = require 'async'
 
+mex           = (require 'utility').mex
 LithiumConfig = (require 'lithium_config').LithiumConfig
 Instance      = (require 'instance').Instance
 

      , (err, res) ->
        callback()

  ###

  Only Private Methods Below Here

  ###

  @_get_config_linode_plan: (callback) =>
    @_get_plan @config.ram, @config.disk_size, callback

  # Private method to create a linode from a plan.  Called from
  # @create; this does most of the actual work.
  @_linode_create: (plan_id, callback) =>
    @client.call 'linode.create',
      'DatacenterID': 7

  @_got_linode_id: (res, callback) =>
      @client.call 'linode.list', {LinodeID:@linode_id}, (err, res) ->
        callback err, _convert_to_instance res[0]

  ### End create waterfall functions ###

  # Takes RAM as MB and disk as GB.
  @_get_plan: (ram, disk, callback) ->
