Change in ovirt-engine[master]: restapi: Assure network existence when adding a vnic profile

juan.hernandez at redhat.com juan.hernandez at redhat.com
Tue Feb 11 09:54:35 UTC 2014


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Assure network existence when adding a vnic profile
......................................................................


restapi: Assure network existence when adding a vnic profile

In order to create a vnic profile, the user must provide
the network id to which he wishes to add the profile.
If a network cannot be obtained by the id, the parameters
should consider invalid and a proper message should be
returned.

The backend has logic for this scenario, however when performing
this action with a user that its permissions should be verified,
there is a generic "User is not authorized to perform this action"
even though the message refers to a non-existing network entity.

Change-Id: Ib517cc0fd04c4f0e12fd6bdbdca8c6277600e325
Bug-Url: https://bugzilla.redhat.com/1031369
Signed-off-by: Moti Asayag <masayag at redhat.com>
---
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVnicProfilesResource.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/AbstractBackendVnicProfilesResourceTest.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendVnicProfilesResourceTest.java
3 files changed, 23 insertions(+), 0 deletions(-)

Approvals:
  Juan Hernandez: Looks good to me, approved
  Moti Asayag: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib517cc0fd04c4f0e12fd6bdbdca8c6277600e325
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list