Bug 830512 - Ovirt SDK - Events search with specific from_event_id doesn't work properly
Summary: Ovirt SDK - Events search with specific from_event_id doesn't work properly
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Michael Pasternak
QA Contact: Oded Ramraz
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-10 09:56 UTC by Elena
Modified: 2015-09-22 13:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-10 10:53:29 UTC
oVirt Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Elena 2012-06-10 09:56:45 UTC
search = collection.list(query, from_event_id=event_id)

it works the same as: search = collection.list(query)

and not filtered by id number

Comment 1 Michael Pasternak 2012-06-10 10:09:20 UTC
please enable debug mode and attach the output,

thanks.

Comment 2 Michael Pasternak 2012-06-10 10:34:09 UTC
p.s it should not be filtered by id number, it works like this:

collection.list(query="..", from_event_id=N)

event.id=N
event.id=N+1
event.id=N+2
event.id=N+K (where N+K is the last event id)

make sure you get sub-set of events retrieved by collection.list()

Comment 3 Elena 2012-06-10 10:48:28 UTC
search = collection.list(constraint, from_event_id=151464)

Debug print:
send: 'GET /api/events;case_sensitive=True?search=RestDataCenter1+type%3D950 HTTP/1.1\r\nHost: 10.35.113.33\r\nAccept-Encoding: identity\r\nPrefer: persistent-auth\r\nContent-type: application/xml\r\nAuthorization: Basic dmRjYWRtaW5AcWEubGFiLnRsdi5yZWRoYXQuY29tOjEyMzQ1Ng==\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Sun, 10 Jun 2012 10:45:37 GMT
header: Set-Cookie: JSESSIONID=cDJMGq4Q2hpJ-EGrQ-gQ-4yf.undefined; Path=/api
header: Content-Type: application/xml
header: Connection: close
header: Transfer-Encoding: chunked
send: 'GET /api/events;from=151464;case_sensitive=True?search=type%3D950 HTTP/1.1\r\nHost: 10.35.113.33\r\nAccept-Encoding: identity\r\ncookie: JSESSIONID=cDJMGq4Q2hpJ-EGrQ-gQ-4yf.undefined\r\nPrefer: persistent-auth\r\nContent-type: application/xml\r\nAuthorization: Basic dmRjYWRtaW5AcWEubGFiLnRsdi5yZWRoYXQuY29tOjEyMzQ1Ng==\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Sun, 10 Jun 2012 10:45:38 GMT
header: Content-Type: application/xml
header: Connection: close
header: Transfer-Encoding: chunked
2012-06-10 13:45:39,828 - MainThread - events - INFO - Searching for events with id > 151464,
2012-06-10 13:45:39,829 - MainThread - events - ERROR - Collection size is wrong, expected is: 2, actual is: 100

Comment 4 Michael Pasternak 2012-06-10 10:53:29 UTC
as you can see sdk produce right url - "/api/events;from=151464;"
checked on server side and all works ok as well.


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