composite_content_view_ids field of a content_view_version is always empty
Description of problem:Assume the following setup:
Composite Content View "Capsule 6.3 with RHEL7 Server" with
- Content View "RHEL7"
- Content View "Tools 6.3 RHEL7"
- Content View "Capsule 6.3 RHEL7"
For some housekeeping, I'd like to remove old versions of "RHEL7" and "Capsule 6.3 RHEL7", which are not used by the CCV anymore.
To do so, I'd request all versions of said CVs (/katello/api/content_views/:content_view_id/content_view_versions) and delete all that have an empty composite_content_view_ids, assuming the version is not used by any CCV.
The field is also empty when looking at a specific version via /katello/api/content_view_versions/:content_view_version_id.
This worked fine in 6.2.z, but fails in 6.3.0, as composite_content_view_ids is always .hammer shows the info correctly:
- hammer content-view info --name "Capsule 6.3 with RHEL7 Server" --organization Sat6-CI
Name: Capsule 6.3 with RHEL7 Server
Content Host Count: 0
1) ID: 2
1) ID: 4365
Name: Capsule 6.3 RHEL7 248.0
2) ID: 4362
Name: Tools 6.3 RHEL7 247.0
3) ID: 4297
Name: RHEL7 18.0
And so does the API at /katello/api/content_views/:content_view_id in the "components" field.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create (and publish) a CV
2. create (and publish) a CCV that includes the CV from step 1
3. fetch /katello/api/content_views/:content_view_id/content_view_versions for the CV
composite_content_view_ids is empty
composite_content_view_ids shows that it's used in CCV
Fixes #25143: properly show composite ids in API
- Add fields published_in_composite_content_view_ids and
published_in_composite_content_views to show composite CVs that
a version is published in.
- Add composite_content_view_versions to the API output
- Rename 'katello_content_views' to 'composite_content_views'