weizhouapache commented on code in PR #12484:
URL: https://github.com/apache/cloudstack/pull/12484#discussion_r2711779839


##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -2946,6 +2945,23 @@ public UserVm updateVirtualMachine(UpdateVMCmd cmd) 
throws ResourceUnavailableEx
                     throw new InvalidParameterValueException("'extraconfig' 
should not be included in details as key");
                 }
 
+                if (template != null && template.isDeployAsIs()) {
+                    final List<String> vmwareAllowedDetailsFromOva = 
VmwareAdditionalDetailsFromOvaEnabled.valueIn(vmInstance.getDataCenterId()) ?
+                            
Stream.of(VmwareAllowedAdditionalDetailsFromOva.valueIn(vmInstance.getDataCenterId()).split(","))
+                            .map(String::trim)
+                            .collect(Collectors.toList()) : List.of();
+                    for (String detailKey : details.keySet()) {
+                        if (vmwareAllowedDetailsFromOva.contains(detailKey)) {
+                            continue;
+                        }
+                        UserVmDetailVO detailVO = 
existingDetails.stream().filter(d -> Objects.equals(d.getName(), 
detailKey)).findFirst().orElse(null);

Review Comment:
   ```suggestion
                           VMInstanceDetailVO detailVO = 
existingDetails.stream().filter(d -> Objects.equals(d.getName(), 
detailKey)).findFirst().orElse(null);
   ```



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