       else callback data
 
 
+  addTestMachine: (machine, workspaces) ->
+    @_testMachine = { machine, workspaces }
+    @revive()
+
+
   get: ->
     return @setDefaults_ globals.userEnvironmentData
 

kd      = require 'kd'
globals = require 'globals'
remote  = require 'app/remote'
Machine = require 'app/providers/machine'
async   = require 'async'

KDNotificationView = kd.NotificationView


module.exports =


  fetch: (callback, ensureDefaultWorkspace = no) ->

    @getAllMachines().filter (vm) -> vm.machine.status.state is 'Running'


  getMachineWithPredicate: (fn, predicate) ->

    filtered = @getAllMachines().filter predicate

    if filtered.length then filtered[0] else null


  fetchMachine: (identifier, callback) ->

    @fetchMachineBySlug identifier, (machine) =>
