Liron Aravot has submitted this change and it was merged.
Change subject: core: adding support for command to return its subject entities
......................................................................
core: adding support for command to return its subject entities
Currently the command subject entities are "declared" by its executing
command by using the CommandCoordinatorUtil.executeAsync() api.
This implementation has some drawbacks:
1. only child commands and commands that are executed asyncronously
supports having subject entities.
2. the parent command is aware of the child subject entities, the child
command implementation might change and then all the parent commands
will have to be changed as well.
This patch changes this approach - each command will be able to override
the getSubjectEntities() method to declare it's subject entities.
The subject entities are persisted as part of the executeAction()
method.
Change-Id: I76c30afc381153531cd664a9ecd91e2e568ba51c
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmTemplateCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/RemoveDiskSnapshotsCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/RemoveSnapshotCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/RestoreAllSnapshotsCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/TryBackToAllSnapshotsOfVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/connection/CINDERStorageHelper.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/RemoveDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/UpdateVmDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/AddCinderDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/CloneCinderDisksCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/CloneSingleCinderDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/CreateCinderSnapshotCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/ExtendCinderDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RemoveAllVmCinderDisksCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RemoveCinderDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RemoveCinderDiskVolumeCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RemoveCinderSnapshotDiskCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RemoveCinderVolumeParentCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RestoreAllCinderSnapshotsCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/RestoreFromCinderSnapshotCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/cinder/TryBackToCinderSnapshotCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorImpl.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandCoordinatorUtil.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandExecutor.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/CommandsCacheImpl.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/tasks/interfaces/CommandScheduler.java
31 files changed, 136 insertions(+), 106 deletions(-)
Approvals:
Liron Aravot: Verified; Looks good to me, approved; Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/52805
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I76c30afc381153531cd664a9ecd91e2e568ba51c
Gerrit-PatchSet: 9
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>