コード例 #1
0
ファイル: ImportUtils.java プロジェクト: oVirt/ovirt-engine
 /**
  * OvfReader can't provide proper value of {@link VmBase#maxMemorySizeMb} since it depends on
  * effective compatibility version of target cluster.
  */
 public static void updateMaxMemorySize(
     VmTemplate template, Version effectiveCompatibilityVersion) {
   if (template.getMaxMemorySizeMb() == 0) {
     final int maxMemorySize =
         VmCommonUtils.maxMemorySizeWithHotplugInMb(
             template.getOsId(), effectiveCompatibilityVersion);
     template.setMaxMemorySizeMb(maxMemorySize);
   }
 }