Skip to content

Commit eb26ca1

Browse files
GaOrtigaGabriel Ortiga Fernandes
andauthored
server: Allow download of system vm templates (#6750)
Currently, ACS does not allow the user to download System VM Templates, even though it may be usefull as it can speed up the registration process of the template for production once the homologation is done beforehand. This PR changes this, allowing the user to download said VM Templates Co-authored-by: Gabriel Ortiga Fernandes <gabriel.fernandes@scclouds.com.br>
1 parent de8aae1 commit eb26ca1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,7 @@ private String extract(Account caller, Long templateId, String url, Long zoneId,
522522
throw new InvalidParameterValueException("Unable to find " + desc + " with id " + templateId);
523523
}
524524

525-
if (template.getTemplateType() == Storage.TemplateType.SYSTEM) {
526-
throw new InvalidParameterValueException("Unable to extract the " + desc + " " + template.getName() + " as it is a default System template");
527-
} else if (template.getTemplateType() == Storage.TemplateType.PERHOST) {
525+
if (template.getTemplateType() == Storage.TemplateType.PERHOST) {
528526
throw new InvalidParameterValueException("Unable to extract the " + desc + " " + template.getName() + " as it resides on host and not on SSVM");
529527
}
530528

0 commit comments

Comments
 (0)