Search in sources :

Example 1 with V3HardwareInformation

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

the class V3HardwareInformationInAdapter method adapt.

@Override
public HardwareInformation adapt(V3HardwareInformation from) {
    HardwareInformation to = new HardwareInformation();
    if (from.isSetFamily()) {
        to.setFamily(from.getFamily());
    }
    if (from.isSetManufacturer()) {
        to.setManufacturer(from.getManufacturer());
    }
    if (from.isSetProductName()) {
        to.setProductName(from.getProductName());
    }
    if (from.isSetSerialNumber()) {
        to.setSerialNumber(from.getSerialNumber());
    }
    if (from.isSetSupportedRngSources()) {
        to.setSupportedRngSources(new HardwareInformation.SupportedRngSourcesList());
        to.getSupportedRngSources().getSupportedRngSources().addAll(adaptRngSources(from));
    }
    if (from.isSetUuid()) {
        to.setUuid(from.getUuid());
    }
    if (from.isSetVersion()) {
        to.setVersion(from.getVersion());
    }
    return to;
}
Also used : V3HardwareInformation(org.ovirt.engine.api.v3.types.V3HardwareInformation) HardwareInformation(org.ovirt.engine.api.model.HardwareInformation)

Example 2 with V3HardwareInformation

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

the class V3HardwareInformationOutAdapter method adapt.

@Override
public V3HardwareInformation adapt(HardwareInformation from) {
    V3HardwareInformation to = new V3HardwareInformation();
    if (from.isSetFamily()) {
        to.setFamily(from.getFamily());
    }
    if (from.isSetManufacturer()) {
        to.setManufacturer(from.getManufacturer());
    }
    if (from.isSetProductName()) {
        to.setProductName(from.getProductName());
    }
    if (from.isSetSerialNumber()) {
        to.setSerialNumber(from.getSerialNumber());
    }
    if (from.isSetSupportedRngSources()) {
        to.setSupportedRngSources(new V3RngSources());
        to.getSupportedRngSources().getRngSources().addAll(adaptRngSources(from));
    }
    if (from.isSetUuid()) {
        to.setUuid(from.getUuid());
    }
    if (from.isSetVersion()) {
        to.setVersion(from.getVersion());
    }
    return to;
}
Also used : V3RngSources(org.ovirt.engine.api.v3.types.V3RngSources) V3HardwareInformation(org.ovirt.engine.api.v3.types.V3HardwareInformation)

Aggregations

V3HardwareInformation (org.ovirt.engine.api.v3.types.V3HardwareInformation)2 HardwareInformation (org.ovirt.engine.api.model.HardwareInformation)1 V3RngSources (org.ovirt.engine.api.v3.types.V3RngSources)1