Bug 697872
Summary: | RFE: add a call to remove packages from repos | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Daniel Mach <dmach> |
Component: | z_other | Assignee: | John Matthews <jmatthew> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | unspecified | CC: | jmatthew, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | Sprint 23 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-08-16 12:11:19 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: | 563609, 647488 |
Description
Daniel Mach
2011-04-19 14:18:57 UTC
Added service_api.disassociate_packages() which does the opposite behavior of service_api.associate_packages() Takes in same arguments as service_api.associate_packages(). Note: both of these calls, service_api.associate_packages() and service_api.disassociate_packages() will return an empty list on success. If one of the items was not able to be processed then that item will be returned. Error format is: [{'filename':{'checksum_value':[repoid]}}] QE: This call is a WebService API call and in the Client API we expose, but it is not in pulp-admin/pulp-client. Below I provide a script under plulp/playpen to test the call. Suggestion for testing 1) Do a local sync of a dir on disk with rpms. 2) Create a csv file of prev synced rpms so we can associate them to a new repo Run: pulp/playpen/api/generate_csv.py -o $PATH_TO_RPMS -d test_bz697872.csv 3) Create an empty repo: sudo pulp-admin repo create --id test_bz697872 4) Associate test packages to this repo: pulp/playpen/api/package_associate.py ./test_bz697872.csv test_bz697872 5) Verify content has been associated: sudo pulp-admin content list --repoid test_bz697872 6) Test Disassociate: pulp/playpen/api/package_disassociate.py ./test_bz697872.csv test_bz697872 7) Verify content has been disassociated Commit: http://git.fedorahosted.org/git/?p=pulp.git;a=commitdiff;h=b19f5194a8d89fad876e3585d2383ab65c9617ab build: 0.176 [root@preethi ~]# rpm -q pulp pulp-0.0.186-1.fc14.noarch [root@preethi ~]# pulp-admin repo create --id=local_1 --feed=file:///tmp/my_rpms/ Successfully created repository [ local_1 ] [root@preethi ~]# pulp-admin repo sync --id=local_1 -F Sync for repository local_1 started Sync: Finished 3/3 new items downloaded 0/3 existing items processed Item Details: Rpms: 3/3 [root@preethi ~]# pulp/playpen/api/generate_csv.py -d /tmp/my_rpms/ -o test_bz697872.csv Will read /tmp/my_rpms/ and write to test_bz697872.csv Processed 3 rpms. [root@preethi ~]# cat test_bz697872.csv /tmp/my_rpms/pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm,a234230b4adac9e1990492b76c706b4d7fcfe8a17fdc959b6672a3447e4f94f6 /tmp/my_rpms/pulp-large_1mb_test-packageB-0.1.1-1.fc14.noarch.rpm,8a4d6ac36824405c193a764d1babd608374596655a604c49ec308de946c56d5a /tmp/my_rpms/pulp-large_1mb_test-packageC-0.1.1-1.fc14.noarch.rpm,7b6d84f97ec0e6917f7a4cc3f14e1db7c8df6d1c14dcc3c528de5ba73cd1fb74 [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# pulp-admin repo create --id test_bz697872 Successfully created repository [ test_bz697872 ] [root@preethi ~]# pulp/playpen/api/package_associate.py ./test_bz697872.csv test_bz697872 Success, no errors occurred [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# pulp-admin content list --repoid test_bz697872 pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm,a234230b4adac9e1990492b76c706b4d7fcfe8a17fdc959b6672a3447e4f94f6 pulp-large_1mb_test-packageB-0.1.1-1.fc14.noarch.rpm,8a4d6ac36824405c193a764d1babd608374596655a604c49ec308de946c56d5a pulp-large_1mb_test-packageC-0.1.1-1.fc14.noarch.rpm,7b6d84f97ec0e6917f7a4cc3f14e1db7c8df6d1c14dcc3c528de5ba73cd1fb74 [root@preethi ~]# pulp/playpen/api/package_disassociate.py ./test_bz697872.csv test_bz697872 Success, no errors occurred [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# pulp-admin content list --repoid test_bz697872No content in the repo [test_bz697872] [root@preethi ~]# Closing with Community Release 15 pulp-0.0.223-4. Closing with Community Release 15 pulp-0.0.223-4. |