Gilad Chaplik has submitted this change and it was merged.
Change subject: engine: Edit Pool shows different RAM than defined (#833829)
......................................................................
engine: Edit Pool shows different RAM than defined (#833829)
https://bugzilla.redhat.com/833829
Have a template X with 256 MB memory, than:
Pools->New->select template X->change RAM to 512 MB->save
Than select the newly created pool and Edit.
The memory will be 256 MB.
The problem was, that both the
(New/Existing)PoolModelBehavior classes let the filling of the
window model to the parent class (PoolModelBehaviorBase) which
used the template. It is correct for the
NewPoolModelBehavior but not for the ExistingPoolModelBehavior.
Fixed by generalizing the logic of setting up the window model
to take VmBase instead of VmTemplate and calling this from the
specific classes (New/Existing)PoolModelBehavior with the
correct parameter.
To enable this generalization, getnum_of_cpus() method has been
moved from VmTemplate to VmBase.
As the setter was not needed anymore because the CXF is not
used anymore, the setter has been removed from the VmTemplate.
This removal enabled also to remove the "num_of_cpus" from
ObjectIdentityChecker in the VmTemplateHandler.
Change-Id: Idaa1a92f7fe85f9c604da8916be5672d8d5b1e8b
Signed-off-by: Tomas Jelinek <tjelinek(a)redhat.com>
---
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/VmTemplateHandler.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/VmStatic.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmTemplate.java
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ExistingPoolModelBehavior.java
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/NewPoolModelBehavior.java
M
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/PoolModelBehaviorBase.java
8 files changed, 77 insertions(+), 48 deletions(-)
Approvals:
Gilad Chaplik: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/6638
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idaa1a92f7fe85f9c604da8916be5672d8d5b1e8b
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Sharad Mishra <snmishra(a)linux.vnet.ibm.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>