DaanHoogland commented on code in PR #9925:
URL: https://github.com/apache/cloudstack/pull/9925#discussion_r1895703899


##########
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java:
##########
@@ -498,31 +505,26 @@ public List<ManagedObjectReference> 
addHostToPodCluster(VmwareContext serviceCon
             throw new CloudRuntimeException("Invalid serviceContext");
         }
         ManagedObjectReference mor = 
serviceContext.getHostMorByPath(hostInventoryPath);
-        String privateTrafficLabel = null;
+        String privateTrafficLabel;
         privateTrafficLabel = 
serviceContext.getStockObject("privateTrafficLabel");
         if (privateTrafficLabel == null) {
             privateTrafficLabel = _privateNetworkVSwitchName;
         }
 
         if (mor != null) {
-            List<ManagedObjectReference> returnedHostList = new 
ArrayList<ManagedObjectReference>();
+            List<ManagedObjectReference> returnedHostList = new ArrayList<>();
 
             if (mor.getType().equals("ComputeResource")) {
                 List<ManagedObjectReference> hosts = 
serviceContext.getVimClient().getDynamicProperty(mor, "host");
-                assert (hosts != null && hosts.size() > 0);
-
-                // For ESX host, we need to enable host firewall to allow VNC 
access
-                HostMO hostMo = new HostMO(serviceContext, hosts.get(0));

Review Comment:
   good catch, will revert



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