alexandru-bagu commented on a change in pull request #4516:
URL: https://github.com/apache/cloudstack/pull/4516#discussion_r537459394



##########
File path: 
plugins/storage/volume/default/src/main/java/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackPrimaryDataStoreLifeCycleImpl.java
##########
@@ -133,7 +133,7 @@ public DataStore initialize(Map<String, Object> dsInfos) {
         String providerName = (String)dsInfos.get("providerName");
         HypervisorType hypervisorType = HypervisorType.None;
         if(dsInfos.containsKey("hypervisorType")) {
-            hypervisorType = (HypervisorType)dsInfos.get("hypervisorType");
+            hypervisorType = 
HypervisorType.getType((String)dsInfos.get("hypervisorType"));

Review comment:
       @weizhouapache The issue I created this PR for is that 
dsInfos.get("hypervisorType") is sometimes String or sometimes missing. As I 
highlighted in my previous post, both String and HypervisorType is used so I am 
not sure about how to proceed. We could check types but I don't believe that is 
correct.




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

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


Reply via email to