 - [ ] change the machine type of a vm
 - [ ] switch a vm between being pre-empt or not
 - [ ] increase the size of a disk image that is attached to a VM
+- [ ] change the name of a disk
 
 Rules we care about are:
 

    else
        operation.onComplete onCompleteOpts, (err, metadata) ->
            done()
            if err
                cb?(err)
            else if metadata.error

        dbg("starting")
        @_disk.delete (err, operation, apiResponse) =>
            handle_operation(err, operation, (->dbg('done')), opts.cb)

    attach_to: (opts) =>
        opts = defaults opts,
            vm : required
            cb : required
        if not opts.vm instanceof VM
            opts.cb("vm must be an instance of VM")
            return
        opts.vm.attach_disk
            disk : @
            cb   : opts.cb

    detach: (opts) =>
        opts = defaults opts,
            vm : undefined   # if not given, detach from all users of this disk
            cb : required
        dbg = @dbg("detach")
        vms = undefined
        async.series([
            (cb) =>
                if opts.vm?
                    vms = [opts.vm]
                    cb()
                else
                    dbg("determine vm that disk is attached to")
                    @get_metadata
                        cb : (err, data) =>
                            if err
                                cb(err)
                            else
                                # all the users must be in the same zone as this disk
                                vms = (@gcloud.vm(name:misc.path_split(u).tail, zone:@zone) for u in data.users)
                                cb()
            (cb) =>
                dbg('actually detach disk from that vm')
                f = (vm, cb) =>
                    vm.detach_disk
                        disk : @
                        cb   : cb
                async.map(vms, f, cb)

            ], opts.cb)


class Snapshot
    constructor: (@gcloud, @name) ->
