Merge "Add same launch instance error handling as image to instance"

This commit is contained in:
Zuul 2018-02-28 21:30:05 +00:00 committed by Gerrit Code Review
commit c1486728d3
1 changed files with 2 additions and 1 deletions

View File

@ -516,7 +516,8 @@
function checkVolumeForImage() {
var source = selection[0];
if (source && ctrl.currentBootSource === bootSourceTypes.IMAGE) {
if (source && ctrl.currentBootSource === bootSourceTypes.IMAGE ||
source && ctrl.currentBootSource === bootSourceTypes.INSTANCE_SNAPSHOT ) {
var imageGb = source.size * 1e-9;
var imageDisk = source.min_disk;
ctrl.minVolumeSize = Math.ceil(Math.max(imageGb, imageDisk));