Bug 1537491 - While updating a host's facet through API facet id is required to be passed. Ideally and according to the documentation it should not be required.
Summary: While updating a host's facet through API facet id is required to be passed. ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.2.12
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-23 11:01 UTC by Suraj Patil
Modified: 2021-03-11 16:59 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 07:05:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1312107 0 unspecified CLOSED updating a host's facet should not require the facet id to be included in facet params 2021-02-22 00:41:40 UTC

Description Suraj Patil 2018-01-23 11:01:56 UTC
Description of problem:

Updating a host's subscription facets(katello_subscription_facets) compulsorily requires the facet id to be included in facet params.

How reproducible:

--> Below API call returns successful but does not update the content. The same is mentioned in the API documentation too.

#curl -X PUT https://satellite.lab.example.com/api/v2/hosts/10 -k -s -u admin:changeme -H 'Content-Type: application/json' -d '{"id":10,"host": {"subscription_facet_attributes": {"service_level":"Self-Support"}}}'

-->But after passing facets id in facet params the content does get updated.

#curl -X PUT https://satellite.lab.example.com/api/v2/hosts/10 -k -s -u admin:changeme -H 'Content-Type: application/json' -d '{"id":10,"host": {"subscription_facet_attributes": {"id":9,"service_level":"Self-Support"}}}'


There was a bugzilla #1312107 created previously and has the current status "Status: RELEASE_PENDING → CLOSED" in 6.2.0
The version on which this has been observed is 6.2.12

Comment 1 Amit Karsale 2018-01-23 12:37:54 UTC
Hello Suraj,

Its a glitch in the documentation, Ideally the ID is required to update the facet.

need to update the documentation.

Comment 2 Kenneth McDowell II 2018-01-23 15:55:17 UTC
Amit,

That seems to be the opposite of the expected behavior due to bugzilla #1312107.

Comment 4 Marek Hulan 2018-03-20 19:54:04 UTC
Are you still able to reproduce with last 6.2 or 6.3 release? This should have been already resolved.

Comment 5 Suraj Patil 2018-03-21 11:53:46 UTC
I have tested this on satellite 6.3 not able to reproduce it again. 
I guess this has been resolved.

Comment 6 Amit Karsale 2018-05-29 07:05:22 UTC
based on Suraj's comment closing the BZ. If reproduced feel free to reopen.


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