https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/ds_util.py