Bug #19057

Need to address Inconsistent Json between product content jsons

Added by Partha Aji 6 months ago. Updated 6 months ago.

Status:Closed
Priority:Normal
Assigned To:Partha Aji
Category:Hosts
Target version:Team Tom - iteration 11
Difficulty: Pull request:https://github.com/Katello/katello/pull/6706
Bugzilla link:
Story points-
Velocity based estimate-
ReleaseKatello 3.4.0Release relationshipAuto

Description

Note:
https://github.com/Katello/katello/blob/master/app/views/katello/api/v2/activation_keys/product_content.json.rabl#L19 calls content overrides as overrides while
https://github.com/Katello/katello/blob/master/app/views/katello/api/v2/host_subscriptions/product_content.json.rabl#L15
calls the same as "content_overrides"

More over the bigger issue is that product content for host subs prints just one value for content overrides . This is because https://github.com/Katello/katello/blob/master/app/presenters/katello/product_content_presenter.rb#L21 does a

overrides.find { |pc| pc.content_label == content.label }

instead of
overrides.select { |pc| pc.content_label == content.label }


Related issues

Copied from Katello - Feature #18859: Need API's to content overrides for single host Closed 03/02/2017

Associated revisions

Revision 218d4db8
Added by Partha Aji 6 months ago

fixes #19057 - Consistent ProductContent json labeling

After merging https://github.com/Katello/katello/pull/6667 I noticed
there was an inconsistency between the product content jsons
for host subs and ak subs. I also noticed that the
content overrides value instead of returning an array
of overrides was just returning one override. This
commit tries to address that

History

#1 Updated by Partha Aji 6 months ago

  • Copied from Feature #18859: Need API's to content overrides for single host added

#2 Updated by The Foreman Bot 6 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6706 added

#3 Updated by Partha Aji 6 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF