Bug 830512 - Ovirt SDK - Events search with specific from_event_id doesn't work properly
Ovirt SDK - Events search with specific from_event_id doesn't work properly
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-sdk (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michael Pasternak
Oded Ramraz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-10 05:56 EDT by Elena
Modified: 2015-09-22 09 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-10 06:53:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Elena 2012-06-10 05:56:45 EDT
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 06:09:20 EDT
please enable debug mode and attach the output,

thanks.
Comment 2 Michael Pasternak 2012-06-10 06:34:09 EDT
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 06:48:28 EDT
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 06:53:29 EDT
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.