Bug #38824
closed/hosts/bulk/applicable_errata API is listing installable hosts
Description
Description of problem:
The following REST API is listing installable hosts but it should list applicable hosts.
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -u admin:redhat -d '{"included":{"ids":[<host id>]}}' https://satellite.example.com/api/v2/hosts/bulk/applicable_errata | jq
This is because both installable_errata and applicable_errata are calling the same partial "katello/api/v2/hosts_bulk_actions/erratum". See below:
$ cat installable_errata.json.rabl
object false
extends "katello/api/v2/common/metadata"
node :results do
partial("katello/api/v2/hosts_bulk_actions/erratum", :object => @collection[:results])
end
$ cat applicable_errata.json.rabl
object false
extends "katello/api/v2/common/metadata"
node :results do
partial("katello/api/v2/hosts_bulk_actions/erratum", :object => @collection[:results])
end
How reproducible:
Always
Is this issue a regression from an earlier version:
Not sure. Maybe not.
Updated by The Foreman Bot 2 months ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/11527 added
Updated by Quinn James about 2 months ago
- Target version changed from Katello 4.20.0 to Katello 4.19.0
- Triaged changed from No to Yes
Updated by The Foreman Bot about 2 months ago
- Fixed in Releases Katello 4.19.0 added
Updated by Anonymous about 2 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|0774dc1c757bca8e68cd7f902f789028a5d60174.