Search in sources :

Example 6 with Options

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

the class V3PowerManagementInAdapter method adapt.

@Override
public PowerManagement adapt(V3PowerManagement from) {
    PowerManagement to = new PowerManagement();
    if (from.isSetAddress()) {
        to.setAddress(from.getAddress());
    }
    if (from.isSetAgents()) {
        to.setAgents(new Agents());
        to.getAgents().getAgents().addAll(adaptIn(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 Options());
        to.getOptions().getOptions().addAll(adaptIn(from.getOptions().getOptions()));
    }
    if (from.isSetPassword()) {
        to.setPassword(from.getPassword());
    }
    if (from.isSetPmProxies()) {
        to.setPmProxies(new PmProxies());
        to.getPmProxies().getPmProxies().addAll(adaptIn(from.getPmProxies().getPmProxy()));
    }
    if (from.isSetStatus() && from.getStatus().isSetState()) {
        to.setStatus(PowerManagementStatus.fromValue(from.getStatus().getState()));
    }
    if (from.isSetType()) {
        to.setType(from.getType());
    }
    if (from.isSetUsername()) {
        to.setUsername(from.getUsername());
    }
    return to;
}
Also used : PowerManagement(org.ovirt.engine.api.model.PowerManagement) V3PowerManagement(org.ovirt.engine.api.v3.types.V3PowerManagement) Options(org.ovirt.engine.api.model.Options) Agents(org.ovirt.engine.api.model.Agents) PmProxies(org.ovirt.engine.api.model.PmProxies)

Aggregations

Options (org.ovirt.engine.api.model.Options)6 GlusterVolume (org.ovirt.engine.api.model.GlusterVolume)2 Option (org.ovirt.engine.api.model.Option)2 ArrayList (java.util.ArrayList)1 Agent (org.ovirt.engine.api.model.Agent)1 Agents (org.ovirt.engine.api.model.Agents)1 Bonding (org.ovirt.engine.api.model.Bonding)1 GlusterBricks (org.ovirt.engine.api.model.GlusterBricks)1 HostNics (org.ovirt.engine.api.model.HostNics)1 PmProxies (org.ovirt.engine.api.model.PmProxies)1 PowerManagement (org.ovirt.engine.api.model.PowerManagement)1 TransportType (org.ovirt.engine.api.model.TransportType)1 V3Agent (org.ovirt.engine.api.v3.types.V3Agent)1 V3Bonding (org.ovirt.engine.api.v3.types.V3Bonding)1 V3GlusterVolume (org.ovirt.engine.api.v3.types.V3GlusterVolume)1 V3PowerManagement (org.ovirt.engine.api.v3.types.V3PowerManagement)1 GlusterVolumeOptionEntity (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeOptionEntity)1