Change in ovirt-engine[master]: core: fix the hierarchy of memory images removers
ofrenkel at redhat.com
ofrenkel at redhat.com
Thu Jul 25 15:32:08 UTC 2013
Omer Frenkel has submitted this change and it was merged.
Change subject: core: fix the hierarchy of memory images removers
......................................................................
core: fix the hierarchy of memory images removers
The "RAM Snapshots" feature introduced the MemoryImageRemover and
MemoryImageRemoverFromExportDomain classes. The second inherits the
first, taking advantage of common code and making small adjustments that
are required when it comes to operating on the export domain.
We end up with a wrong relationship between the two classes as there is
no relation of "kind of" between them, thus the inheritence is wrong.
This patch fix the hierarchy between them:
1. MemoryImageRemover become an abstract class, containing the common
code for subclasses that remove memory states
2. introduce MemoryImageRemoverOnDataDomain class which extends
MemoryImageRemover and implements the code that is relevant for removing
memory states from data domains
3. The MemoryImageRemoverFromExportDomain now extends MemoryImageRemover
and implements the code which is relevant for removing memory states
from export domains
ImportVmCommand is changed to use MemoryImageRemoverOnDataDomain instead
of using MemoryImageRemover.
Change-Id: Id7cada7b6f9a3356afcac0dd2856d6a02cf1f9fd
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemover.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemoverFromExportDomain.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/memory/MemoryImageRemoverOnDataDomain.java
4 files changed, 82 insertions(+), 44 deletions(-)
Approvals:
Omer Frenkel: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/16826
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id7cada7b6f9a3356afcac0dd2856d6a02cf1f9fd
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list