Search in sources :

Example 1 with EditIscsiBondParameters

use of org.ovirt.engine.core.common.action.EditIscsiBondParameters in project ovirt-engine by oVirt.

the class BackendIscsiBondNetworkResource method remove.

@Override
public Response remove() {
    get();
    IscsiBond iscsiBond = parent.getIscsiBond();
    iscsiBond.getNetworkIds().remove(guid);
    return performAction(ActionType.EditIscsiBond, new EditIscsiBondParameters(iscsiBond));
}
Also used : EditIscsiBondParameters(org.ovirt.engine.core.common.action.EditIscsiBondParameters) IscsiBond(org.ovirt.engine.core.common.businessentities.IscsiBond)

Example 2 with EditIscsiBondParameters

use of org.ovirt.engine.core.common.action.EditIscsiBondParameters in project ovirt-engine by oVirt.

the class BackendIscsiBondNetworksResource method add.

@Override
public Response add(Network network) {
    org.ovirt.engine.core.common.businessentities.network.Network entity = NetworkMapper.map(network, null);
    IscsiBond iscsiBond = getIscsiBond();
    iscsiBond.getNetworkIds().add(entity.getId());
    return performAction(ActionType.EditIscsiBond, new EditIscsiBondParameters(iscsiBond));
}
Also used : EditIscsiBondParameters(org.ovirt.engine.core.common.action.EditIscsiBondParameters) IscsiBond(org.ovirt.engine.core.common.businessentities.IscsiBond)

Example 3 with EditIscsiBondParameters

use of org.ovirt.engine.core.common.action.EditIscsiBondParameters in project ovirt-engine by oVirt.

the class BackendIscsiBondStorageConnectionResource method remove.

@Override
public Response remove() {
    get();
    IscsiBond iscsiBond = parent.getIscsiBond();
    iscsiBond.getStorageConnectionIds().remove(id);
    return performAction(ActionType.EditIscsiBond, new EditIscsiBondParameters(iscsiBond));
}
Also used : EditIscsiBondParameters(org.ovirt.engine.core.common.action.EditIscsiBondParameters) IscsiBond(org.ovirt.engine.core.common.businessentities.IscsiBond)

Example 4 with EditIscsiBondParameters

use of org.ovirt.engine.core.common.action.EditIscsiBondParameters in project ovirt-engine by oVirt.

the class BackendIscsiBondStorageConnectionsResource method add.

@Override
public Response add(StorageConnection conn) {
    StorageServerConnections entity = StorageDomainMapper.map(conn, null);
    IscsiBond iscsiBond = getIscsiBond();
    iscsiBond.getStorageConnectionIds().add(entity.getId());
    return performAction(ActionType.EditIscsiBond, new EditIscsiBondParameters(iscsiBond));
}
Also used : EditIscsiBondParameters(org.ovirt.engine.core.common.action.EditIscsiBondParameters) StorageServerConnections(org.ovirt.engine.core.common.businessentities.StorageServerConnections) IscsiBond(org.ovirt.engine.core.common.businessentities.IscsiBond)

Example 5 with EditIscsiBondParameters

use of org.ovirt.engine.core.common.action.EditIscsiBondParameters in project ovirt-engine by oVirt.

the class IscsiBondModel method updateBond.

private void updateBond() {
    IscsiBond newIscsiBond = createIscsiBond();
    newIscsiBond.setId(getIscsiBond().getId());
    EditIscsiBondParameters params = new EditIscsiBondParameters(newIscsiBond);
    startProgress();
    Frontend.getInstance().runAction(ActionType.EditIscsiBond, params, result -> {
        IscsiBondModel model = (IscsiBondModel) result.getState();
        model.stopProgress();
        model.cancel();
    }, this);
}
Also used : EditIscsiBondParameters(org.ovirt.engine.core.common.action.EditIscsiBondParameters) IscsiBond(org.ovirt.engine.core.common.businessentities.IscsiBond)

Aggregations

EditIscsiBondParameters (org.ovirt.engine.core.common.action.EditIscsiBondParameters)5 IscsiBond (org.ovirt.engine.core.common.businessentities.IscsiBond)5 StorageServerConnections (org.ovirt.engine.core.common.businessentities.StorageServerConnections)1