Moti Asayag has posted comments on this change. Change subject: core : Add Entity API for CoCo commands ......................................................................
Patch Set 6: (3 comments) there is a single open issue before we can push this patch forward. 10x for incorporating the comments. https://gerrit.ovirt.org/#/c/37463/6/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 13: public interface CommandScheduler { Line 14: Future<VdcReturnValueBase> executeAsyncCommand(VdcActionType actionType, Line 15: VdcActionParametersBase parameters, Line 16: CommandContext cmdContext); Line 17: Future<VdcReturnValueBase> executeAsyncCommand(VdcActionType actionType, > I was keeping it similar to what we have with AsyncTaskManager createTask i I'm not sure why. the SubjectEntity might be extended in the future - that will require modifying all of the apis, and the map in the api below won't serve the purpose. do we need the map in the second api as a parameter type? is there a use for searching by the id (the key) ? else a list is sufficient. IMO we can start with a single api as i suggested above and in case we'll see there is a common use of the same entity type with multiple ids, we can add another api that will convert it to the suggested api in its implementation. Line 18: VdcActionParametersBase parameters, Line 19: CommandContext cmdContext, Line 20: VdcObjectType entityType, Line 21: Guid... entityIds); https://gerrit.ovirt.org/#/c/37463/6/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 extends SubjectEntity { > I also like the CommandAssociatedEntity one. ok. Line 8: Line 9: private Guid commandId; Line 10: Line 11: public CommandAssociatedEntity() { https://gerrit.ovirt.org/#/c/37463/6/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/SubjectEntity.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/SubjectEntity.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 SubjectEntity { > I have already removed JobSubjectEntity inner class oh, great! :-) Line 8: private Guid entityId; Line 9: private VdcObjectType entityType; Line 10: Line 11: public void setEntityId(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: 6 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