Itamar Heim 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 <[email protected]>
---
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/24327
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib517cc0fd04c4f0e12fd6bdbdca8c6277600e325
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to