Search in sources :

Example 1 with V3Agents

use of org.ovirt.engine.api.v3.types.V3Agents in project ovirt-engine by oVirt.

the class V3AgentsInAdapter method adapt.

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

Example 2 with V3Agents

use of org.ovirt.engine.api.v3.types.V3Agents in project ovirt-engine by oVirt.

the class V3PowerManagementOutAdapter method adapt.

@Override
public V3PowerManagement adapt(PowerManagement from) {
    V3PowerManagement to = new V3PowerManagement();
    if (from.isSetAddress()) {
        to.setAddress(from.getAddress());
    }
    if (from.isSetAgents()) {
        to.setAgents(new V3Agents());
        to.getAgents().getAgents().addAll(adaptOut(from.getAgents().getAgents()));
    }
    if (from.isSetAutomaticPmEnabled()) {
        to.setAutomaticPmEnabled(from.isAutomaticPmEnabled());
    }
    if (from.isSetEnabled()) {
        to.setEnabled(from.isEnabled());
    }
    if (from.isSetKdumpDetection()) {
        to.setKdumpDetection(from.isKdumpDetection());
    }
    if (from.isSetOptions()) {
        to.setOptions(new V3Options());
        to.getOptions().getOptions().addAll(adaptOut(from.getOptions().getOptions()));
    }
    if (from.isSetPassword()) {
        to.setPassword(from.getPassword());
    }
    if (from.isSetPmProxies()) {
        to.setPmProxies(new V3PmProxies());
        to.getPmProxies().getPmProxy().addAll(adaptOut(from.getPmProxies().getPmProxies()));
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    if (from.isSetType()) {
        to.setType(from.getType());
    }
    if (from.isSetUsername()) {
        to.setUsername(from.getUsername());
    }
    return to;
}
Also used : V3PowerManagement(org.ovirt.engine.api.v3.types.V3PowerManagement) V3Agents(org.ovirt.engine.api.v3.types.V3Agents) V3PmProxies(org.ovirt.engine.api.v3.types.V3PmProxies) V3Options(org.ovirt.engine.api.v3.types.V3Options) V3Status(org.ovirt.engine.api.v3.types.V3Status)

Example 3 with V3Agents

use of org.ovirt.engine.api.v3.types.V3Agents in project ovirt-engine by oVirt.

the class V3AgentsOutAdapter method adapt.

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

Aggregations

V3Agents (org.ovirt.engine.api.v3.types.V3Agents)3 Agents (org.ovirt.engine.api.model.Agents)1 V3Options (org.ovirt.engine.api.v3.types.V3Options)1 V3PmProxies (org.ovirt.engine.api.v3.types.V3PmProxies)1 V3PowerManagement (org.ovirt.engine.api.v3.types.V3PowerManagement)1 V3Status (org.ovirt.engine.api.v3.types.V3Status)1