Ravi Nori has uploaded a new change for review. Change subject: restapi : error when adding disk with missing parameters(#890524) ......................................................................
restapi : error when adding disk with missing parameters(#890524) When trying to add disk with missing parameters we get error with superfluous 0: Disk [format, interface] required for invoke0 This patch fixes the error message by returning the right operation name in the message Change-Id: Idc57a93fee99859ba26bcc0bd5b25035358f5734 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=890524 Signed-off-by: Ravi Nori <rn...@redhat.com> --- M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDisksResource.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/20/10820/1 diff --git a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDisksResource.java b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDisksResource.java index da9116a..31bdb8a 100644 --- a/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDisksResource.java +++ b/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendDisksResource.java @@ -49,7 +49,7 @@ } protected void validateDiskForCreation(Disk disk) { - validateParameters(disk, 3, "format", "interface"); + validateParameters(disk, 2, "format", "interface"); if (DiskResourceUtils.isLunDisk(disk)) { validateParameters(disk.getLunStorage(), 3, "type"); // when creating a LUN disk, user must specify type. StorageType storageType = StorageType.fromValue(disk.getLunStorage().getType()); -- To view, visit http://gerrit.ovirt.org/10820 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Idc57a93fee99859ba26bcc0bd5b25035358f5734 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ravi Nori <rn...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches