bug 4957: copyTemplate: should compare template_host_ref.size to configuration.max.template.iso.size values before sending command to the backend .

status 4957: resolved fixed
This commit is contained in:
Nitin 2011-08-10 18:18:35 +05:30
parent f24e14d2d9
commit 93204ae862
1 changed files with 4 additions and 0 deletions

View File

@ -234,6 +234,10 @@ public class DownloadMonitorImpl implements DownloadMonitor {
}
Long maxTemplateSizeInBytes = getMaxTemplateSizeInBytes();
if (srcTmpltHost.getSize() > maxTemplateSizeInBytes){
throw new CloudRuntimeException("Cant copy the template as the template's size " +srcTmpltHost.getSize()+
" is greater than max.template.iso.size " + maxTemplateSizeInBytes);
}
if(destTmpltHost != null) {
start();