Merge "Fixed missing Launch as Instance for snapshot"

This commit is contained in:
Jenkins 2014-09-24 10:51:32 +00:00 committed by Gerrit Code Review
commit 4124320b53

View File

@ -40,6 +40,13 @@ class LaunchSnapshot(volume_tables.LaunchVolume):
"source_id": vol_id})
return "?".join([base_url, params])
def allowed(self, request, snapshot=None):
if snapshot:
if (snapshot._volume and
getattr(snapshot._volume, 'bootable', '') == 'true'):
return snapshot.status == "available"
return False
class DeleteVolumeSnapshot(policy.PolicyTargetMixin, tables.DeleteAction):
data_type_singular = _("Volume Snapshot")