Bug 1203865 - An owner_type of "Usergroup" is ignored when creating a host
Summary: An owner_type of "Usergroup" is ignored when creating a host
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Shimon Shtein
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-19 19:24 UTC by jaudet
Modified: 2017-08-01 20:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 20:01:54 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 16125 None None None 2016-08-16 11:59:00 UTC

Description jaudet 2015-03-19 19:24:33 UTC
Description of problem:
When creating or updating a host, it is possible to specify an owner_type. From the API docs:

> host[owner_type]
> 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.

How reproducible:
Always.

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.

Actual results:
A host is created with an owner type of "User".

Expected results:
A host is created with an owner type of "Usergroup".

Additional info:

Comment 1 jaudet 2015-03-19 19:30:03 UTC
An automated test for this bug will be added to QE's test suite shortly. See https://github.com/SatelliteQE/robottelo/pull/2005

Comment 3 RHEL Product and Program Management 2015-03-19 19:43:10 UTC
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.

Comment 7 jaudet 2015-07-06 16:46:57 UTC
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.

Comment 8 Bryan Kearney 2016-08-04 20:09:58 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 10 Ivan Necas 2016-08-16 11:58:58 UTC
Created redmine issue http://projects.theforeman.org/issues/16125 from this bug

Comment 11 Bryan Kearney 2016-08-17 18:06:20 UTC
Upstream bug assigned to sshtein@redhat.com

Comment 12 Bryan Kearney 2016-08-17 18:06:23 UTC
Upstream bug assigned to sshtein@redhat.com

Comment 13 Bryan Kearney 2016-09-13 10:06:33 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16125 has been resolved.

Comment 14 Bryan Kearney 2017-08-01 20:01:54 UTC
The fix to this bug will be delivered with release 6.3 of Satellite.


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