Liron Aravot has posted comments on this change. Change subject: core: introducing OvfAutoUpdate ......................................................................
Patch Set 21: (7 inline comments) .................................................... File backend/manager/dbscripts/storages_sp.sql Line 99: FROM vms Line 100: WHERE storage_pool_id = v_id); Line 101: delete FROM vm_static where vm_guid in (select vm_guid from vms where storage_pool_id = v_id); Line 102: Line 103: -- Get (and keep) a shared lock with "right to upgrade to exclusive" Done Line 104: -- in order to force locking parent before children Line 105: select id INTO v_val FROM storage_pool WHERE id = v_id FOR UPDATE; Line 106: Line 107: DELETE FROM storage_pool .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java Line 42: import org.ovirt.engine.core.utils.timer.OnTimerMethodAnnotation; Line 43: import org.ovirt.engine.core.utils.timer.SchedulerUtil; Line 44: import org.ovirt.engine.core.utils.timer.SchedulerUtilQuartzImpl; Line 45: Line 46: public class OvfDataUpdater { Done Line 47: private static final Log log = LogFactory.getLog(OvfDataUpdater.class); Line 48: private static final OvfDataUpdater INSTANCE = new OvfDataUpdater(); Line 49: private int itemsCountPerUpdate; Line 50: protected static final int MAX_ITEMS_PER_SQL_STATEMENT = 100; Line 176: } Line 177: } Line 178: Line 179: /** Line 180: * create and returns map contains valid templates metadata Done Line 181: * @param idsToProcess Line 182: * @return Line 183: */ Line 184: protected Map<Guid, KeyValuePairCompat<String, List<Guid>>> populateTemplatesMetadataForOvfUpdate(List<Guid> idsToProcess) { .................................................... File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmDAOTest.java Line 108: * Asserts the given VM is the expected one Line 109: */ Line 110: private void assertGetResult(VM result) { Line 111: assertNotNull(result); Line 112: assertTrue("Vm db generation wasn't loaded as expected", result.getDbGeneration() == 1); Same result..but it indeed might look nicer, done :-) Line 113: assertEquals(result, existingVm); Line 114: } Line 115: Line 116: /** Line 351: assertNotNull(result); Line 352: assertFalse(result.isEmpty()); Line 353: assertEquals(VM_COUNT, result.size()); Line 354: for (VM vm : result) { Line 355: assertTrue("Vm db generation wasn't loaded as expected", vm.getDbGeneration() == 1); Same result..but it indeed might look nicer, done :-) Line 356: } Line 357: } .................................................... File backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmTemplateDAOTest.java Line 271: Line 272: private static void assertGetResult(VmTemplate result) { Line 273: assertNotNull(result); Line 274: assertEquals(EXISTING_TEMPLATE_ID, result.getId()); Line 275: assertTrue("Template generation wasn't loaded as expected", result.getDbGeneration() == 1); Same result..but it indeed might look nicer, done :-) Line 276: } Line 277: Line 278: private static void assertGetAllResult(List<VmTemplate> result) { Line 279: assertNotNull(result); Line 278: private static void assertGetAllResult(List<VmTemplate> result) { Line 279: assertNotNull(result); Line 280: assertFalse(result.isEmpty()); Line 281: for (VmTemplate template : result){ Line 282: assertTrue("Template generation wasn't loaded as expected", template.getDbGeneration() == 1); Same result..but it indeed might look nicer, done :-) Line 283: } Line 284: } -- To view, visit http://gerrit.ovirt.org/9328 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9b5132300fb1f1fd94f771cab15efe5246dbeca8 Gerrit-PatchSet: 21 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: liron aravot <liron.ara...@gmail.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches