[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16337131#comment-16337131
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10250:
---------------------------------------------

DaanHoogland commented on a change in pull request #2423: CLOUDSTACK-10250: 
Reinstall VM from bypassed registered template
URL: https://github.com/apache/cloudstack/pull/2423#discussion_r163480756
 
 

 ##########
 File path: server/src/com/cloud/vm/UserVmManagerImpl.java
 ##########
 @@ -6100,9 +6101,18 @@ public UserVm restoreVMInternal(Account caller, 
UserVmVO vm, Long newTemplateId)
                     throw ex;
                 }
             }
-            TemplateDataStoreVO tmplStore = 
_templateStoreDao.findByTemplateZoneReady(template.getId(), 
vm.getDataCenterId());
-            if (tmplStore == null) {
-                throw new InvalidParameterValueException("Cannot restore the 
vm as the template " + template.getUuid() + " isn't available in the zone");
+
+            TemplateDataStoreVO tmplStore;
 
 Review comment:
   please, extract this bit as a separate private method, i.e. 
checkRestorePossible().

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Reinstall VM from bypassed registered template
> ----------------------------------------------
>
>                 Key: CLOUDSTACK-10250
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10250
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.11.0.0
>            Reporter: Nicolas Vazquez
>            Assignee: Nicolas Vazquez
>            Priority: Major
>
> This fix allows users to restore a VM from a previously registered template 
> using the Direct Download option (only for KVM currently)
> NOTE: As Reinstall VM button prompts only featured templates, to be able to 
> restore a vm to a Direct Download template, it should be registered as 
> Featured



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to