Bug 1194218
| Summary: | [REGENERATE JAVA SDK] Document All-Content header in RSDL and add it to SDKs | ||
|---|---|---|---|
| Product: | [Retired] oVirt | Reporter: | Juan Hernández <juan.hernandez> |
| Component: | ovirt-engine-sdk-java | Assignee: | Juan Hernández <juan.hernandez> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Antonin Pagac <apagac> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.5 | CC: | bugs, ecohen, gklein, juan.hernandez, lsurette, msivak, pstehlik, rbalakri, yeylon |
| Target Milestone: | --- | ||
| Target Release: | 3.5.2 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | infra | ||
| Fixed In Version: | ovirt-engine-sdk-java-3.5.2.0 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1194185 | Environment: | |
| Last Closed: | 2015-04-29 06:16:47 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: | |||
| Bug Depends On: | 1194185 | ||
| Bug Blocks: | 1193058 | ||
|
Description
Juan Hernández
2015-02-19 10:59:19 UTC
ovirt-engine-sdk-java-3.5.2.0.jar I am able to query the engine from the SDK with the All-Content header using method: List<org.ovirt.engine.sdk.decorators.Host> list(String query, Boolean caseSensitive, Integer max, String allContent) which looks something like this: List<Host> hostsWithHeader = api.getHosts().list(null, null, null, "true"); However, I am unable to query the engine with the header using the "get" method. Also, I am not sure how to find out if the header actually changed something in the resulted data. Juan, can you please advise? The get methods of collections in the Java SDK don't support any parameter other than the name or identifier of the entity. This is for any collection, not only for hosts. If you think that this needs to be changed please open a RFE.
Currently the only extra information that is added to the host when the "All-Content: true" header is used is the hosted engine information. So to notice the difference you will have to use hosted engine and then call the method that returns the hosted engine data. For example, to get the hosted engine score:
HostedEngine hostedEngine = host.getHostedEngine();
if (hostedEngine != null) {
System.out.println("score: " + hostedEngine.getScore());
}
Without the header (or with value "false") this will always return "null", with the header (and value "true") it will return the hosted engine data (only if using hosting engine).
I tried this with a hosted engine and successfully got a Score value. Thank you Juan. Verified. ovirt 3.5.2 was GA'd. closing current release. |