Search in sources :

Example 1 with VirtualNumaNode

use of org.ovirt.engine.api.model.VirtualNumaNode 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 VirtualNumaNode

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

the class V3VirtualNumaNodeInAdapter method adapt.

@Override
public VirtualNumaNode adapt(V3VirtualNumaNode from) {
    VirtualNumaNode to = new VirtualNumaNode();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptIn(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptIn(from.getActions()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetCpu()) {
        to.setCpu(adaptIn(from.getCpu()));
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetHost()) {
        to.setHost(adaptIn(from.getHost()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetIndex()) {
        to.setIndex(from.getIndex());
    }
    if (from.isSetMemory()) {
        to.setMemory(from.getMemory());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetNodeDistance()) {
        to.setNodeDistance(from.getNodeDistance());
    }
    if (from.isSetNumaNodePins()) {
        to.setNumaNodePins(new NumaNodePins());
        to.getNumaNodePins().getNumaNodePins().addAll(adaptIn(from.getNumaNodePins().getNumaNodePin()));
    }
    if (from.isSetStatistics()) {
        to.setStatistics(new Statistics());
        to.getStatistics().getStatistics().addAll(adaptIn(from.getStatistics().getStatistics()));
    }
    if (from.isSetVm()) {
        to.setVm(adaptIn(from.getVm()));
    }
    return to;
}
Also used : V3VirtualNumaNode(org.ovirt.engine.api.v3.types.V3VirtualNumaNode) VirtualNumaNode(org.ovirt.engine.api.model.VirtualNumaNode) NumaNodePins(org.ovirt.engine.api.model.NumaNodePins) Statistics(org.ovirt.engine.api.model.Statistics)

Aggregations

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