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

Add missing counts provided by CVV endpoint #1019

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

vsedmik
Copy link
Contributor

@vsedmik vsedmik commented Oct 24, 2023

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.

@vsedmik vsedmik added fields CherryPick PR needs CherryPick to previous branches 6.14.z labels Oct 24, 2023
@vsedmik vsedmik self-assigned this Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0a9a19d) 92.15% compared to head (32e4010) 92.15%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1019   +/-   ##
=======================================
  Coverage   92.15%   92.15%           
=======================================
  Files           6        6           
  Lines        3047     3047           
=======================================
  Hits         2808     2808           
  Misses        239      239           
Files Coverage Δ
nailgun/entities.py 91.30% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Gauravtalreja1 Gauravtalreja1 merged commit cf4ee07 into SatelliteQE:master Oct 25, 2023
17 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 25, 2023
Gauravtalreja1 pushed a commit that referenced this pull request Oct 25, 2023
(cherry picked from commit cf4ee07)

Co-authored-by: vsedmik <46570670+vsedmik@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.14.z CherryPick PR needs CherryPick to previous branches fields
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants