Ravi Nori has posted comments on this change. Change subject: core : Add Entity API for CoCo commands ......................................................................
Patch Set 4: (3 comments) https://gerrit.ovirt.org/#/c/37463/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java: Line 198: } Line 199: Line 200: private Collection<CommandAssociatedEntity> buildCommandAssociatedEntities(Guid cmdId, Map<Guid, VdcObjectType> entityMap) { Line 201: if (entityMap == null) { Line 202: entityMap = Collections.emptyMap(); > why not just return empty list instead continue executing the method when t Done Line 203: } Line 204: List<CommandAssociatedEntity> results = new ArrayList<>(entityMap.size()); Line 205: for (Map.Entry<Guid, VdcObjectType> entry : entityMap.entrySet()) { Line 206: results.add(new CommandAssociatedEntity(cmdId, entry.getValue(), entry.getKey())); https://gerrit.ovirt.org/#/c/37463/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandScheduler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandScheduler.java: Line 10: import java.util.concurrent.Future; Line 11: Line 12: public interface CommandScheduler { Line 13: public abstract Future<VdcReturnValueBase> executeAsyncCommand(VdcActionType actionType, VdcActionParametersBase parameters, CommandContext cmdContext); Line 14: public abstract Future<VdcReturnValueBase> executeAsyncCommand(VdcActionType actionType, VdcActionParametersBase parameters, CommandContext cmdContext, VdcObjectType entityType, Guid... entityIds); > this api limits the action only for saving entities of the same type. Added something similar to createTask. https://gerrit.ovirt.org/#/c/37463/4/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/CommandAssociatedEntity.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/CommandAssociatedEntity.java: Line 3: import org.ovirt.engine.core.common.VdcObjectType; Line 4: import org.ovirt.engine.core.common.utils.ObjectUtils; Line 5: import org.ovirt.engine.core.compat.Guid; Line 6: Line 7: public class CommandAssociatedEntity { > we have PermissionSubject entity and JobSubjectEntity. Done Line 8: Line 9: private Guid commandId; Line 10: private VdcObjectType entityType; Line 11: private Guid entityId; -- To view, visit https://gerrit.ovirt.org/37463 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I96b934ffc44f87407df77c8e097164ca30f3a6e6 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Ravi Nori <rn...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <wallaroo1...@gmail.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches