Change in ovirt-engine[ovirt-engine-3.6.1]: core: MoveOrCopyDiskCommand - do not pass same parameters in...

tnisan at redhat.com tnisan at redhat.com
Tue Nov 24 17:36:22 UTC 2015


Tal Nisan has submitted this change and it was merged.

Change subject: core: MoveOrCopyDiskCommand - do not pass same parameters instance
......................................................................


core: MoveOrCopyDiskCommand - do not pass same parameters instance

The parameters instance of each command contains information that is
unique to the command (for example - the command id). In
MoveOrCopyDiskCommand the parameters of the command are passed to to
child command which is problematic - the infra doesn't support that and
it causes the endAction() of the wrong command to be executed, for
entities to stay locked and so on.

This patch solves that by adding a copy constructor to the parameters
class hirerchy excluding the base parameters class that contains command
specific information. That is the taken approach to minimize the risk of
influecing one of the command usages as we'll backport this change.

Later on we can remove the copy constructor and just create the child
parameters manually without relying on the fact that they are of the
same type of the parent command.

Change-Id: I9b127231c8fb8a416d1861c2a6395fd2c0966c6b
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1282693
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ImagesActionsParametersBase.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/ImagesContainterParametersBase.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/MoveOrCopyImageGroupParameters.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/StorageDomainParametersBase.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/StoragePoolParametersBase.java
6 files changed, 80 insertions(+), 29 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Liron Aravot: Verified



-- 
To view, visit https://gerrit.ovirt.org/49089
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b127231c8fb8a416d1861c2a6395fd2c0966c6b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6.1
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list