Change in ovirt-engine[master]: core: VM compatibility version

ahadas at redhat.com ahadas at redhat.com
Mon Dec 7 12:08:35 UTC 2015


Arik Hadas has submitted this change and it was merged.

Change subject: core: VM compatibility version
......................................................................


core: VM compatibility version

This patch is part of the series introducing VM compatibility version
feature. This feature allows to customize a VM to its own compatibility
version unrelated to one of the cluster. VM compatibility version is
limited by Data Center and capabilities of the host the VM will be able
to run on.

In this patch:

1. custom_compatibility_version field is added to VM-related DB tables,
views and Java business entities.

2. vdsGroupCompatibilityVersion field was added to VmTemplate to
simplify implementation of the methods described below.

3. VM.getCompatibilityVersion() method is introduced. It returns
the VM compatibility version, if set, otherwise - the cluster one.
The similar method is added to VmTemplate. These methods should be
used in every place where cluster compatibility version is checked
currently, with exception to a functionality that must depend only on
cluster compatibility version (such as networking or storage).

Actual usage of these methods requires a lot of simple changes
throughout the code. These changes were split off into the separate
patch.

4. Some commands (such as add/update/import VM) work with VMs that were
not commited into the database yet or their cluster may be changed. The
method described above cannot be used in this case, so the effective
compatibility version for these VMs is calculated separately and cached
in the command.

Change-Id: I7fd2f68f1546f5953457da38e4df1e3c4b991de4
Signed-off-by: Shmuel Melamud <smelamud at 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/ChangeVmClusterValidator.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommonVmPoolWithVmsCommand.java
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/ImportVmCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmManagementCommandBase.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVmCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/UpdateVmCommandTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmBase.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/EngineMessage.java
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/CompatibilityVersionUtils.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmBaseDao.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDaoImpl.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
M packaging/dbscripts/create_views.sql
A packaging/dbscripts/upgrade/04_00_0100_add_compatibility_version_to_vm.sql
M packaging/dbscripts/vm_templates_sp.sql
M packaging/dbscripts/vms_sp.sql
26 files changed, 387 insertions(+), 141 deletions(-)

Approvals:
  Shmuel Leib Melamud: Verified
  Arik Hadas: Looks good to me, approved; Passed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fd2f68f1546f5953457da38e4df1e3c4b991de4
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list