Bug 1315861
Summary: | API.events.list() won't filter by code | ||
---|---|---|---|
Product: | [oVirt] ovirt-engine | Reporter: | nicolas |
Component: | Search-Backend | Assignee: | Eli Mesika <emesika> |
Status: | CLOSED NOTABUG | QA Contact: | Pavel Stehlik <pstehlik> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.6.3.3 | CC: | bugs, juan.hernandez |
Target Milestone: | --- | Flags: | rule-engine:
planning_ack?
rule-engine: devel_ack? rule-engine: testing_ack? |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-03-09 09:16:36 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
nicolas
2016-03-08 19:34:41 UTC
The text that you put in the "query" parameter is translated into the "search" parameter of the API, so that call to the "list" method is translated into something like this: GET /ovirt-engine/api/events?search=code%3D167 The syntax of this "search" parameter is the same used in the search bar of the GUI, and it uses the same names used by the database and there are some differences with the names used in the API. For example, what is "code" in the API is "type" in the database. This means that you can make your script work just replacing "code" with "type": api.events.list(query='type=167') There is more information about the query syntax here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.5/html-single/Administration_Guide/index.html#Performing_Searches_in_Red_Hat_Enterprise_Virtualization Section "F.1.19. Searching for Events" describes events. |