Bug 1234964 - PUT /api/v2/architectures/:id returns an incomplete set of attributes
Summary: PUT /api/v2/architectures/:id returns an incomplete set of attributes
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified vote
Target Milestone: Unspecified
Assignee: alon
QA Contact: Roman Plevka
Depends On: 1216236
TreeView+ depends on / blocked
Reported: 2015-06-23 15:17 UTC by jaudet
Modified: 2019-09-26 16:26 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 08:52:45 UTC
Target Upstream Version:

Attachments (Terms of Use)
Output of foreman-debug from a Satellite 6.1.0 system running RHEL 7.1. (451.49 KB, application/x-xz)
2015-06-23 15:17 UTC, jaudet
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description jaudet 2015-06-23 15:17:57 UTC
Created attachment 1042389 [details]
Output of foreman-debug from a Satellite 6.1.0 system running RHEL 7.1.

Description of problem:
An architecture has at least the following attributes:

* id
* name
* organization{s,_ids}

When one updates an architecture, the following attributes are returned:

* created_at
* hostgroups_count
* hosts_count
* id
* name
* updated_at

The "organization" response is not mentioned in the response.

Version-Release number of selected component (if applicable):
Satellite 6.1.0. Foreman-debug is attached.

How reproducible:

Steps to Reproduce:
1. Issue HTTP PUT request to https://sat.example.com/api/v2/architectures/:id
2. Capture the response. Examine the JSON payload and discover that the "organization" attribute is not mentioned.

Actual results:
See "Description of problem" section.

Expected results:
See "Description of problem" section.

Additional info:

Comment 1 RHEL Program Management 2015-06-23 15:22:38 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 3 Ohad Levy 2015-07-05 14:00:09 UTC
Architecture is not related to org/locations, directly, hence I would not assume this is a bug?

Comment 4 jaudet 2015-07-06 15:23:14 UTC
I made a typo in the original bug write-up. It should reference operating systems, not organizations. In other words, this set of attributes is returned when one updates an architecture:

* created_at
* hostgroups_count
* hosts_count
* id
* name
* updated_at

No reference is made to operating systems, even though architectures are directly related to them.

Comment 5 orabin 2015-07-07 08:22:45 UTC

*** This bug has been marked as a duplicate of bug 1216236 ***

Comment 6 alon 2015-07-14 12:18:54 UTC
Fixed in http://projects.theforeman.org/issues/10356

Comment 7 Tomer Brisker 2016-04-12 12:46:53 UTC
This has been resolved in current 6.2 snaps, moving to ON_QA for verification.

Comment 8 Roman Plevka 2016-05-18 08:52:53 UTC
on Sat 6.2.0 Beta Snap GA11

the `operatingsystems` key is now being included in the response:

# curl -u admin:changeme -H "Content-type: application/json" -X PUT -d '{"name": "my_updated_arch_1"}' https://my-sat6.com/api/v2/architectures/3
{"created_at":"2016-05-18 08:47:56 UTC","updated_at":"2016-05-18 08:49:16 UTC","name":"my_updated_arch_1","id":3,"operatingsystems":[{"id":1,"name":"RedHat_Enterprise_Linux_Atomic_Host","title":"RedHat_Enterprise_Linux_Atomic_Host 7.2"},{"id":2,"name":"RedHat","title":"RHEL Server 6.8"}],"images":[]}

Comment 10 errata-xmlrpc 2016-07-27 08:52:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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


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