itsayushpandey commented on code in PR #7712:
URL: https://github.com/apache/cloudstack/pull/7712#discussion_r1375574768


##########
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java:
##########
@@ -955,14 +978,20 @@ private UserVm importVirtualMachineInternal(final 
UnmanagedInstanceTO unmanagedI
         }
         // Check NICs and supplied networks
         Map<String, Network.IpAddresses> nicIpAddressMap = 
getNicIpAddresses(unmanagedInstance.getNics(), callerNicIpAddressMap);
-        Map<String, Long> allNicNetworkMap = 
getUnmanagedNicNetworkMap(unmanagedInstance.getName(), 
unmanagedInstance.getNics(), nicNetworkMap, nicIpAddressMap, zone, hostName, 
owner);
+        Map<String, Long> allNicNetworkMap = 
getUnmanagedNicNetworkMap(unmanagedInstance.getName(), 
unmanagedInstance.getNics(), nicNetworkMap, nicIpAddressMap, zone, hostName, 
owner, host.getHypervisorType());
         if (!CollectionUtils.isEmpty(unmanagedInstance.getNics())) {
             allDetails.put(VmDetailConstants.NIC_ADAPTER, 
unmanagedInstance.getNics().get(0).getAdapterType());
         }
+
+        if (StringUtils.isNotEmpty(unmanagedInstance.getVncPassword())) {

Review Comment:
   I don't think its needed as for missing VNC password, we don't execute it at 
all and code remains simple?
   
   (My thinking was that hypervisors plugins that need to pass back VNC 
password will set it in UnmanagedInstanceTO, and if it is passed we process it 
here without worrying about hypervisor type.)



-- 
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