Merge "Fail to snapshot PowerVC image"

This commit is contained in:
Jenkins 2014-12-23 01:03:58 +00:00 committed by Gerrit Code Review
commit d278ca1de4
1 changed files with 13 additions and 1 deletions

View File

@ -748,8 +748,20 @@ class PowerVCCloudManager(manager.Manager):
if rtn is not None:
break
"""TODO: This fix doesn't handle the case that user delete the image
from PowerVC, and such image has associated VM in PowerVC, then those
PowerVC instances synced to PowerVC will still associated a default
image id with that instance.
"""
if rtn is None:
rtn = self.get_default_image(ctx)
if db_instance is not None:
LOG.warning("No local image found: %s, skip updating image_ref"
% db_instance.get('image_ref'))
local_image = {}
local_image['id'] = db_instance.get('image_ref')
return local_image
else:
rtn = self.get_default_image(ctx)
return rtn