Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.14.z] Add missing counts provided by CVV endpoint #1020

Conversation

Satellite-QE
Copy link
Contributor

Cherrypick of PR: #1019

Description of changes

GET /katello/api/content_view_versions/:id returns more fields than we collected. This PR just adds those content-counts related.

Functional demonstration
$ curl -sku admin:changeme https://satellite.redhat.com/katello/api/content_view_versions/34 | jq | grep count
      "host_count": 0,
      "activation_key_count": 0
      "host_count": 0,
      "activation_key_count": 1
  "ansible_collection_count": 2,
  "docker_manifest_count": 152,
  "docker_manifest_list_count": 18,
  "docker_tag_count": 24,
  "file_count": 3,
  "rpm_count": 36,
  "modulemd_count": 7,
  "erratum_count": 6,
  "package_group_count": 2,
  "srpm_count": 0,
  "module_stream_count": 7,
  "package_count": 36,
  "component_view_count": 0,
  "ansible_collection_repository_count": 1,
  "docker_repository_count": 1,
  "file_repository_count": 1,
  "yum_repository_count": 1,
  "errata_counts": {
In [1]: from robottelo.hosts import Satellite
In [2]: sat = Satellite('satellite.redhat.com')
In [3]: sat.api.ContentViewVersion(id=34).read()
Out[4]: robottelo.hosts.DecClass(ansible_collection_count=2, ansible_collection_repository_count=1, docker_manifest_count=152, docker_manifest_list_count=18, docker_repository_count=1, docker_tag_count=24, component_view_count=0, content_view=nailgun.entities.ContentView(id=32), description=None, environment=[nailgun.entities.LifecycleEnvironment(id=31), nailgun.entities.LifecycleEnvironment(id=32)], errata_counts={'security': 3, 'bugfix': 0, 'enhancement': 3, 'total': 6}, file_count=3, file_repository_count=1, filters_applied=False, major=1, minor=0, module_stream_count=7, name='dalJwSyFhP 1.0', package_count=36, package_group_count=2, repository=[nailgun.entities.Repository(id=158), nailgun.entities.Repository(id=160), nailgun.entities.Repository(id=159), nailgun.entities.Repository(id=161)], srpm_count=0, version='1.0', yum_repository_count=1, id=34)
Additional info

I can see the same fields returned from 6.14, so adding 6.14.z flag, although I don't plan to use in 6.14.

@Satellite-QE Satellite-QE added 6.14.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches labels Oct 25, 2023
@Gauravtalreja1 Gauravtalreja1 merged commit a93652c into 6.14.z Oct 25, 2023
14 of 17 checks passed
@Gauravtalreja1 Gauravtalreja1 deleted the cherry-pick-6.14.z-cf4ee07b826b4f4cba0c0ce5c91c664f0a009bd7 branch October 25, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants