Search in sources :

Example 6 with EngineContext

use of org.ovirt.engine.core.bll.context.EngineContext in project ovirt-engine by oVirt.

the class CommandHelper method buildCommand.

public static CommandBase<?> buildCommand(ActionType actionType, ActionParametersBase parameters, ExecutionContext executionContext, CommandStatus cmdStatus) {
    ExecutionContext cmdExecutionContext = executionContext == null ? new ExecutionContext() : executionContext;
    CommandBase<?> command = CommandsFactory.createCommand(actionType, parameters, new CommandContext(new EngineContext()).withExecutionContext(cmdExecutionContext));
    command.setCommandStatus(cmdStatus, false);
    return command;
}
Also used : ExecutionContext(org.ovirt.engine.core.bll.job.ExecutionContext) CommandContext(org.ovirt.engine.core.bll.context.CommandContext) EngineContext(org.ovirt.engine.core.bll.context.EngineContext)

Aggregations

EngineContext (org.ovirt.engine.core.bll.context.EngineContext)6 CommandContext (org.ovirt.engine.core.bll.context.CommandContext)5 ExecutionContext (org.ovirt.engine.core.bll.job.ExecutionContext)3 VDS (org.ovirt.engine.core.common.businessentities.VDS)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 CompensationContext (org.ovirt.engine.core.bll.context.CompensationContext)1 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)1 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)1 HostStoragePoolParametersBase (org.ovirt.engine.core.common.action.HostStoragePoolParametersBase)1 LoginOnBehalfParameters (org.ovirt.engine.core.common.action.LoginOnBehalfParameters)1 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)1 VM (org.ovirt.engine.core.common.businessentities.VM)1 VmStatic (org.ovirt.engine.core.common.businessentities.VmStatic)1 BaseDisk (org.ovirt.engine.core.common.businessentities.storage.BaseDisk)1 GetEntitiesWithPermittedActionParameters (org.ovirt.engine.core.common.queries.GetEntitiesWithPermittedActionParameters)1 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)1 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)1 PersistedCommandContext (org.ovirt.engine.core.common.utils.PersistedCommandContext)1