From eb26ca1f95b43801ac8b012ea5f619bf8ce54811 Mon Sep 17 00:00:00 2001 From: GaOrtiga <49285692+GaOrtiga@users.noreply.github.com> Date: Sat, 8 Oct 2022 03:22:37 -0300 Subject: [PATCH] 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 --- .../src/main/java/com/cloud/template/TemplateManagerImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server/src/main/java/com/cloud/template/TemplateManagerImpl.java b/server/src/main/java/com/cloud/template/TemplateManagerImpl.java index f441229a4bf..1a360c88edb 100755 --- a/server/src/main/java/com/cloud/template/TemplateManagerImpl.java +++ b/server/src/main/java/com/cloud/template/TemplateManagerImpl.java @@ -522,9 +522,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, throw new InvalidParameterValueException("Unable to find " + desc + " with id " + templateId); } - if (template.getTemplateType() == Storage.TemplateType.SYSTEM) { - throw new InvalidParameterValueException("Unable to extract the " + desc + " " + template.getName() + " as it is a default System template"); - } else if (template.getTemplateType() == Storage.TemplateType.PERHOST) { + if (template.getTemplateType() == Storage.TemplateType.PERHOST) { throw new InvalidParameterValueException("Unable to extract the " + desc + " " + template.getName() + " as it resides on host and not on SSVM"); }