fixes #4155 - associate and disassociate vms using the api

I'm not sure I see a how to associate individual vm's, but this would allow disassociations and mass associations for compute resources. 
`vm` can be an array, so `Array.wrap(vm).compact.map(&:identity)` will work too.