Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
https://github.com/Apipie/apipie-bindings/commit/a6369fadb28472611d481c93ca42ae5df7fecbd4
This causes apipie-bindings to send optional parameters with required nested parameters to be sent. With the rails 4 deep munging converting empty arrays to nil this breaks api calls.
This may affect hammer as well.
Version-Release number of selected component (if applicable):
0.0.11
How reproducible:
Always
Steps to Reproduce:
1. create an OS via the API in Satellite 6.2 using apipie-bindings
Actual results:
2016-03-11 09:36:08 [app] [I] Parameters: {"operatingsystem"=>{"name"=>"CentOS", "major"=>"6", "minor"=>"6", "family"=>"Redhat", "os_parameters_attributes"=>nil}, "apiv"=>"v2"}
2016-03-11 09:36:08 [app] [I] Authorized user admin(Admin User)
2016-03-11 09:36:08 [app] [W] Action failed
| ArgumentError: Hash or Array expected, got NilClass (nil)
Expected results:
success
Additional info:
Should be updated to 0.0.14 as in foreman upstream
http://yum.theforeman.org/releases/1.11/el7/x86_64/rubygem-apipie-bindings-0.0.14-2.el7.noarch.rpm
I should say rather that the deep munging makes it impossible to work around it by sending an empty array or hash as it is converted to nil.
Also, an updated apipie-bindings package has been built since this bug was opened and should fix the problem.