Search in sources :

Example 1 with IscsiDetailss

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

the class BackendHostResource method mapTargets.

private Action mapTargets(Action action, List<StorageServerConnections> targets) {
    if (targets != null) {
        Action.IscsiTargetsList iscsiTargets = new Action.IscsiTargetsList();
        IscsiDetailss iscsiDetailss = new IscsiDetailss();
        for (StorageServerConnections cnx : targets) {
            LogicalUnit logicalUnit = map(cnx);
            // The iscsiTargets property is replaced by discoveredTargets. The property is preserved
            // for backward compatibility, and should be removed in version 5 of the API.
            iscsiTargets.getIscsiTargets().add(logicalUnit.getTarget());
            iscsiDetailss.getIscsiDetailss().add(mapLogicalUnitToIscsiDetails(logicalUnit));
        }
        action.setIscsiTargets(iscsiTargets);
        action.setDiscoveredTargets(iscsiDetailss);
    }
    return action;
}
Also used : Action(org.ovirt.engine.api.model.Action) StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) LogicalUnit(org.ovirt.engine.api.model.LogicalUnit) IscsiDetailss(org.ovirt.engine.api.model.IscsiDetailss)

Aggregations

Action (org.ovirt.engine.api.model.Action)1 IscsiDetailss (org.ovirt.engine.api.model.IscsiDetailss)1 LogicalUnit (org.ovirt.engine.api.model.LogicalUnit)1 StorageServerConnections (org.ovirt.engine.core.common.businessentities.StorageServerConnections)1