Search in sources :

Example 1 with AddVmToPoolParameters

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

the class AddVmCommand method addVmToPool.

private void addVmToPool() {
    AddVmToPoolParameters parameters = new AddVmToPoolParameters(getParameters().getPoolId(), getVmId());
    parameters.setShouldBeLogged(false);
    ActionReturnValue result = runInternalActionWithTasksContext(ActionType.AddVmToPool, parameters);
    setSucceeded(result.getSucceeded());
    if (!result.getSucceeded()) {
        log.error("Error adding VM {} to Pool {}", getVmId(), getParameters().getPoolId());
        getReturnValue().setFault(result.getFault());
        return;
    }
    addVmPermission();
}
Also used : AddVmToPoolParameters(org.ovirt.engine.core.common.action.AddVmToPoolParameters) ActionReturnValue(org.ovirt.engine.core.common.action.ActionReturnValue)

Aggregations

ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 AddVmToPoolParameters (org.ovirt.engine.core.common.action.AddVmToPoolParameters)1