Search in sources :

Example 1 with V3GlusterMemoryPools

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

the class V3GlusterMemoryPoolsInAdapter method adapt.

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

Example 2 with V3GlusterMemoryPools

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

the class V3GlusterBrickAdvancedDetailsOutAdapter method adapt.

@Override
public V3GlusterBrickAdvancedDetails adapt(GlusterBrickAdvancedDetails from) {
    V3GlusterBrickAdvancedDetails to = new V3GlusterBrickAdvancedDetails();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetDevice()) {
        to.setDevice(from.getDevice());
    }
    if (from.isSetFsName()) {
        to.setFsName(from.getFsName());
    }
    if (from.isSetGlusterClients()) {
        to.setGlusterClients(new V3GlusterClients());
        to.getGlusterClients().getGlusterClients().addAll(adaptOut(from.getGlusterClients().getGlusterClients()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetMemoryPools()) {
        to.setMemoryPools(new V3GlusterMemoryPools());
        to.getMemoryPools().getGlusterMemoryPools().addAll(adaptOut(from.getMemoryPools().getGlusterMemoryPools()));
    }
    if (from.isSetMntOptions()) {
        to.setMntOptions(from.getMntOptions());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetPid()) {
        to.setPid(from.getPid());
    }
    if (from.isSetPort()) {
        to.setPort(from.getPort());
    }
    return to;
}
Also used : V3GlusterClients(org.ovirt.engine.api.v3.types.V3GlusterClients) V3GlusterBrickAdvancedDetails(org.ovirt.engine.api.v3.types.V3GlusterBrickAdvancedDetails) V3GlusterMemoryPools(org.ovirt.engine.api.v3.types.V3GlusterMemoryPools)

Example 3 with V3GlusterMemoryPools

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

the class V3GlusterBrickMemoryInfoOutAdapter method adapt.

@Override
public V3GlusterBrickMemoryInfo adapt(GlusterBrickMemoryInfo from) {
    V3GlusterBrickMemoryInfo to = new V3GlusterBrickMemoryInfo();
    if (from.isSetMemoryPools()) {
        to.setMemoryPools(new V3GlusterMemoryPools());
        to.getMemoryPools().getGlusterMemoryPools().addAll(adaptOut(from.getMemoryPools().getGlusterMemoryPools()));
    }
    return to;
}
Also used : V3GlusterBrickMemoryInfo(org.ovirt.engine.api.v3.types.V3GlusterBrickMemoryInfo) V3GlusterMemoryPools(org.ovirt.engine.api.v3.types.V3GlusterMemoryPools)

Example 4 with V3GlusterMemoryPools

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

the class V3GlusterMemoryPoolsOutAdapter method adapt.

@Override
public V3GlusterMemoryPools adapt(GlusterMemoryPools from) {
    V3GlusterMemoryPools to = new V3GlusterMemoryPools();
    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.getGlusterMemoryPools().addAll(adaptOut(from.getGlusterMemoryPools()));
    return to;
}
Also used : V3GlusterMemoryPools(org.ovirt.engine.api.v3.types.V3GlusterMemoryPools)

Example 5 with V3GlusterMemoryPools

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

the class V3GlusterBrickOutAdapter method adapt.

@Override
public V3GlusterBrick adapt(GlusterBrick from) {
    V3GlusterBrick to = new V3GlusterBrick();
    if (from.isSetLinks()) {
        to.getLinks().addAll(adaptOut(from.getLinks()));
    }
    if (from.isSetActions()) {
        to.setActions(adaptOut(from.getActions()));
    }
    if (from.isSetBrickDir()) {
        to.setBrickDir(from.getBrickDir());
    }
    if (from.isSetComment()) {
        to.setComment(from.getComment());
    }
    if (from.isSetDescription()) {
        to.setDescription(from.getDescription());
    }
    if (from.isSetDevice()) {
        to.setDevice(from.getDevice());
    }
    if (from.isSetFsName()) {
        to.setFsName(from.getFsName());
    }
    if (from.isSetGlusterClients()) {
        to.setGlusterClients(new V3GlusterClients());
        to.getGlusterClients().getGlusterClients().addAll(adaptOut(from.getGlusterClients().getGlusterClients()));
    }
    if (from.isSetGlusterVolume()) {
        to.setGlusterVolume(adaptOut(from.getGlusterVolume()));
    }
    if (from.isSetId()) {
        to.setId(from.getId());
    }
    if (from.isSetHref()) {
        to.setHref(from.getHref());
    }
    if (from.isSetMemoryPools()) {
        to.setMemoryPools(new V3GlusterMemoryPools());
        to.getMemoryPools().getGlusterMemoryPools().addAll(adaptOut(from.getMemoryPools().getGlusterMemoryPools()));
    }
    if (from.isSetMntOptions()) {
        to.setMntOptions(from.getMntOptions());
    }
    if (from.isSetName()) {
        to.setName(from.getName());
    }
    if (from.isSetPid()) {
        to.setPid(from.getPid());
    }
    if (from.isSetPort()) {
        to.setPort(from.getPort());
    }
    if (from.isSetServerId()) {
        to.setServerId(from.getServerId());
    }
    if (from.isSetStatus()) {
        V3Status status = new V3Status();
        status.setState(from.getStatus().value());
        to.setStatus(status);
    }
    return to;
}
Also used : V3GlusterBrick(org.ovirt.engine.api.v3.types.V3GlusterBrick) V3GlusterClients(org.ovirt.engine.api.v3.types.V3GlusterClients) V3Status(org.ovirt.engine.api.v3.types.V3Status) V3GlusterMemoryPools(org.ovirt.engine.api.v3.types.V3GlusterMemoryPools)

Aggregations

V3GlusterMemoryPools (org.ovirt.engine.api.v3.types.V3GlusterMemoryPools)5 V3GlusterClients (org.ovirt.engine.api.v3.types.V3GlusterClients)2 GlusterMemoryPools (org.ovirt.engine.api.model.GlusterMemoryPools)1 V3GlusterBrick (org.ovirt.engine.api.v3.types.V3GlusterBrick)1 V3GlusterBrickAdvancedDetails (org.ovirt.engine.api.v3.types.V3GlusterBrickAdvancedDetails)1 V3GlusterBrickMemoryInfo (org.ovirt.engine.api.v3.types.V3GlusterBrickMemoryInfo)1 V3Status (org.ovirt.engine.api.v3.types.V3Status)1