nvazquez commented on code in PR #7881:
URL: https://github.com/apache/cloudstack/pull/7881#discussion_r1310923994


##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -366,6 +372,76 @@ public VirtualMachineTemplate 
registerTemplate(RegisterTemplateCmd cmd) throws U
         }
     }
 
+    @Override
+    public VirtualMachineTemplate 
registerTemplateFromVMwareVM(RegisterTemplateFromVMwareVMCmd cmd) throws 
ResourceAllocationException {
+        Long zoneId = cmd.getZoneId();
+        Long existingVcenterId = cmd.getExistingVcenterId();
+        String vcenter = cmd.getVcenter();
+        String datacenterName = cmd.getDatacenterName();
+        String username = cmd.getUsername();
+        String password = cmd.getPassword();
+        String clusterName = cmd.getClusterName();
+        String sourceVM = cmd.getVmName();
+        String sourceHostName = cmd.getHost();
+
+        DataCenterVO zone = _dcDao.findById(zoneId);
+        if (zone == null) {
+            s_logger.error(String.format("Cannot find a zone with ID %s", 
zoneId));
+            return null;
+        }
+
+        HypervisorGuru vmwareGuru = _hvGuruMgr.getGuru(HypervisorType.VMware);
+
+        if ((existingVcenterId == null && vcenter == null) || 
(existingVcenterId != null && vcenter != null)) {

Review Comment:
   Yes, indeed. Suggesting to remove it from here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to