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


##########
vmware-base/src/main/java/com/cloud/hypervisor/vmware/mo/BaseMO.java:
##########
@@ -153,4 +168,66 @@ public int getCustomFieldKey(String morType, String 
fieldName) throws Exception
 
         return cfmMo.getCustomFieldKey(morType, fieldName);
     }
+
+    private static UnmanagedInstanceTO.PowerState 
convertPowerState(VirtualMachinePowerState powerState) {
+        return powerState == VirtualMachinePowerState.POWERED_ON ? 
UnmanagedInstanceTO.PowerState.PowerOn :
+                powerState == VirtualMachinePowerState.POWERED_OFF ? 
UnmanagedInstanceTO.PowerState.PowerOff : 
UnmanagedInstanceTO.PowerState.PowerUnknown;
+    }
+
+    protected List<UnmanagedInstanceTO> 
convertVmsObjectContentsToUnmanagedInstances(List<ObjectContent> ocs, String 
keyword) throws Exception {

Review Comment:
   complexity of this method is a bit high, would be nice to modularise it a 
bit.



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to