Search in sources :

Example 1 with InstanceTypes

use of org.ovirt.engine.api.model.InstanceTypes in project ovirt-engine by oVirt.

the class BackendInstanceTypesResource method mapCollection.

protected InstanceTypes mapCollection(List<org.ovirt.engine.core.common.businessentities.InstanceType> entities) {
    InstanceTypes collection = new InstanceTypes();
    for (org.ovirt.engine.core.common.businessentities.InstanceType entity : entities) {
        InstanceType instanceType = map(entity);
        DisplayHelper.adjustDisplayData(this, instanceType);
        collection.getInstanceTypes().add(addLinks(populate(instanceType, entity)));
    }
    return collection;
}
Also used : InstanceTypes(org.ovirt.engine.api.model.InstanceTypes) InstanceType(org.ovirt.engine.api.model.InstanceType)

Example 2 with InstanceTypes

use of org.ovirt.engine.api.model.InstanceTypes in project ovirt-engine by oVirt.

the class V3InstanceTypesInAdapter method adapt.

@Override
public InstanceTypes adapt(V3InstanceTypes from) {
    InstanceTypes to = new InstanceTypes();
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetActive()) {
        to.setActive(from.getActive());
    }
    if (from.isSetSize()) {
        to.setSize(from.getSize());
    }
    if (from.isSetTotal()) {
        to.setTotal(from.getTotal());
    }
    to.getInstanceTypes().addAll(adaptIn(from.getInstanceTypes()));
    return to;
}
Also used : V3InstanceTypes(org.ovirt.engine.api.v3.types.V3InstanceTypes) InstanceTypes(org.ovirt.engine.api.model.InstanceTypes)

Aggregations

InstanceTypes (org.ovirt.engine.api.model.InstanceTypes)2 InstanceType (org.ovirt.engine.api.model.InstanceType)1 V3InstanceTypes (org.ovirt.engine.api.v3.types.V3InstanceTypes)1