Shahar Havivi has posted comments on this change. Change subject: core: Set default timezone to a Templates and VMs ......................................................................
Patch Set 2: (5 comments) http://gerrit.ovirt.org/#/c/28168/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmTemplateCommand.java: Line 125: setVm(vm); Line 126: setStoragePoolId(getVdsGroup().getStoragePoolId()); Line 127: } Line 128: updateDiskInfoDestinationMap(); Line 129: VmHandler.updateDefaultTimeZone(parameters.getVm().getStaticData()); > i think its safer to put this inside the "if (parameterMasterVm != null)" Done Line 130: } Line 131: Line 132: protected void updateDiskInfoDestinationMap() { Line 133: diskInfoDestinationMap = getParameters().getDiskInfoDestinationMap(); http://gerrit.ovirt.org/#/c/28168/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmTemplateCommand.java: Line 43: if (getVdsGroup() != null) { Line 44: setStoragePoolId(getVdsGroup().getStoragePoolId() != null ? getVdsGroup().getStoragePoolId() Line 45: : Guid.Empty); Line 46: } Line 47: //TODO: fix that > ? mistake... Line 48: VmHandler.updateDefaultTimeZone(parameters.getVmTemplateData()); Line 49: } Line 50: Line 51: @Override http://gerrit.ovirt.org/#/c/28168/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java: Line 778: } Line 779: Line 780: public static void updateDefaultTimeZone(VmBase vmBase) { Line 781: if (vmBase.getTimeZone() == null) { Line 782: vmBase.setTimeZone(Config.<String> getValue(ConfigValues.DefaultWindowsTimeZone)); > i think you need to set it according to the os Done Line 783: } Line 784: } http://gerrit.ovirt.org/#/c/28168/2/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java: Line 355: node = content.SelectSingleNode(OvfProperties.TIMEZONE); Line 356: if (node != null && StringUtils.isNotEmpty(node.innerText)) { Line 357: vmBase.setTimeZone(node.innerText); Line 358: } else { Line 359: vmBase.setTimeZone(Config.<String> getValue(ConfigValues.DefaultWindowsTimeZone)); > again should be according to vm os Done Line 360: } Line 361: Line 362: Line 363: http://gerrit.ovirt.org/#/c/28168/2/packaging/dbscripts/upgrade/03_05_0560_set_default_time_zone.sql File packaging/dbscripts/upgrade/03_05_0560_set_default_time_zone.sql: Line 1: -- set the defalut time zone from vdc_options Line 2: Line 3: update vm_static set time_zone=(select option_value from vdc_options where option_name = 'DefaultWindowsTimeZone') where time_zone is NULL and vm_guid != '00000000-0000-0000-0000-000000000000'; > why windows? Done -- To view, visit http://gerrit.ovirt.org/28168 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id55b02a10c2faa17a7a50b64516d902c3d97e06d Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> Gerrit-Reviewer: Martin Betak <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Shahar Havivi <[email protected]> Gerrit-Reviewer: [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
