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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: liron aravot <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches