 $assign = require 'lodash/assign'
 $debug = (require 'debug') 'xo:api:vm'
-$filter = require 'lodash/filter'
 $findIndex = require 'lodash/findIndex'
 $findWhere = require 'lodash/find'
 concat = require 'lodash/concat'

  formatXml: $js2xml,
  isArray: $isArray,
  map,
  mapToArray,
  noop,
  parseSize,


  xapi = @getXapi(vm)

  @getAllAcls().then((acls) =>
    Promise.all(mapFilter(acls, (acl) =>
      if (acl.object == vm.id)
        return pCatch.call(
          @removeAcl(acl.subject, acl.object, acl.action),
          noop
        )
    ))
  )

  # Update IP pools
  yield Promise.all(map(vm.VIFs, (vifId) =>
    vif = xapi.getObject(vifId)
