Vered Volansky has posted comments on this change.
Change subject: core: OvfDataUpdater - removal of update/remove OVF vdsm calls
......................................................................
Patch Set 28: (5 inline comments)
Sorry, some minor comments
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromScratchCommand.java
Line 113: }
Line 114:
Line 115:
VmHandler.LockVm(getParameters().getVmStaticData().getId());
Line 116: } else {
Line 117: // if no disks send update vm here
Comment is misleading now
Line 118: getVmStaticDao().incrementDbGeneration(getVm().getId());
Line 119: }
Line 120:
Line 121: return ret;
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java
Line 76: import org.ovirt.engine.core.dao.BusinessEntitySnapshotDAO;
Line 77: import org.ovirt.engine.core.dao.GenericDao;
Line 78: import org.ovirt.engine.core.dao.StatusAwareDao;
Line 79: import org.ovirt.engine.core.dao.VdsSpmIdMapDAO;
Line 80: import org.ovirt.engine.core.dao.VmAndTemplatesGenerationsDAO;
Looks like a leftover from a previous change, please check it out.
Line 81: import org.ovirt.engine.core.utils.Deserializer;
Line 82: import org.ovirt.engine.core.utils.ReflectionUtils;
Line 83: import org.ovirt.engine.core.utils.SerializationFactory;
Line 84: import org.ovirt.engine.core.utils.ThreadLocalParamsContainer;
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java
Line 400:
Line 401: protected boolean updateVmImSpm() {
Line 402: Map<Guid, KeyValuePairCompat<String, List<Guid>>>
metaDictionary =
Line 403: new HashMap<Guid, KeyValuePairCompat<String,
List<Guid>>>();
Line 404: OvfDataUpdater.getInstance().loadVmData(getVm());
getVm() is called 4 times, why not extract?
Line 405: VmHandler.updateDisksFromDb(getVm());
Line 406:
OvfDataUpdater.getInstance().buildMetadataDictionaryForVm(getVm(),
metaDictionary);
Line 407: return
OvfDataUpdater.getInstance().executeUpdateVmInSpmCommand(getVm().getStoragePoolId(),
Line 408: metaDictionary, getParameters().getStorageDomainId());
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmTemplateCommand.java
Line 134: @Override
Line 135: protected void incrementDbGeneration() {
Line 136: Map<Guid, KeyValuePairCompat<String, List<Guid>>>
metaDictionary =
Line 137: new HashMap<Guid, KeyValuePairCompat<String,
List<Guid>>>();
Line 138:
OvfDataUpdater.getInstance().loadTemplateData(getVmTemplate());
getVmTemplate() is also called 4 times, I'd extract.
Line 139: VmTemplateHandler.UpdateDisksFromDb(getVmTemplate());
Line 140: // update the target (export) domain
Line 141:
OvfDataUpdater.getInstance().buildMetadataDictionaryForTemplate(getVmTemplate(),
metaDictionary);
Line 142:
OvfDataUpdater.getInstance().executeUpdateVmInSpmCommand(getVmTemplate().getstorage_pool_id().getValue(),
....................................................
Commit Message
Line 5: CommitDate: 2012-12-23 15:49:02 +0200
Line 6:
Line 7: core: OvfDataUpdater - removal of update/remove OVF vdsm calls
Line 8:
Line 9: This patch replaces calls to to following commands with a call to
/to to/to the
Line 10: incrementDbGeneration in order to singal OvfDataUpdater that the
Line 11: given vm/template has been updated.
Line 12:
Line 13: Generally, most commands are performed under lock to a specific
--
To view, visit http://gerrit.ovirt.org/9340
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iedebceb9809dc0b11c0bbe8a2d4af63b0d848df1
Gerrit-PatchSet: 28
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches