$ pulp-admin rpm repo create --repo-id=ideate --feed=file:///var/www/repositories/zoo5
Successfully created repository [ideate]
$ pulp-admin rpm repo sync run --repo-id=ideate
+----------------------------------------------------------------------+
Synchronizing Repository [ideate]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Downloading metadata...
[-]
==================================== Snip =====================================
===============================================================================
Task Succeeded
[root@ip-10-15-2-47 ~]# pulp-admin rpm repo content errata --repo-id=ideate
Description: Empty errata
Id: RHEA-2010:0001
Severity:
Summary:
Title: Empty errata
Type: security
Description: One package errata
Id: RHEA-2010:0002
Severity:
Summary:
Title: One package errata
Type: security
[root@ip-10-15-2-47 ~]# pulp-admin -vv rpm repo remove errata --repo-id=ideate --in='id=RHEA-2010:0002'
2016-03-03 05:50:40,446 - DEBUG - sending POST request to /pulp/api/v2/repositories/ideate/actions/unassociate/
2016-03-03 05:50:40,575 - INFO - POST request to /pulp/api/v2/repositories/ideate/actions/unassociate/ with parameters {"criteria": {"type_ids": ["erratum"], "filters": {"unit": {"id": {"$in": ["RHEA-2010:0002"]}}}}}
2016-03-03 05:50:40,575 - INFO - Response status : 202
2016-03-03 05:50:40,575 - INFO - Response body :
{
"spawned_tasks": [
{
"_href": "/pulp/api/v2/tasks/070593aa-969d-4107-bf0c-7e117f58fa35/",
"task_id": "070593aa-969d-4107-bf0c-7e117f58fa35"
}
],
"result": null,
"error": null
}
This command may be exited via ctrl+c without affecting the request.
[-]
Running...
2016-03-03 05:50:41,577 - DEBUG - sending GET request to /pulp/api/v2/tasks/070593aa-969d-4107-bf0c-7e117f58fa35/
2016-03-03 05:50:41,663 - INFO - GET request to /pulp/api/v2/tasks/070593aa-969d-4107-bf0c-7e117f58fa35/ with parameters None
2016-03-03 05:50:41,663 - INFO - Response status : 200
2016-03-03 05:50:41,664 - INFO - Response body :
{
"exception": null,
"task_type": "pulp.server.managers.repo.unit_association.unassociate_by_criteria",
"_href": "/pulp/api/v2/tasks/070593aa-969d-4107-bf0c-7e117f58fa35/",
"task_id": "070593aa-969d-4107-bf0c-7e117f58fa35",
"tags": [
"pulp:repository:ideate",
"pulp:action:unassociate"
],
"finish_time": "2016-03-03T10:50:40Z",
"_ns": "task_status",
"start_time": "2016-03-03T10:50:40Z",
"traceback": null,
"spawned_tasks": [],
"progress_report": {},
"queue": "reserved_resource_worker-1@host.dq",
"state": "finished",
"worker_name": "reserved_resource_worker-1@host.internal",
"result": {
"units_successful": [
{
"unit_key": {
"id": "RHEA-2010:0002"
},
"type_id": "erratum"
}
]
},
"error": null,
"_id": {
"$oid": "56d81700cbba263a6aedbbbe"
},
"id": "56d81700cbba263a6aedbbbe"
[\]
Running...
Units Removed:
RHEA-2010:0002
$ pulp-admin rpm repo content errata --repo-id=ideate
Description: Empty errata
Id: RHEA-2010:0001
Severity:
Summary:
Title: Empty errata
Type: security
unit association query uses model serializers
When building mongo queries, UnitAssociationQuery wasn't translating the incoming fields to their proper mongo fields via the model serializer.
To start, this change makes "public" the serializer translate methods that provide useful functionality when incoming criteria get broken down into their actual mongo queries.
Then, those public methods are used by UnitAssociationQuery to translate model fields before building queries to mongo.
https://pulp.plan.io/issues/1527 fixes #1527
https://pulp.plan.io/issues/1533 re #1533
https://pulp.plan.io/issues/1534 fixes #1534
https://pulp.plan.io/issues/1535 re #1535