Project

General

Profile

Bug #19057

Need to address Inconsistent Json between product content jsons

Added by Partha Aji over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

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 hostClosed2017-03-02

Associated revisions

Revision 218d4db8 (diff)
Added by Partha Aji over 2 years 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 over 2 years ago

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

#2 Updated by The Foreman Bot over 2 years ago

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

#3 Updated by Partha Aji over 2 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF