Ori Liel has posted comments on this change.

Change subject: restapi: #855890 - Direct-LUN Disk Creation - Dont Require Size
......................................................................


Patch Set 3: (3 inline comments)

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmDisksResource.java
Line 49:               SUB_COLLECTIONS);
Line 50:     }
Line 51: 
Line 52:     @Override
Line 53:     public Response add(Disk disk) {
I did not mix anything. The other patch deals with attachDiskToVm() which is 
untouched here. This patch deal with the creation, which is not touched by the 
other patch. They are mutually exclusive, please take a look again.
Line 54:         validateEnums(Disk.class, disk);
Line 55:         if (disk.isSetId()) {
Line 56:             return attachDiskToVm(disk);
Line 57:         }else {


Line 52:     @Override
Line 53:     public Response add(Disk disk) {
Line 54:         validateEnums(Disk.class, disk);
Line 55:         if (disk.isSetId()) {
Line 56:             return attachDiskToVm(disk);
irrelevant comment for this patch, please take a look again.
Line 57:         }else {
Line 58:             validateParameters(disk, "format", "interface");
Line 59:             if (!disk.isSetLunStorage() || 
disk.getLunStorage().getLogicalUnits().isEmpty()) { // lun-disk does not
Line 60:                                                                        
                        // require


Line 62:                 validateParameters(disk, "provisionedSize|size");
Line 63:             }
Line 64:             return performCreation(addAction,
Line 65:                     getAddParameters(map(disk), disk),
Line 66:                     getEntityIdResolver(disk.getName()));
super.add() does regular validation. The validation required by this patch 
involved 'if' statements. That's why I had to forego the 'super' call and move 
the functionality down to this level.
Line 67:         }
Line 68:     }
Line 69: 
Line 70:     @Override


--
To view, visit http://gerrit.ovirt.org/8331
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie8dba8d1e1b20ff5f81d9cfa944d3bfcd5630bc1
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to