Bug 767635 - RFE: Errata - retrieving a count of errata within a given repo.
Summary: RFE: Errata - retrieving a count of errata within a given repo.
Keywords:
Status: CLOSED DUPLICATE of bug 1004623
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-14 15:17 UTC by Brad Buckingham
Modified: 2014-11-12 01:58 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-12 01:58:11 UTC


Attachments (Terms of Use)

Description Brad Buckingham 2011-12-14 15:17:52 UTC
Description of problem:

In katello, we provide the user with a list of errata filters that they may select to see the errata in a given category.  The filters supported include All, Critical, Important, Moderate, Low, Security, Bug Fix and Enhancement.  During a UI review, it was requested that we provide a count next to each filter to indicate the number of errata that would be displayed by that filter.

With the current Pulp APIs, the way to retrieve the count would be to retrieve the actual errata based on a filter and show only the count.  While that would work, it will not be efficient, because at this particular point, the user is only seeing the various filters that are available and not errata itself. 

While the initial issue was raised for Errata, it appears that the same issue could apply for other areas of the Pulp API as well (e.g. packages)

This bugzilla is to request an enhancement to the Pulp API to enable users to more efficiently retrieve counts for data such as the above.

Comment 86 Michael Hrivnak 2013-09-26 21:29:21 UTC
Is this still an issue?

Comment 87 Brad Buckingham 2013-09-27 11:36:22 UTC
Unfortunately, I am not sure if this is still an issue or not.  I haven't come across anything in the API docs (https://pulp-dev-guide.readthedocs.org/en/pulp-2.2/integration/rest-api/index.html) that indicate that it is possible to retrieve counts for a unit (e.g. errata, packages, package groups) for one or more repositories. Are you aware of any?

For Katello this was important because we needed to be able to provide the user with summary information, without actually retrieving all of the data.  In order to address that, the content has since been indexed in to elasticsearch so that it can be efficiently retrieved.  

So, for now, this is not an issue for Katello; however, other users might find it useful to retrieve that type information.

Comment 88 Chris Duryee 2014-11-12 01:58:11 UTC
This data appears to be returned now, as of pulp 2.4.x:

curl -k https://admin:admin@localhost/pulp/api/v2/repositories/ | python -mjson.tool

result:

<snip>
    {
        "_href": "/pulp/api/v2/repositories/f19/",
        "_id": {
            "$oid": "5462b900d1a0f5027cc3e52b"
        },
        "_ns": "repos",
        "content_unit_counts": {
            "distribution": 1,
            "package_category": 12,
            "package_environment": 12,
            "package_group": 100,
            "rpm": 3949
        },
        "description": null,
        "display_name": "f19",
        "id": "f19",
        "notes": {
            "_repo-type": "rpm-repo"
        }
    }
<snip>

I think at this point, this BZ is the same as docs bug #1004623. Marking as closed/duplicate.

*** This bug has been marked as a duplicate of bug 1004623 ***


Note You need to log in before you can comment on or make changes to this bug.