use of com.vmware.vim25.VmConfigInfo in project cloudstack by apache.
the class VmwareResource method setDeployAsIsProperties.
/**
* Set OVF properties (if available)
*/
private void setDeployAsIsProperties(VirtualMachineMO vmMo, DeployAsIsInfoTO deployAsIsInfo, VirtualMachineConfigSpec vmConfigSpec, VmwareHypervisorHost hyperHost) throws Exception {
if (deployAsIsInfo != null && MapUtils.isNotEmpty(deployAsIsInfo.getProperties())) {
Map<String, String> properties = deployAsIsInfo.getProperties();
VmConfigInfo vAppConfig = vmMo.getConfigInfo().getVAppConfig();
s_logger.info("Copying OVF properties to the values the user provided");
setVAppPropertiesToConfigSpec(vAppConfig, properties, vmConfigSpec, hyperHost);
}
}
use of com.vmware.vim25.VmConfigInfo in project cloudstack by apache.
the class VmwareResource method copyVAppConfigOvfSectionFromOVF.
/**
* Set the ovf section spec from existing vApp configuration
*/
protected List<VAppOvfSectionSpec> copyVAppConfigOvfSectionFromOVF(VmConfigInfo vAppConfig, boolean useEdit) {
List<VAppOvfSectionInfo> ovfSection = vAppConfig.getOvfSection();
List<VAppOvfSectionSpec> specs = new ArrayList<>();
for (VAppOvfSectionInfo info : ovfSection) {
VAppOvfSectionSpec spec = new VAppOvfSectionSpec();
spec.setInfo(info);
spec.setOperation(useEdit ? ArrayUpdateOperation.EDIT : ArrayUpdateOperation.ADD);
specs.add(spec);
}
return specs;
}
Aggregations