String cmsVersion = cmsProdInfo[0].getVersion();
String cmsFullVersion = cmsProdInfo[0].getFullVersion();
VcResourcePool vcRp = cms.getParentVApp();
String vAppVersion = vcRp.getVersion();
String vAppFullVersion = vcRp.getFullVersion();
ProductSpec prodSpec = null;
// If CMS VM version is not the same as the parent vApp version,
// update the parent vApp version
if (!cmsVersion.equals(vAppVersion) || !cmsFullVersion.equals(vAppFullVersion)) {
//not found, should add this property
prodSpec = new ProductSpecImpl();
ProductInfo prod = new ProductInfoImpl();
prod.setKey(0);
prod.setVersion(cmsVersion);
prod.setFullVersion(cmsFullVersion);
prodSpec.setInfo(prod);
prodSpec.setOperation(Operation.edit);
}
if (prodSpec != null) {
final VAppConfigSpec spec = new VAppConfigSpecImpl();
spec.setProduct(new ProductSpec[]{prodSpec});