Tomas Jelinek has uploaded a new change for review. Change subject: engine,webadmin: Host pinning is ignored on Template creation (#845570) ......................................................................
engine,webadmin: Host pinning is ignored on Template creation (#845570) https://bugzilla.redhat.com/845570 VM main tab -> select VM which has host pinning set up -> make template The template will not have the host pinning settings set. The problem was, that this has been ignored on frontend, backend and DB function level. Added it everywhere. In user portal the host pinning will not be copyed, because the frontend will ignore it (UserPortalListModel). This is correct - the host pinning has to be completely ignored in UP. Change-Id: Ie341ff1aa9c8e4bc9cbc4ab05b55664a7e0fd416 Signed-off-by: Tomas Jelinek <[email protected]> --- M backend/manager/dbscripts/vm_templates_sp.sql M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java 3 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/22/7822/1 diff --git a/backend/manager/dbscripts/vm_templates_sp.sql b/backend/manager/dbscripts/vm_templates_sp.sql index b6455d9..ae6fcba 100644 --- a/backend/manager/dbscripts/vm_templates_sp.sql +++ b/backend/manager/dbscripts/vm_templates_sp.sql @@ -39,7 +39,10 @@ v_initrd_url VARCHAR(4000) , v_kernel_url VARCHAR(4000) , v_kernel_params VARCHAR(4000) , - v_quota_id UUID) + v_quota_id UUID, + v_migration_support integer, + v_dedicated_vm_for_vds UUID) + RETURNS VOID AS $procedure$ BEGIN @@ -79,7 +82,9 @@ kernel_url, kernel_params, entity_type, - quota_id) + quota_id, + migration_support, + dedicated_vm_for_vds) VALUES( -- This field is meaningless for templates for the time being, however we want to keep it not null for VMs. -- Thus, since templates are top level elements they "point" to the 'Blank' template. @@ -117,7 +122,9 @@ v_kernel_url, v_kernel_params, 'TEMPLATE', - v_quota_id); + v_quota_id, + v_migration_support, + v_dedicated_vm_for_vds); END; $procedure$ LANGUAGE plpgsql; diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java index a0b39cb..55d7251 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java @@ -294,6 +294,8 @@ getVmTemplate().setkernel_params(getParameters().getMasterVm().getkernel_params()); getVmTemplate().setis_stateless(getParameters().getMasterVm().getis_stateless()); getVmTemplate().setQuotaId(getQuotaId()); + getVmTemplate().setdedicated_vm_for_vds(getParameters().getMasterVm().getdedicated_vm_for_vds()); + getVmTemplate().setMigrationSupport(getParameters().getMasterVm().getMigrationSupport()); DbFacade.getInstance().getVmTemplateDAO().save(getVmTemplate()); getCompensationContext().snapshotNewEntity(getVmTemplate()); setActionReturnValue(getVmTemplate().getId()); diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java index 71f9bc2..cc67753 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmListModel.java @@ -1639,6 +1639,9 @@ tempVar.setinitrd_url(vm.getinitrd_url()); tempVar.setkernel_url(vm.getkernel_url()); tempVar.setkernel_params(vm.getkernel_params()); + tempVar.setdedicated_vm_for_vds(vm.getdedicated_vm_for_vds()); + tempVar.setMigrationSupport(vm.getMigrationSupport()); + VM newvm = tempVar; EntityModel displayProtocolSelectedItem = (EntityModel) model.getDisplayProtocol().getSelectedItem(); -- To view, visit http://gerrit.ovirt.org/7822 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie341ff1aa9c8e4bc9cbc4ab05b55664a7e0fd416 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Tomas Jelinek <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
