Bug 861409
Summary: | Pulpv2 does not provide total size and rpm count on sync | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Justin Sherrill <jsherril> |
Component: | user-experience | Assignee: | pulp-bugs |
Status: | CLOSED NOTABUG | QA Contact: | Preethi Thomas <pthomas> |
Severity: | unspecified | Docs Contact: | |
Priority: | low | ||
Version: | Master | CC: | cduryee, jason.dobies, jsherril, rbarlow, skarmark |
Target Milestone: | --- | Keywords: | Reopened, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-11-07 21:41:31 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 854726 |
Description
Justin Sherrill
2012-09-28 13:52:14 UTC
The total size of the repo is tricky. It's, oddly, due to the fact that the sync is more efficient in v2 since we know before starting the process what it is we need to download. What I could see is a new API outside of any plugin that would iterate over all associated units and sum up the file sizes. Putting this off to 2.2 to give us time to investigate that possibility. Assigning to Mike to handle with the yum importer rewrite. Talking just now, Justin indicated that it is sufficient for them to have the ability to query for this data. To get the size of each unit, a query can be done like this: POST path: /pulp/api/v2/repositories/<repo id>/search/units/ POST data: {"criteria": {"fields": {"unit": ["name", "size"], "association": []}, "type_ids": ["rpm"], "filters": {"unit": {}}}} You can of course just count the number of units you get back, or to get the counts of each unit type in a repo, do this query: POST path: /pulp/api/v2/repositories/search/ POST data: {'criteria': {'fields': ['name', 'content_unit_counts']}} Reopening for me to get some timings to see how performant this is with a larger number of repositories. closing BZ per jsherrill Removing Needinfo trying again |