Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;

import org.apache.logging.log4j.Logger;
import org.libvirt.Connect;
import org.libvirt.Domain;
import org.libvirt.DomainInfo;
Expand Down Expand Up @@ -2476,7 +2475,9 @@ public Answer handleDownloadTemplateToPrimaryStorage(DirectDownloadCommand cmd)
if (template != null) {
templatePath = template.getPath();
}
if (StringUtils.isEmpty(templatePath)) {
if (ImageFormat.ISO.equals(cmd.getFormat())) {
logger.debug("Skipping template validations as image format is {}", cmd.getFormat());
} else if (StringUtils.isEmpty(templatePath)) {
logger.warn("Skipped validation whether downloaded file is QCOW2 for template {}, due to downloaded template path is empty", template.getName());
} else if (!new File(templatePath).exists()) {
logger.warn("Skipped validation whether downloaded file is QCOW2 for template {}, due to downloaded template path is not valid: {}", template.getName(), templatePath);
Expand Down
Loading