Bug 1212483 - Adding HTTP header "filter : true" fails the result of /api/vms?search={query}
Summary: Adding HTTP header "filter : true" fails the result of /api/vms?search={query}
Keywords:
Status: CLOSED DUPLICATE of bug 1163105
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-api
Version: 3.5
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Juan Hernández
QA Contact: Pavel Stehlik
URL:
Whiteboard: infra
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-16 13:39 UTC by Ali Tokhmpash
Modified: 2015-04-16 13:44 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-16 13:44:07 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Ali Tokhmpash 2015-04-16 13:39:19 UTC
Description of problem:

Adding the "filter:true" to HTTP request for non-admin user for REST API and requesting a specific vm by using /api/vms?search={query} returns wrong result, instead of that specific vm you get all vms on oVirt.

However search works fine using admin user where you don't need to send filter:true header. 


Version-Release number of selected component (if applicable):

oVirt Engine
3.5.0.1-1.el6

How reproducible:

Send search request /api/vms?search={query} 


Steps to Reproduce:
1. Create more then one VM on your oVirt

2. curl http://{engine_ip}/api/vms?search=name%3D{vm_name} -u "alt@internal":XXXX -H "filter: true" -H "Accept-Encoding: identity" -H "Prefer: persistent-auth" -H "Content-type: application/xml" -H "Accept: application/xml" -k -i -v


Actual results:

All VM:s are returned 

Expected results:

Only the specified vm 

Additional info:

This error occurs also for  "/api/templates?search={query}"

However search works fine using admin user where you don't need to send filter:true header.

Comment 1 Juan Hernández 2015-04-16 13:44:07 UTC
This is a known limitation of the RESTAPI. It is already reported in bug 1163105 and will be fixed in version 3.6.

*** This bug has been marked as a duplicate of bug 1163105 ***


Note You need to log in before you can comment on or make changes to this bug.