Search in sources :

Example 1 with V3Bonding

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

the class V3BondingInAdapter method adapt.

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

Example 2 with V3Bonding

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

Aggregations

V3Bonding (org.ovirt.engine.api.v3.types.V3Bonding)2 Bonding (org.ovirt.engine.api.model.Bonding)1 HostNics (org.ovirt.engine.api.model.HostNics)1 Options (org.ovirt.engine.api.model.Options)1 V3Options (org.ovirt.engine.api.v3.types.V3Options)1 V3Slaves (org.ovirt.engine.api.v3.types.V3Slaves)1