This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/main by this push:
     new eb26ca1f95b server: Allow download of system vm templates (#6750)
eb26ca1f95b is described below

commit eb26ca1f95b43801ac8b012ea5f619bf8ce54811
Author: GaOrtiga <[email protected]>
AuthorDate: Sat Oct 8 03:22:37 2022 -0300

    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 <[email protected]>
---
 server/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");
         }
 

Reply via email to