Bug 11646 - OVM - volume > download volume failed for both ROOT and DATA volumes

return volume name instead of full path to ingratiate mgmt server's bad name convention
This commit is contained in:
frank 2011-11-01 18:12:35 -07:00
parent d4a106319d
commit 5164394949
2 changed files with 6 additions and 1 deletions

View File

@ -433,7 +433,10 @@ if this doesn't resolve the problem, please check oracle manual to see how to of
primaryStoragePath = sr.mountpoint
resultPath = copyToPrimary(secMountPoint, volumeFolderOnSecStorage, volumePath, primaryStoragePath)
OvmStoragePool()._umount(secMountPoint)
rs = toGson({"installPath":resultPath})
# ingratiate bad mgmt server design, it asks 'installPath' but it only wants the volume name without suffix
volumeUuid = basename(resultPath).rstrip(".raw")
rs = toGson({"installPath":volumeUuid})
return rs
except Exception, e:
try:

View File

@ -4406,6 +4406,8 @@ public class ManagementServerImpl implements ManagementServer {
return "qcow2";
}else if (cluster.getHypervisorType() == HypervisorType.VMware){
return "ova";
}else if (cluster.getHypervisorType() == HypervisorType.Ovm){
return "raw";
}else{
return null;
}