Search in sources :

Example 1 with VAppOvfSectionInfo

use of com.vmware.vim25.VAppOvfSectionInfo 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;
}
Also used : VAppOvfSectionSpec(com.vmware.vim25.VAppOvfSectionSpec) VAppOvfSectionInfo(com.vmware.vim25.VAppOvfSectionInfo) ArrayList(java.util.ArrayList)

Aggregations

VAppOvfSectionInfo (com.vmware.vim25.VAppOvfSectionInfo)1 VAppOvfSectionSpec (com.vmware.vim25.VAppOvfSectionSpec)1 ArrayList (java.util.ArrayList)1