Bug 670284
| Summary: | [RFE] Add an option to package group queries to restrict to packages available on server. | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | John Matthews <jmatthew> |
| Component: | z_other | Assignee: | John Matthews <jmatthew> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | unspecified | CC: | jprovazn, skarmark, tsanders |
| Target Milestone: | --- | Keywords: | FutureFeature, Triaged |
| Target Release: | Sprint 23 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-15 15:14:45 UTC | Type: | --- |
| 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: | 647488, 673012 | ||
|
Description
John Matthews
2011-01-17 19:17:54 UTC
Jan, Would you please review this BZ and add any notes of what you require? Thanks, John Hi, I think description is correct, implementation as an option sounds good. In Conductor we have sw selection UI similar to gpk-application, so when user selects group (group of groups in fact) in the left panel, conductor fetches packagegroups for this group. In retrieved package list are listed packages which are not in repository (for example package 'silo' in 'coreutils' group). When user selects this package, image building fails because of missing package. Only workaround for now is to fetch all packages (very slow query) to filter only existing pkgs, so filtering on pulp side will be very helpful. We have modified the package group call on the repositories controller. The call takes in 2 optional parameters "filter_missing_packages" and/or "filter_incomplete_groups". Webservice call: title: Repository Package Groups description: Get the package groups in the repositories. method: GET path: /repositories/<repository id>/packagegroups/ permission: READ success response: 200 OK failure response: 404 Not Found if the id does not match a repository return: list of package group names filters: * filter_missing_packages, bool, True means to filter results to remove missing package names * filter_incomplete_groups, bool, True means to filter results to remove groups with missing packages "filter_missing_packages" will return the groups information minus any package names that are not part of this repository. "filter_incomplete_groups" will return only those groups that all packages listed are in the repository. (If a group has a package not in the repo, then this group will not be returned in the result). Commit: http://git.fedorahosted.org/g it/?p=pulp.git;a=commitdiff;h=433ded7cc9b63e41aeee808eb3df422d2e2d2309 QE: Example from pulp-admin using the "-f/--filter" option. Create two groups. On first group add a package that exists in the repo On second group add a package that exists in the repo AND a package name that is made up (not part of the repo) To test: "filter_missing_packages" you will need to look at 'packagegroup info' on a specific group sudo pulp-admin packagegroup info --repoid test_repo --id jwm_group -f This should only return package names that are part of the repo To test: "filter_incomplete_groups" you would run: sudo pulp-admin packagegroup list --repoid test_repo -f This should only return the first packagegroup, the one that all package names listed are part of the repo. AND: sudo pulp-admin packagegroup list --repoid test_repo This should return both packagegroups build: 0.176 verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.213-1.fc14.noarch
[root@preethi ~]# pulp-admin packagegroup add_package --id=grp1 -r pulp -n pulp
Following packages added to group [grp1] in repository [pulp]:
['pulp']
[root@preethi ~]#
[root@preethi ~]#
[root@preethi ~]# pulp-admin packagegroup add_package --id=grp2 -r pulp -n pulp-client
Following packages added to group [grp2] in repository [pulp]:
['pulp-client']
[root@preethi ~]# pulp-admin packagegroup add_package --id=grp2 -r pulp -n no-package
Following packages added to group [grp2] in repository [pulp]:
['no-package']
[root@preethi ~]# pulp-admin packagegroup info --id=grp1 -r pulp -n pulpUsage: pulp-admin <options> packagegroup info <options>
pulp-admin: error: no such option: -n
[root@preethi ~]# pulp-admin packagegroup info --id=grp1 -r pulp -f
+------------------------------------------+
Package Group Information
+------------------------------------------+
Name grp1
Id grp1
Mandatory packages []
Default packages ['pulp']
Optional packages []
Conditional packages {}
[root@preethi ~]# pulp-admin packagegroup info -r pulp -f
Usage: pulp-admin <options> packagegroup info <options>
pulp-admin: error: Option --id is required; please see --help
[root@preethi ~]# pulp-admin packagegroup list -r pulp -f
+------------------------------------------+
Repository: pulp
Package Group Information
+------------------------------------------+
grp1
[root@preethi ~]# pulp-admin packagegroup list -r pulp
+------------------------------------------+
Repository: pulp
Package Group Information
+------------------------------------------+
grp1
grp2
Closing with current community release pulp-0.0.223 |