Change in ovirt-engine[master]: restapi: return 404 when there are inexisting resources on path

masayag at redhat.com masayag at redhat.com
Wed Jul 29 09:58:03 UTC 2015


Moti Asayag has submitted this change and it was merged.

Change subject: restapi: return 404 when there are inexisting resources on path
......................................................................


restapi: return 404 when there are inexisting resources on path

when any resource on path does not exist, response should be 404. If
I'm asking for nics of inexisting host response should be 404, neither
200 with empty list as response nor 500 with npe in log etc.

This patch takes care only about 'networkattachments' and
setupnetworks resources.

Change-Id: Ie3e96ebfee8bbf2c6c1714d9d652fa5cc5e46886
Signed-off-by: Martin Mucha <mmucha at redhat.com>
---
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendNetworkAttachmentsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNetworkAttachmentsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicNetworkAttachmentsResource.java
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostResource.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendNetworkAttachmentsResourceTest.java
5 files changed, 89 insertions(+), 1 deletion(-)

Approvals:
  Juan Hernandez: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests
  Moti Asayag: Verified; Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/39499
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3e96ebfee8bbf2c6c1714d9d652fa5cc5e46886
Gerrit-PatchSet: 88
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list