sureshanaparti commented on a change in pull request #4738:
URL: https://github.com/apache/cloudstack/pull/4738#discussion_r597542791
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -2725,16 +2729,19 @@ private String getPropertyValue(OVFPropertyTO prop) {
*/
protected void setVAppPropertiesToConfigSpec(VmConfigInfo vAppConfig,
Map<String, String>
ovfProperties,
- VirtualMachineConfigSpec
vmConfig) throws Exception {
+ VirtualMachineConfigSpec
vmConfig, VmwareHypervisorHost hyperHost) throws Exception {
VmConfigSpec vmConfigSpec = new VmConfigSpec();
vmConfigSpec.getEula().addAll(vAppConfig.getEula());
vmConfigSpec.setInstallBootStopDelay(vAppConfig.getInstallBootStopDelay());
vmConfigSpec.setInstallBootRequired(vAppConfig.isInstallBootRequired());
vmConfigSpec.setIpAssignment(vAppConfig.getIpAssignment());
vmConfigSpec.getOvfEnvironmentTransport().addAll(vAppConfig.getOvfEnvironmentTransport());
-
vmConfigSpec.getProduct().addAll(copyVAppConfigProductSectionFromOVF(vAppConfig));
-
vmConfigSpec.getProperty().addAll(copyVAppConfigPropertySectionFromOVF(vAppConfig,
ovfProperties));
-
vmConfigSpec.getOvfSection().addAll(copyVAppConfigOvfSectionFromOVF(vAppConfig));
+
+ // For backward compatibility, prior to Vmware 6.5 use EDIT operation
instead of ADD
+ boolean useEditOperation =
hyperHost.getContext().getServiceContent().getAbout().getApiVersion().compareTo("6.5")
< 1;
Review comment:
```suggestion
boolean useEditOperation = ((HostMO)
hyperHost).getHostAboutInfo().getApiVersion().compareTo("6.5") < 1;
```
--
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]