Fix precission issue when calculating image size in GB.
When calculating imageGb, should use 1073741824.0 (Bytes in a GB) as the divisor.
Closes-Bug:
if (source && ctrl.currentBootSource === bootSourceTypes.IMAGE ||
source && ctrl.currentBootSource === bootSourceTypes.INSTANCE_SNAPSHOT ) {
- var imageGb = source.size * 1e-9;
+ var imageGb = source.size / 1073741824.0;
var imageDisk = source.min_disk;
ctrl.minVolumeSize = Math.ceil(Math.max(imageGb, imageDisk));
if ($scope.model.newInstanceSpec.vol_size < ctrl.minVolumeSize) {
