Maor Lipchuk has posted comments on this change. Change subject: restapi: Allow override of allocation policy of imported disks ......................................................................
Patch Set 2: (2 comments) most of the comments are a matter of taste issues IMHO. http://gerrit.ovirt.org/#/c/36131/2/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainVmResource.java File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainVmResource.java: Line 84: if (action.isSetVm()) { Line 85: VM modelVm = action.getVm(); Line 86: if (modelVm.isSetDisks()) { Line 87: Map<Guid, org.ovirt.engine.core.common.businessentities.Disk> entityDisks = getDiskMap(); Line 88: for (Disk modelDisk : modelVm.getDisks().getDisks()) { > don't we need to check that modelVm.getDisks().getDisks() is set? I think that this should be set once modelVm.isSetDisks() is true Line 89: if (modelDisk.isSetId()) { Line 90: Guid modelDiskId = Guid.createGuidFromString(modelDisk.getId()); Line 91: DiskImage entityDisk = (DiskImage) entityDisks.get(modelDiskId); Line 92: if (entityDisk != null) { Line 85: VM modelVm = action.getVm(); Line 86: if (modelVm.isSetDisks()) { Line 87: Map<Guid, org.ovirt.engine.core.common.businessentities.Disk> entityDisks = getDiskMap(); Line 88: for (Disk modelDisk : modelVm.getDisks().getDisks()) { Line 89: if (modelDisk.isSetId()) { > don't we need to validate those things and show an appropriate error if not the validation should be part of the engine side Line 90: Guid modelDiskId = Guid.createGuidFromString(modelDisk.getId()); Line 91: DiskImage entityDisk = (DiskImage) entityDisks.get(modelDiskId); Line 92: if (entityDisk != null) { Line 93: if (modelDisk.isSetFormat()) { -- To view, visit http://gerrit.ovirt.org/36131 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idc9945968b7cd2b8a82d953f659967d72064d583 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches