Search in sources :

Example 1 with AddIscsiBondParameters

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

the class BackendIscsiBondsResource method add.

@Override
public Response add(IscsiBond iscsiBond) {
    validateParameters(iscsiBond, "name");
    org.ovirt.engine.core.common.businessentities.IscsiBond entity = getMapper(IscsiBond.class, org.ovirt.engine.core.common.businessentities.IscsiBond.class).map(iscsiBond, null);
    entity.setStoragePoolId(dataCenterId);
    return performCreate(ActionType.AddIscsiBond, new AddIscsiBondParameters(entity), new QueryIdResolver<Guid>(QueryType.GetIscsiBondById, IdQueryParameters.class));
}
Also used : IdQueryParameters(org.ovirt.engine.core.common.queries.IdQueryParameters) AddIscsiBondParameters(org.ovirt.engine.core.common.action.AddIscsiBondParameters) IscsiBond(org.ovirt.engine.api.model.IscsiBond) Guid(org.ovirt.engine.core.compat.Guid)

Example 2 with AddIscsiBondParameters

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

the class IscsiBondModel method addBond.

private void addBond() {
    AddIscsiBondParameters params = new AddIscsiBondParameters(createIscsiBond());
    startProgress();
    Frontend.getInstance().runAction(ActionType.AddIscsiBond, params, result -> {
        IscsiBondModel model = (IscsiBondModel) result.getState();
        model.stopProgress();
        model.cancel();
    }, this);
}
Also used : AddIscsiBondParameters(org.ovirt.engine.core.common.action.AddIscsiBondParameters)

Aggregations

AddIscsiBondParameters (org.ovirt.engine.core.common.action.AddIscsiBondParameters)2 IscsiBond (org.ovirt.engine.api.model.IscsiBond)1 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)1 Guid (org.ovirt.engine.core.compat.Guid)1