Search in sources :

Example 1 with V3Options

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

the class V3BondingOutAdapter method adapt.

@Override
public V3Bonding adapt(Bonding from) {
    V3Bonding to = new V3Bonding();
    if (from.isSetOptions()) {
        to.setOptions(new V3Options());
        to.getOptions().getOptions().addAll(adaptOut(from.getOptions().getOptions()));
    }
    if (from.isSetSlaves()) {
        to.setSlaves(new V3Slaves());
        to.getSlaves().getSlaves().addAll(adaptOut(from.getSlaves().getHostNics()));
    }
    return to;
}
Also used : V3Bonding(org.ovirt.engine.api.v3.types.V3Bonding) V3Options(org.ovirt.engine.api.v3.types.V3Options) V3Slaves(org.ovirt.engine.api.v3.types.V3Slaves)

Example 2 with V3Options

use of org.ovirt.engine.api.v3.types.V3Options 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 V3Options

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

the class V3AgentOutAdapter method adapt.

@Override
public V3Agent adapt(Agent from) {
    V3Agent to = new V3Agent();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetAddress()) {
        to.setAddress(from.getAddress());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetConcurrent()) {
        to.setConcurrent(from.isConcurrent());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetEncryptOptions()) {
        to.setEncryptOptions(from.isEncryptOptions());
    }
    if (from.isSetHost()) {
        to.setHost(adaptOut(from.getHost()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetOptions()) {
        to.setOptions(new V3Options());
        to.getOptions().getOptions().addAll(adaptOut(from.getOptions().getOptions()));
    }
    if (from.isSetOrder()) {
        to.setOrder(from.getOrder());
    }
    if (from.isSetPassword()) {
        to.setPassword(from.getPassword());
    }
    if (from.isSetPort()) {
        to.setPort(from.getPort());
    }
    if (from.isSetType()) {
        to.setType(from.getType());
    }
    if (from.isSetUsername()) {
        to.setUsername(from.getUsername());
    }
    return to;
}
Also used : V3Options(org.ovirt.engine.api.v3.types.V3Options) V3Agent(org.ovirt.engine.api.v3.types.V3Agent)

Example 4 with V3Options

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

the class V3GlusterVolumeOutAdapter method adapt.

@Override
public V3GlusterVolume adapt(GlusterVolume from) {
    V3GlusterVolume to = new V3GlusterVolume();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetBricks()) {
        to.setBricks(new V3GlusterBricks());
        to.getBricks().getGlusterBricks().addAll(adaptOut(from.getBricks().getGlusterBricks()));
    }
    if (from.isSetCluster()) {
        to.setCluster(adaptOut(from.getCluster()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetDisperseCount()) {
        to.setDisperseCount(from.getDisperseCount());
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetOptions()) {
        to.setOptions(new V3Options());
        to.getOptions().getOptions().addAll(adaptOut(from.getOptions().getOptions()));
    }
    if (from.isSetRedundancyCount()) {
        to.setRedundancyCount(from.getRedundancyCount());
    }
    if (from.isSetReplicaCount()) {
        to.setReplicaCount(from.getReplicaCount());
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    if (from.isSetStripeCount()) {
        to.setStripeCount(from.getStripeCount());
    }
    if (from.isSetTransportTypes()) {
        to.setTransportTypes(new V3TransportTypes());
        to.getTransportTypes().getTransportTypes().addAll(adaptTransportTypes(from));
    }
    if (from.isSetVolumeType()) {
        to.setVolumeType(from.getVolumeType().value());
    }
    return to;
}
Also used : V3TransportTypes(org.ovirt.engine.api.v3.types.V3TransportTypes) V3GlusterBricks(org.ovirt.engine.api.v3.types.V3GlusterBricks) V3Options(org.ovirt.engine.api.v3.types.V3Options) V3Status(org.ovirt.engine.api.v3.types.V3Status) V3GlusterVolume(org.ovirt.engine.api.v3.types.V3GlusterVolume)

Aggregations

V3Options (org.ovirt.engine.api.v3.types.V3Options)4 V3Status (org.ovirt.engine.api.v3.types.V3Status)2 V3Agent (org.ovirt.engine.api.v3.types.V3Agent)1 V3Agents (org.ovirt.engine.api.v3.types.V3Agents)1 V3Bonding (org.ovirt.engine.api.v3.types.V3Bonding)1 V3GlusterBricks (org.ovirt.engine.api.v3.types.V3GlusterBricks)1 V3GlusterVolume (org.ovirt.engine.api.v3.types.V3GlusterVolume)1 V3PmProxies (org.ovirt.engine.api.v3.types.V3PmProxies)1 V3PowerManagement (org.ovirt.engine.api.v3.types.V3PowerManagement)1 V3Slaves (org.ovirt.engine.api.v3.types.V3Slaves)1 V3TransportTypes (org.ovirt.engine.api.v3.types.V3TransportTypes)1