Liron Ar has posted comments on this change. Change subject: core: introudcing domain ovf handling commands ......................................................................
Patch Set 6: (4 comments) http://gerrit.ovirt.org/#/c/23529/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateOvfVolumeForStorageDomainCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateOvfVolumeForStorageDomainCommand.java: Line 77: mNewCreatedDiskImage.setStorageIds(new ArrayList<>(Arrays.asList(domainId))); Line 78: mNewCreatedDiskImage.setSize(SizeConverter.BYTES_IN_GB); Line 79: mNewCreatedDiskImage.setvolumeFormat(VolumeFormat.RAW); Line 80: mNewCreatedDiskImage.setVolumeType(VolumeType.Preallocated); Line 81: mNewCreatedDiskImage.setDescription("OVF_DISK_FOR_DOMAIN " + domainId); > what's the difference between description and disk description? we use both, description is a general "system" field which was added to almost all the entities while disk description is relevant only to disks. Line 82: mNewCreatedDiskImage.setCreationDate(new Date()); Line 83: mNewCreatedDiskImage.setLastModified(new Date()); Line 84: return mNewCreatedDiskImage; Line 85: } Line 79: mNewCreatedDiskImage.setvolumeFormat(VolumeFormat.RAW); Line 80: mNewCreatedDiskImage.setVolumeType(VolumeType.Preallocated); Line 81: mNewCreatedDiskImage.setDescription("OVF_DISK_FOR_DOMAIN " + domainId); Line 82: mNewCreatedDiskImage.setCreationDate(new Date()); Line 83: mNewCreatedDiskImage.setLastModified(new Date()); > You might see a drift between these two - extract to a local var. Done Line 84: return mNewCreatedDiskImage; Line 85: } Line 86: Line 87: private void addStorageDomainOvfInfoToDbIfNeeded(Guid diskId) { Line 99: Line 100: @Override Line 101: protected void endSuccessfully() { Line 102: endChildCommands(); Line 103: // TODO: replace > que? Done Line 104: addStorageDomainOvfInfoToDbIfNeeded(((AddImageFromScratchParameters) getParameters().getImagesParameters() Line 105: .get(0)).getDiskInfo().getId()); Line 106: Backend.getInstance().runInternalAction(VdcActionType.ProccessOvfUpdateForStorageDomain, getParameters()); Line 107: setSucceeded(true); Line 102: endChildCommands(); Line 103: // TODO: replace Line 104: addStorageDomainOvfInfoToDbIfNeeded(((AddImageFromScratchParameters) getParameters().getImagesParameters() Line 105: .get(0)).getDiskInfo().getId()); Line 106: Backend.getInstance().runInternalAction(VdcActionType.ProccessOvfUpdateForStorageDomain, getParameters()); > isn't there a shorthand runInternalAction ? nop, but there's a "getBackend()" method, changed to use it. Line 107: setSucceeded(true); Line 108: } Line 109: Line 110: protected StorageDomainOvfInfoDao getStorageDomainOvfInfoDao() { -- To view, visit http://gerrit.ovirt.org/23529 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifea111e6732ec0b6953d54ef03c29eb0dff6f837 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Ar <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Liron Ar <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Tal Nisan <[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
