Maor Lipchuk has posted comments on this change.
Change subject: core: error when adding disks without specifying storage domain
......................................................................
Patch Set 3: (4 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddDiskCommand.java
Line 272: return DbFacade.getInstance().getDiskLunMapDao();
Line 273: }
Line 274:
Line 275: /**
Line 276: * @return The ID of the storage domain where the VM's disks
reside.
please rephrase java doc message
Line 277: */
Line 278: private Guid getDisksStorageDomainId() {
Line 279: for (Disk disk : getVm().getDiskMap().values()) {
Line 280: if (disk.getDiskStorageType() == DiskStorageType.IMAGE) {
Line 293: getVm() != null) {
Line 294:
Line 295: updateDisksFromDb();
Line 296: storageDomainId = getDisksStorageDomainId();
Line 297: getParameters().setStorageDomainId(storageDomainId);
Please add comment here
Line 298: }
Line 299: else if (storageDomainId == null) {
Line 300: storageDomainId = Guid.Empty;
Line 301: getParameters().setStorageDomainId(storageDomainId);
Line 295: updateDisksFromDb();
Line 296: storageDomainId = getDisksStorageDomainId();
Line 297: getParameters().setStorageDomainId(storageDomainId);
Line 298: }
Line 299: else if (storageDomainId == null) {
Please use else if at the same line the bracket is
Line 300: storageDomainId = Guid.Empty;
Line 301: getParameters().setStorageDomainId(storageDomainId);
Line 302: }
Line 303: setStorageDomainId(storageDomainId);
....................................................
Commit Message
Line 6:
Line 7: core: error when adding disks without specifying storage domain
Line 8:
Line 9: When adding a disk and no storage domain id is passed by the
parameters, there is an attempt to get the storage domain id
Line 10: from the first vm disk - if this disk is a LUN disk, it won't have
storage domain id and we won't be able to add the new image disk.
Please use commit message pattern
Line 11:
Line 12: Change-Id: Icc3fce53eaeca31b7b479019ba195b60e248c88e
Line 13: Bug-Url: https://bugzilla.redhat.com/876109
--
To view, visit http://gerrit.ovirt.org/10289
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Icc3fce53eaeca31b7b479019ba195b60e248c88e
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches