Eli Mesika has uploaded a new change for review. Change subject: core: [ExternalTasks] Cannot end existing job ......................................................................
core: [ExternalTasks] Cannot end existing job Enable to set the JobId or Step Id as parameters to commands that are not monitored but handle the External Job/Tasks : EndExternalJobCommand ClearExternalJobCommand EndExternalStepCommand Change-Id: I78f72cd619e32e5763f46391932ec70730a2b4b7 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988094 Signed-off-by: Eli Mesika <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/95/17495/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java index d9c08d6..c209441 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java @@ -376,7 +376,7 @@ CommandContext context) { VdcReturnValueBase result; // If non-monitored command is invoked with JobId or ActionId as parameters, reject this command on can do action. - if (!actionType.isActionMonitored() && (parameters.getJobId() != null || parameters.getStepId() != null)) { + if (!actionType.isActionMonitored() && !isActionExternal(actionType) && (parameters.getJobId() != null || parameters.getStepId() != null)) { result = new VdcReturnValueBase(); result.getCanDoActionMessages().add(VdcBllMessages.ACTION_TYPE_NON_MONITORED.toString()); result.setCanDoAction(false); @@ -389,6 +389,9 @@ return result; } + private boolean isActionExternal(VdcActionType actionType){ + return (actionType == VdcActionType.EndExternalJob || actionType == VdcActionType.EndExternalStep || actionType == VdcActionType.ClearExternalJob); + } protected VdcReturnValueBase runAction(CommandBase<?> command, boolean runAsInternal, CommandContext context) { -- To view, visit http://gerrit.ovirt.org/17495 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78f72cd619e32e5763f46391932ec70730a2b4b7 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
