]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
VMware: Fix ImageNotAuthorized during copy volume
authorVipin Balachandran <vbala@vmware.com>
Fri, 27 Mar 2015 13:09:04 +0000 (06:09 -0700)
committerVipin Balachandran <vbala@vmware.com>
Fri, 27 Mar 2015 13:34:55 +0000 (06:34 -0700)
commitf73c9e527810bfd2c5e9c95af02bad5fb9cd0891
treee1acf7a1748a2d598580937c9f22d08258fbec39
parent177639b42623d58894ced7fc2e875af392d772eb
VMware: Fix ImageNotAuthorized during copy volume

Copy volume to image by non-admin user fails with ImageNotAuthorized.
This is because we are setting image's is_public meta-data to True
while calling image update (for writing to image). This patch fixes
this by setting is_public using the image-meta passed in by Cinder.

This bug was introduced by commit 960cbb21e359a3526e9ff9bf4ca78db1eca3a743.

Note: The oslo.vmware API which we use for upload requires is_public
meta-data which may not be needed at all for writing to image.
Till we update oslo.vmware API, we have to pass a value for is_public.

Change-Id: Ib7778b6c7a3e8dd501216173a26d7ba246aa85e4
Closes-Bug: #1437319
cinder/tests/test_vmware_vmdk.py
cinder/volume/drivers/vmware/vmdk.py