Bug 1194185 - Document All-Content header in RSDL and add it to SDKs
Summary: Document All-Content header in RSDL and add it to SDKs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-api
Version: 3.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 3.5.2
Assignee: Juan Hernández
QA Contact: Artyom
URL:
Whiteboard: sla
Depends On: 1196980
Blocks: 1193058 1194216 1194218 1196662 1197441
TreeView+ depends on / blocked
 
Reported: 2015-02-19 09:56 UTC by Martin Sivák
Modified: 2016-02-10 19:42 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1194216 1194218 1194228 (view as bug list)
Environment:
Last Closed: 2015-04-29 06:16:07 UTC
oVirt Team: SLA
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 37945 0 master MERGED restapi: Document All-Content header for hosts Never
oVirt gerrit 37946 0 ovirt-engine-3.5 MERGED restapi: Document All-Content header for hosts Never

Description Martin Sivák 2015-02-19 09:56:44 UTC
Description of problem:

Some information is hidden from REST unless All-Content is set, but the header is not documented and the SDK does not support it.

One example is HA score (hosted engine) of a Host. It is set in org.ovirt.engine.api.restapi.resource.BackendHostResource#doPopulate and not present in HostMapper.

There is no way to get this data using Java SDK.

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

oVirt 3.4, oVirt 3.5 components (engine, Java SDK)

How reproducible:

Always.

Additional info:

I consider HA score to be important value and I would prefer if it was always present. But that is another issue. Also the All-Content header is not properly documented anywhere and if it is then our documentation is a mess...

Comment 1 Eyal Edri 2015-02-26 12:31:31 UTC
this ovirt bug was fixed during 3.5.1 cycle and is included in the build, and therefore should be verified.

Comment 2 Artyom 2015-03-16 14:52:13 UTC
Martin can you please provide information how I verify this bug?
Also I checked python sdk(brokers.py) and class Hosts under get method still not have default parameter all_content.
rhevm-3.5.1-0.1.el6ev.noarch

Comment 3 Juan Hernández 2015-03-16 15:02:53 UTC
Artyom, this is an oVirt bug, and the fix is included in ovirt-engine-sdk-python-3.5.2.0, see bug 1194216. It will be fixed in the RHEV-M SDK when it is rebased using version 3.5.2.0 of the oVirt SDK, see bug 1196980.

Comment 4 Artyom 2015-03-16 15:31:37 UTC
mm so why build id equal to vt14, can you please check it?

Comment 5 Juan Hernández 2015-03-16 15:33:24 UTC
Not sure. Eyal do you know why the build id in this upstream bug is vt14?

Comment 9 Juan Hernández 2015-03-18 09:02:21 UTC
This bug can be verified requesting the RSDL document from a live engine (version 3.5.2 RC1 or newer) and checking if the RSDL document contains the description for the header. Go to the following URL:

  http://.../ovirt-engine/api?rsdl

That XML document should contain the following:

  <link href="/ovirt-engine/api/hosts/{host:id}" rel="get">
    <description>get the details of the specified host in the system</description>
    <request>
      <http_method>GET</http_method>
      <headers>
         <header required="false">
           <name>Filter</name>
           <value>true|false</value>
         </header>
         <header required="false">
           <name>All-Content</name>
           <value>true|false</value>
         </header>
       </headers>
       ...
     </request>
  </link>

To verify the corresponding Python SDK bug 1194216 download version 3.5.2.0 and check that the method to get a host has the "all_content" parameter. Alternatively it can be verified inspecting the source code:

  https://github.com/oVirt/ovirt-engine-sdk/blob/3.5.2.0/src/ovirtsdk/infrastructure/brokers.py#L13283

Same for the Java SDK bug 1194218:

  https://github.com/oVirt/ovirt-engine-sdk-java/blob/3.5.2.0/ovirt-engine-sdk-java/src/main/java/org/ovirt/engine/sdk/decorators/Hosts.java#L194

Comment 10 Artyom 2015-03-18 09:26:04 UTC
Thanks
Verified on rhevm-3.5.1-0.1.el6ev.noarch
<link href="/ovirt-engine/api/hosts/{host:id}" rel="get"><description>get the details of the specified host in the system</description><request><http_method>GET</http_method><headers><header required="false"><name>Filter</name><value>true|false</value></header><header required="false"><name>All-Content</name><value>true|false</value></header></headers>

Comment 11 Eyal Edri 2015-04-29 06:16:07 UTC
ovirt 3.5.2 was GA'd. closing current release.


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