Bug 854260
Summary: | RFE: Units should include associated list of repo_ids | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Justin Sherrill <jsherril> |
Component: | API/integration | Assignee: | Michael Hrivnak <mhrivnak> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.0.6 | CC: | skarmark |
Target Milestone: | --- | Keywords: | FutureFeature, Triaged |
Target Release: | Sprint 40 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-01-09 17:05:04 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-04 14:03:02 UTC
jdob has confirmed that we will limit this feature to the unit search API only. When you say limit this feature to the unit search api only, does this mean that I can still accomplish the two examples above? Querying by ID & Repo_id and getting the list of units, each containing repo_ids ? That should be "ID" or Repo_id Yes, although you have to include a unit_type_id as well (which is part of the URL). I think it's always (at least for V2) been the case that a unit is uniquely identified by a unit_id and unit_type_id. So I am just adding the feature to this search: http://pulp-rest-api.readthedocs.org/en/latest/content/retrieval.html I misspoke. You cannot use this method to search by repo_id. This method lets you search units based on their own attributes and display what repos they belong to. I do not believe we are planning to support a search for units within a repo that also shows what other repos those units belong to. If that is desired, you should probably ask jdob about it. Work for this was done here: https://github.com/pulp/pulp/pull/50 Documentation of the new feature is here: http://pulp-dev-guide.readthedocs.org/en/latest/rest-api/content/retrieval.html Look for the optional parameter "include_repos" You can test this by performing a search for content units with the REST API and including the "include_repos" argument in the POST data with some value that will evaluate as True. You should see an attribute on each returned document called "repository_memberships". verified [root@pulp-master ~]# rpm -qa pulp-rpm-server pulp-rpm-server-0.0.333-1.fc17.noarch [root@pulp-master ~]# curl -k -u admin:admin "https://localhost//pulp/api/v2/content/units/srpm/search/?field=id&field=display_name&limit=2&include_repos=repository_memberships=1" |json_reformat % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 366 100 366 0 0 1814 0 --:--:-- --:--:-- --:--:-- 1830 [ { "_id": "7646e8c6-2efb-4aee-b5cd-538b0431a20b", "_href": "/pulp/api/v2/content/units/srpm/7646e8c6-2efb-4aee-b5cd-538b0431a20b/", "children": { }, "repository_memberships": [ "srpm" ] }, { "_id": "61f31ad0-13dc-409e-9541-0938d975a074", "_href": "/pulp/api/v2/content/units/srpm/61f31ad0-13dc-409e-9541-0938d975a074/", "children": { }, "repository_memberships": [ "srpm" ] } ] [root@pulp-master ~]# Pulp v2.0 released |