Bug 1525555

Summary: The `all_content` parameter isn't translated into the `All-Content` header
Product: [oVirt] ovirt-engine-sdk-ruby Reporter: Juan Hernández <juan.hernandez>
Component: CoreAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hrazdil <rhrazdil>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: bugs, lsvaty
Target Milestone: ovirt-4.2.0Keywords: Regression
Target Release: 4.2.1Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
lsvaty: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-12 10:10:21 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 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.