Search in sources :

Example 1 with VirtualNumaNodes

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

the class BackendVmNumaNodesResource method mapCollection.

protected VirtualNumaNodes mapCollection(List<VmNumaNode> entities) {
    VirtualNumaNodes collection = instantiate(collectionType);
    List<VirtualNumaNode> list = collection.getVirtualNumaNodes();
    for (VmNumaNode entity : entities) {
        VirtualNumaNode candidate = populate(map(entity), entity);
        candidate = addLinks(candidate);
        list.add(candidate);
    }
    return collection;
}
Also used : VmNumaNode(org.ovirt.engine.core.common.businessentities.VmNumaNode) VirtualNumaNode(org.ovirt.engine.api.model.VirtualNumaNode) VirtualNumaNodes(org.ovirt.engine.api.model.VirtualNumaNodes)

Example 2 with VirtualNumaNodes

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

the class V3VirtualNumaNodesInAdapter method adapt.

@Override
public VirtualNumaNodes adapt(V3VirtualNumaNodes from) {
    VirtualNumaNodes to = new VirtualNumaNodes();
    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.getVirtualNumaNodes().addAll(adaptIn(from.getVirtualNumaNodes()));
    return to;
}
Also used : VirtualNumaNodes(org.ovirt.engine.api.model.VirtualNumaNodes) V3VirtualNumaNodes(org.ovirt.engine.api.v3.types.V3VirtualNumaNodes)

Aggregations

VirtualNumaNodes (org.ovirt.engine.api.model.VirtualNumaNodes)2 VirtualNumaNode (org.ovirt.engine.api.model.VirtualNumaNode)1 V3VirtualNumaNodes (org.ovirt.engine.api.v3.types.V3VirtualNumaNodes)1 VmNumaNode (org.ovirt.engine.core.common.businessentities.VmNumaNode)1