Bug 1525555 - The `all_content` parameter isn't translated into the `All-Content` header
Summary: The `all_content` parameter isn't translated into the `All-Content` header
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-sdk-ruby
Classification: oVirt
Component: Core
Version: 4.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.2.0
: 4.2.1
Assignee: Juan Hernández
QA Contact: Radim Hrazdil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-13 14:51 UTC by Juan Hernández
Modified: 2018-02-12 10:10 UTC (History)
2 users (show)

Fixed In Version: 4.2.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-12 10:10:21 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: blocker+
lsvaty: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 85398 0 master MERGED Fix handling of the `all_content` parameter 2020-10-14 18:49:33 UTC

Description Juan Hernández 2017-12-13 14:51:20 UTC
Description of problem:

When the `all_content` parameter is added to a method it isn't translated into the corresponding `All-Content` header.

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

4.2.0

How reproducible:

Always.


Steps to Reproduce:

1. Run a script like this:

---8<---
# Create the connection to the server:
connection = OvirtSDK4::Connection.new(
  url: 'https://engine42.local/ovirt-engine/api',
  username: 'admin@internal',
  password: '...',
  ca_file: 'ca.pem',
  debug: true,
  log: Logger.new('example.log')
)

# List the virtual machines, with all the optional content:
vms_service = connection.system_service.vms_service
vms = vms_service.list(all_content: true)

# Print some of the optional content:
vms.each do |vm|
  puts(vm.rng_device)
end

# Close the connection to the server:
connection.close
--->8---

2. Run the script.

Actual results:

The `rng_device` attribute is empty, and nothing is printed. Also in the `example.log` the request sent to the server doesn't contain the `All-Content` header:

  GET /ovirt-engine/api/vms?all_content=true HTTP/1.1
  Host: engine42.local
  Authorization: Bearer ...
  User-Agent: RubySDK/4.2.0
  Version: 4
  Content-Type: application/xml
  Accept: application/xml

Expected results:

The `rng_device` should be populated, and the request should contain the `All-Content` header:

  GET /ovirt-engine/api/vms?all_content=true HTTP/1.1
  Host: engine42.local
  Authorization: Bearer ...
  User-Agent: RubySDK/4.2.0
  Version: 4
  Content-Type: application/xml
  Accept: application/xml
  All-Content: true  <--- This should be populated

Comment 1 Red Hat Bugzilla Rules Engine 2017-12-13 14:51:24 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Radim Hrazdil 2018-01-24 11:17:11 UTC
Using the script proposed the description, verified that 'rng_device' attribute and All-Content: true are populated.

RHV Version 4.2.1.1-0.1.el7
ovirt-engine-sdk-4.2.2

Comment 3 Sandro Bonazzola 2018-02-12 10:10:21 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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