Description of problem:
When creating or updating a host, it is possible to specify an owner_type. From the API docs:
> optional , nil allowed
> Host's owner type
> Value: Must be one of: User, Usergroup.
The "owner_type" attribute is set to "User" when creating a host, even if one provides a value of "Usergroup".
Version-Release number of selected component (if applicable):
Tested against Satellite-6.1.0-RHEL-6-20150317.0 and Satellite-6.1.0-RHEL-7-20150317.0.
Steps to Reproduce:
1. Create a host. Specify an owner_type of "Usergroup".
2. Read back information about the just-created host. Examine the owner_type attribute.
A host is created with an owner type of "User".
A host is created with an owner type of "Usergroup".
An automated test for this bug will be added to QE's test suite shortly. See https://github.com/SatelliteQE/robottelo/pull/2005
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
If some mistake has been made while updating a host, then the server should return an HTTP 422 error giving some indication of such. To simply return an HTTP success status code and ignore the failures is bad behaviour.
Moving 6.2 bugs out to sat-backlog.
Created redmine issue http://projects.theforeman.org/issues/16125 from this bug
Upstream bug assigned to firstname.lastname@example.org
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16125 has been resolved.
The fix to this bug will be delivered with release 6.3 of Satellite.