Bug 1250922 - PUT /api/compute_resources/:id returns an incomplete set of attributes
PUT /api/compute_resources/:id returns an incomplete set of attributes
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
x86_64 Linux
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Ohad Levy
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2015-08-06 06:08 EDT by Oleksandr Shtaier
Modified: 2017-01-11 14:36 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-01-11 14:36:01 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Oleksandr Shtaier 2015-08-06 06:08:15 EDT
Description of problem:
There are few compute resource fields that are not returned when person try to update existing entity:

* provider
* organization
* location

Version-Release number of selected component (if applicable):
sat 6.1.0

How reproducible:

Steps to Reproduce:
1. Issue HTTP PUT request to https://sat.example.com/api/compute_resources/:id
2. Capture the response. Examine the JSON payload and discover that several
   attributes are not mentioned.

Actual results:
See "Description of problem" section.

Expected results:
See "Description of problem" section.

Additional info:
Comment 2 Tom Caspy 2016-03-09 10:34:45 EST
this seems to be by design, and unrelated to compute resources. in Foreman's API, all create/update actions use the "process_response" method which simply runs #to_json on the relevant object and returns it.
Generally, if one wishes to see all the object's attributes, they should use the show API call. create/update actions should actually just return a status, not the object's attributes, which are actually unimportant (the response code tells the user of the status, everything else is unimportant in my opinion)
Comment 4 Bryan Kearney 2017-01-11 14:36:01 EST
This is an older bug which I do not envision being fixed in the near term. I am closing this out. If you believe doing so is an issue, please feel free to re-open and provide additional business information. Thank you.

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