Bug 712661 - Move VmStatic/VmTemplate properties to VmBase
Summary: Move VmStatic/VmTemplate properties to VmBase
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: lpeer
QA Contact:
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-12 08:51 UTC by Michael Pasternak
Modified: 2014-01-13 00:35 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-11 06:41:14 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Michael Pasternak 2011-06-12 08:51:00 UTC
Description of problem:

when clients creating VM from template they performing several steps:

1. get VmTemplate
2. create VmStatic class (that will be passed to BE later)
3. copy content of VmTemplate to VmStatic class (on property level)
4. override VmStatic class content with content specified by user
5. pass VmStatic class to BE

RFE: both VmStatic and VmTemplate inherits from VmBase, please move
VmStatic properties to VmBase and re-use them at VmTemplate,
(currently the doubled)

this way steps 1 - 3 won't be required and any new feature that will
be added to VmTemplate will be automatically exposed to clients

Comment 1 Itamar Heim 2011-06-12 10:10:39 UTC
1. that's not a code change i see happening for 3.0 (unless trivial)
2. not sure how aligns with DAO's layout.
3. can also be solved with a helper method/command.

Comment 2 Michael Pasternak 2011-06-12 10:19:26 UTC
1. helper method - not good for serialization
2. command - is much more complicated than simple polymorphism

Comment 3 Itamar Heim 2011-06-12 13:00:55 UTC
how does helper method not good for serialization, but polymorphism is?

Comment 4 Michael Pasternak 2011-06-12 13:25:36 UTC
- 'polymorphism' supported at serialization,  
   (eg. VmTemplate::VmBase will be preserved after class serialized so
   BE can require in parameters class VmBase instead of VmStatic)

- 'methods' are not serialized

Comment 5 Itamar Heim 2012-12-11 06:41:14 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.


Note You need to log in before you can comment on or make changes to this bug.