Search in sources :

Example 1 with VAppProductInfo

use of com.vmware.vim25.VAppProductInfo in project cloudstack by apache.

the class VmwareResource method copyVAppConfigProductSectionFromOVF.

/**
 * Set the product section spec from existing vApp configuration
 */
protected List<VAppProductSpec> copyVAppConfigProductSectionFromOVF(VmConfigInfo vAppConfig, boolean useEdit) {
    List<VAppProductInfo> productFromOvf = vAppConfig.getProduct();
    List<VAppProductSpec> specs = new ArrayList<>();
    for (VAppProductInfo info : productFromOvf) {
        VAppProductSpec spec = new VAppProductSpec();
        spec.setInfo(info);
        s_logger.info("Procuct info KEY " + info.getKey());
        spec.setOperation(useEdit ? ArrayUpdateOperation.EDIT : ArrayUpdateOperation.ADD);
        specs.add(spec);
    }
    return specs;
}
Also used : ArrayList(java.util.ArrayList) VAppProductSpec(com.vmware.vim25.VAppProductSpec) VAppProductInfo(com.vmware.vim25.VAppProductInfo)

Aggregations

VAppProductInfo (com.vmware.vim25.VAppProductInfo)1 VAppProductSpec (com.vmware.vim25.VAppProductSpec)1 ArrayList (java.util.ArrayList)1