Change in ovirt-engine[master]: core, frontend: show template name also for cloned VMs

tjelinek at redhat.com tjelinek at redhat.com
Wed Dec 18 09:57:15 UTC 2013


Tomas Jelinek has submitted this change and it was merged.

Change subject: core,frontend: show template name also for cloned VMs
......................................................................


core,frontend: show template name also for cloned VMs

If the template provisioning of the VM is clone, the general subtab
of the VM/Pool shows that the "Template"'s value is Blank.
This patch changes this to the following behavior:
- for cloned provisioning the "Template" field shows:
  "templateName (Clone/Independent)"
- for thin provisioning the "Template" field shows:
  "templateName (Thin/Dependent)"
- for VMs created from Blank template the "Template" field shows:
  "templateName"
- for VMs created before this feature added the "Template" field shows:
  "templateName"
Same logic apply for the Storage main tab -> VM Import subtab ->
Template column
The implementation:
Two new fields added to the vm_static table:
- original_template_id: never changes
- original_template_name: changes when the template on which this VM
  is based on changes the name. This is checked during VM/template import
  and during template update
The original_template_name field is there and maintained "by hand" (instead of
having a reference to the template in original_template_id) is because this
field has to be shown even after the original template has been deleted.

Change-Id: Ieea4ad7c1ed845d3ff57aaafc19f0830ab72b2d1
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1042784
Signed-off-by: Tomas Jelinek <tjelinek 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/ImportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.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/VmStatic.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmStaticDAODbFacadeImpl.java
M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmDAOTest.java
M backend/manager/modules/dal/src/test/resources/fixtures.xml
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmWriter.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Cloner.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/pools/PoolGeneralModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmGeneralModel.java
A frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmTemplateNameRenderer.java
M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIMessages.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/storage/SubTabStorageVmBackupView.java
M packaging/dbscripts/create_views.sql
A packaging/dbscripts/upgrade/03_04_0280_add_original_template_to_vm_static.sql
M packaging/dbscripts/vms_sp.sql
22 files changed, 263 insertions(+), 15 deletions(-)

Approvals:
  Tomas Jelinek: Verified; Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/21047
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieea4ad7c1ed845d3ff57aaafc19f0830ab72b2d1
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list