Alissa Bonas has posted comments on this change. Change subject: core: add template version fields to vm and template ......................................................................
Patch Set 4: (4 comments) .................................................... Commit Message Line 5: CommitDate: 2014-01-12 18:45:04 +0200 Line 6: Line 7: core: add template version fields to vm and template Line 8: Line 9: the templateVersion and templateVersionName fieldd are used fieldd --> fields maybe call templateVersion --> templateVersionNumber? Line 10: for supporting templates versions, Line 11: as documented in the Template Versions feature page Line 12: Line 13: http://www.ovirt.org/index.php?title=Features/Template_Versions .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VM.java Line 416: public String getKernelParams() { Line 417: return vmStatic.getKernelParams(); Line 418: } Line 419: Line 420: public Integer getTemplateVersion() { why not use primitive int? Line 421: return vmStatic.getTemplateVersion(); Line 422: } Line 423: Line 424: public void setTemplateVersion(Integer templateVersion) { .................................................... File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmTemplateDAOTest.java Line 22: import org.ovirt.engine.core.compat.Guid; Line 23: Line 24: public class VmTemplateDAOTest extends BaseDAOTestCase { Line 25: private static final int NUMBER_OF_TEMPLATES_FOR_PRIVELEGED_USER = 1; Line 26: private static final int NUMBER_OF_TEMPLATES_IN_DB = 8; I see this is the only change in the test. Is the DB change (addition and population of new fields) tested somewhere in the DAO tests? Line 27: private static final Guid EXISTING_TEMPLATE_ID = new Guid("1b85420c-b84c-4f29-997e-0eb674b40b79"); Line 28: private static final Guid DELETABLE_TEMPLATE_ID = new Guid("1b85420c-b84c-4f29-997e-0eb674b40b80"); Line 29: private static final Guid STORAGE_DOMAIN_ID = new Guid("72e3a666-89e1-4005-a7ca-f7548004a9ab"); Line 30: private static final Guid VDS_GROUP_ID = new Guid("b399944a-81ab-4ec5-8266-e19ba7c3c9d1"); .................................................... File packaging/dbscripts/upgrade/03_04_0400_add_template_version_to_vm_static.sql Line 1: select fn_db_add_column('vm_static', 'template_version', 'INTEGER DEFAULT NULL'); isn't it better to put integer default 1? null for number is not so good IMHO... and maybe better to name the field template_version_number? Line 2: select fn_db_add_column('vm_static', 'template_version_name', 'varchar(40) DEFAULT NULL'); Line 3: -- make all existing vms and templates have version 1 Line 4: update vm_static set template_version=1; Line 5: -- update base template for all templates -- To view, visit http://gerrit.ovirt.org/22736 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I08f13eee5609525880a92fc81c9fd3cb1d2ba62d Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Omer Frenkel <[email protected]> Gerrit-Reviewer: Alissa Bonas <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
