CLOUDSTACK-6893: fix enum ValueOf issue which causes systemvm fail to start

(cherry picked from commit 63ff5a7cbc)
(cherry picked from commit d0e0edca11)
This commit is contained in:
Wei Zhou 2014-06-11 13:46:12 +02:00 committed by Wei Zhou
parent a2acae13e3
commit daa57f67d6
1 changed files with 2 additions and 2 deletions

View File

@ -3999,7 +3999,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
if ((volumeObjectTO.getIopsWriteRate() != null) && (volumeObjectTO.getIopsWriteRate() > 0))
disk.setIopsWriteRate(volumeObjectTO.getIopsWriteRate());
if (volumeObjectTO.getCacheMode() != null)
disk.setCacheMode(DiskDef.diskCacheMode.valueOf(volumeObjectTO.getCacheMode().toString()));
disk.setCacheMode(DiskDef.diskCacheMode.valueOf(volumeObjectTO.getCacheMode().toString().toUpperCase()));
}
vm.getDevices().addDevice(disk);
}
@ -4162,7 +4162,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
diskdef.setIopsWriteRate(iopsWriteRate);
if (cacheMode != null) {
diskdef.setCacheMode(DiskDef.diskCacheMode.valueOf(cacheMode));
diskdef.setCacheMode(DiskDef.diskCacheMode.valueOf(cacheMode.toUpperCase()));
}
}