Search in sources :

Example 1 with HostStorages

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

the class BackendHostStorageResource method list.

public HostStorages list() {
    HostStorages ret = new HostStorages();
    for (LUNs lun : getLogicalUnits()) {
        HostStorage storage = map(lun);
        ArrayList<StorageServerConnections> lunConnections = lun.getLunConnections();
        if (lunConnections != null && !lunConnections.isEmpty()) {
            getMapper(StorageServerConnections.class, LogicalUnit.class).map(lunConnections.get(0), storage.getLogicalUnits().getLogicalUnits().get(0));
        }
        ret.getHostStorages().add(addLinks(storage));
    }
    return ret;
}
Also used : HostStorages(org.ovirt.engine.api.model.HostStorages) StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) LogicalUnit(org.ovirt.engine.api.model.LogicalUnit) HostStorage(org.ovirt.engine.api.model.HostStorage) LUNs(org.ovirt.engine.core.common.businessentities.storage.LUNs)

Aggregations

HostStorage (org.ovirt.engine.api.model.HostStorage)1 HostStorages (org.ovirt.engine.api.model.HostStorages)1 LogicalUnit (org.ovirt.engine.api.model.LogicalUnit)1 StorageServerConnections (org.ovirt.engine.core.common.businessentities.StorageServerConnections)1 LUNs (org.ovirt.engine.core.common.businessentities.storage.LUNs)1