       , (error, results) -> callback err, results
 
   # Returns an instance given its name.
+  # TODO: put err in to config
   @get: (name, callback) ->
     @list (err, list) ->
       k = _.find list, (n) ->

      , (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

  @create: (config, callback) ->
    super config

    # Create Linode via this waterfall.
    # Parameters from the last function's call back are
    # sent to the next function in the array.
    async.waterfall [
      @_get_config_linode_plan
      @_linode_create
      @_update_linode_label
      @_have_updated
      @_create_disk
      @_disk_created
      @_create_linode_config
    ], (err, result) =>
      # This is called at the end of the waterfall,
      # or if any of the callbacks returns an error.
      # TODO: improve error handling
      console.log err if err?
      @_got_linode_id result, callback if result?

  @destroy: (name, callback) ->
    @get name, (instance) =>
