Skip to content

Commit 3866db1

Browse files
author
utchoang
committed
Revert "Merge remote-tracking branch 'origin/4.14' into 4.15"
This reverts commit 3a82392, reversing changes made to 41c2e94.
1 parent c108187 commit 3866db1

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

server/src/main/java/com/cloud/template/TemplateAdapterBase.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -487,10 +487,6 @@ public TemplateProfile prepareDelete(DeleteTemplateCmd cmd) {
487487
throw new InvalidParameterValueException("Please specify a valid template.");
488488
}
489489

490-
if (template.getState() == VirtualMachineTemplate.State.NotUploaded || template.getState() == VirtualMachineTemplate.State.UploadInProgress) {
491-
throw new InvalidParameterValueException("The template is either getting uploaded or it may be initiated shortly, please wait for it to be completed");
492-
}
493-
494490
return new TemplateProfile(userId, template, zoneId);
495491
}
496492

@@ -530,10 +526,6 @@ public TemplateProfile prepareDelete(DeleteIsoCmd cmd) {
530526
throw new InvalidParameterValueException("Please specify a valid iso.");
531527
}
532528

533-
if (template.getState() == VirtualMachineTemplate.State.NotUploaded || template.getState() == VirtualMachineTemplate.State.UploadInProgress) {
534-
throw new InvalidParameterValueException("The iso is either getting uploaded or it may be initiated shortly, please wait for it to be completed");
535-
}
536-
537529
return new TemplateProfile(userId, template, zoneId);
538530
}
539531

services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,9 +2348,6 @@ protected Answer deleteTemplate(DeleteCommand cmd) {
23482348
File tmpltParent = null;
23492349
if (tmpltPath.exists() && tmpltPath.isDirectory()) {
23502350
tmpltParent = tmpltPath;
2351-
} else if (absoluteTemplatePath.endsWith(File.separator + obj.getId())) {
2352-
// the path ends with <account id>/<template id>, if upload fails
2353-
tmpltParent = tmpltPath;
23542351
} else {
23552352
tmpltParent = tmpltPath.getParentFile();
23562353
}
@@ -2455,9 +2452,6 @@ protected Answer deleteVolume(final DeleteCommand cmd) {
24552452
if (volPath.exists() && volPath.isDirectory()) {
24562453
// for vmware, absoluteVolumePath represents a directory where volume files are located.
24572454
tmpltParent = volPath;
2458-
} else if (absoluteVolumePath.endsWith(File.separator + obj.getId())) {
2459-
// the path ends with <account id>/<volume id>, if upload fails
2460-
tmpltParent = volPath;
24612455
} else {
24622456
// for other hypervisors, the volume .vhd or .qcow2 file path is passed
24632457
tmpltParent = new File(absoluteVolumePath).getParentFile();

0 commit comments

Comments
 (0)