You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/01/24 08:35:22 UTC

[GitHub] DaanHoogland commented on a change in pull request #2423: CLOUDSTACK-10250: Reinstall VM from bypassed registered template

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:
users@infra.apache.org


With regards,
Apache Git Services