Updated openstack/openstack
Project: openstack/nova  6fc84f1951d12cc5f504875f7f73868e002e2f52
null
VMware: Always upload a snapshot as a preallocated disk

Currently, a snapshot operation always produces a preallocated
disk type. When the snapshot is uploaded to glance, the source
image metadata is uploaded with the new snapshot and then some
of the metadata properties are updated. The update doesn't
include the disk_type property, this can be problematic. If
the original image has a sparse disk type and a snapshot is
taken, then the snapshot which is a preallocated disk type is
uploaded to glance with the disk_type property set to sparse,
which creates a disk type mismatch and causes errors when a vm
is spawned from that snapshot. This patch addresses the issue
by correcting the image metadata used when uploading a snapshot
to glance.

Also, the image_upload function in vmwareapi/fake.py has been
modified to address the change. Any function call to
image_upload (from the unit tests) will assert that the
metadata for the image to be uploaded must have the disk_type
value to be preallocated.

Closes-Bug: 1247296
(cherry picked from commit 11e327f888a6dbde990d75196560083fddecf394)

Conflicts:

	nova/tests/virt/vmwareapi/test_vmwareapi.py
Change-Id: I71cfa8d4d1eb7911abb489153292fb0d1e614765