In pulp v1, package_install on a consumer group would return (http://www.pulpproject.org/ug/UGREST-ConsumerGroups.html#InstallPackages) { "tasks": [<list of tasks with a consumer_id attached>], "id": "c48c1467-841f-41b6-a1d5-2dbd3c638ef9" } In pulp v2 beta, this call does not return a list of tasks or a job id. POST Via RestClient.post "https://<fqdn>/pulp/api/v2/consumer_groups/ACME_Corporation-boo-ecf84e1d/actions/content/install//", "{\"units\":[{\"unit_key\":{\"name\":\"fooo\"},\"type_id\":\"rpm\"}],\"options\":{}}", "Accept"=>"application/json", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"OAuth oauth_body_hash=\"2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D\", oauth_consumer_key=\"katello\", oauth_nonce=\"MHTLoIBXqxXy7u41GdCotImBjaBVhCpH6c7Kyo8knSw\", oauth_signature=\"rmlK5fLS8Jfgq7jdpkDmTLUhirE%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1353353738\", oauth_version=\"1.0\"", "Content-Length"=>"76", "Content-Type"=>"application/json", "pulp-user"=>"admin" expected { "tasks": [<list of tasks with a consumer_id attached>], "id": "c48c1467-841f-41b6-a1d5-2dbd3c638ef9" } actual {one task id}
Added functionality to record and return a list of install call requests.
Merged pull request. Moving to modified. commit 198860b602099adf553e745cd11dccf28ee5573b Merge: 373ee00 d1c0562 Author: skarmark <skarmark> Date: Tue Feb 5 01:06:42 2013 -0800 Merge pull request #264 from pulp/skarmark-878234 878234 - added consumer group itineraries and updated group content install apis to return a list of call requests, also added unit tests
build: 2.1.0-0.3.alpha
Preethi, for testing you should use - Rest URI : https://<server_name>/pulp/api/v2/consumer_groups/<group-id>/actions/content/<install/update/uninstall>/ Example body: {'units':[{'unit_key':{'name':<package_name>},'type_id':'rpm'}], 'options':{} } Expected return value: list of tasks for each consumer in the group
https://github.com/pulp/pulp/pull/498
build: 2.1.2-0.1.beta
2013-05-29 20:49:05,701 - INFO - POST request to /pulp/api/v2/consumer_groups/consumer-grp/actions/content/install/ with parameters {"units": [{"unit_key": {"name": "camel"}, "type_id": "rpm"}], "options": {"apply": true, "reboot": false, "importkeys": false}} 2013-05-29 20:49:05,702 - INFO - Response status : 202 2013-05-29 20:49:05,702 - INFO - Response body : [ { "task_group_id": "f544ab9a-7c44-4ae6-be92-b78e634a7048", "call_request_id": "bff99433-82b7-4264-8173-68f021ef5e2b", "exception": null, "_href": "/pulp/api/v2/task_groups/f544ab9a-7c44-4ae6-be92-b78e634a7048/", "task_id": "bff99433-82b7-4264-8173-68f021ef5e2b", "call_request_tags": [ "pulp:consumer:alicia", "pulp:action:unit_install" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "f544ab9a-7c44-4ae6-be92-b78e634a7048", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:alicia", "pulp:action:unit_install" ] }, { "task_group_id": "f544ab9a-7c44-4ae6-be92-b78e634a7048", "call_request_id": "f85e65eb-09ed-42e3-8601-dad01bd9c88c", "exception": null, "_href": "/pulp/api/v2/task_groups/f544ab9a-7c44-4ae6-be92-b78e634a7048/", "task_id": "f85e65eb-09ed-42e3-8601-dad01bd9c88c", "call_request_tags": [ "pulp:consumer:anna", "pulp:action:unit_install" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "f544ab9a-7c44-4ae6-be92-b78e634a7048", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:anna", "pulp:action:unit_install" ] } ]
Install >>> pic.POST('/v2/consumer_groups/consumer-grp/actions/content/install/',body={'units':[{'unit_key':{'name':'bear'},'type_id':'rpm'}], 'options':{} }) Request Body { "units": [ { "unit_key": { "name": "bear" }, "type_id": "rpm" } ], "options": {} } Response Body [ { "task_group_id": "7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4", "call_request_id": "1437f0be-4e7c-4a13-ac63-949fd02be28a", "exception": null, "_href": "/pulp/api/v2/task_groups/7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4/", "task_id": "1437f0be-4e7c-4a13-ac63-949fd02be28a", "call_request_tags": [ "pulp:consumer:alicia", "pulp:action:unit_install" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:alicia", "pulp:action:unit_install" ] }, { "task_group_id": "7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4", "call_request_id": "320bde47-d2ee-451b-a0ac-a71dd0b59864", "exception": null, "_href": "/pulp/api/v2/task_groups/7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4/", "task_id": "320bde47-d2ee-451b-a0ac-a71dd0b59864", "call_request_tags": [ "pulp:consumer:anna", "pulp:action:unit_install" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:anna", "pulp:action:unit_install" ] } ] (202, [{u'task_group_id': u'7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4', u'call_request_id': u'1437f0be-4e7c-4a13-ac63-949fd02be28a', u'exception': None, u'_href': u'/pulp/api/v2/task_groups/7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4/', u'task_id': u'1437f0be-4e7c-4a13-ac63-949fd02be28a', u'call_request_tags': [u'pulp:consumer:alicia', u'pulp:action:unit_install'], u'reasons': [], u'start_time': None, u'traceback': None, u'schedule_id': None, u'finish_time': None, u'state': u'waiting', u'result': None, u'dependency_failures': {}, u'call_request_group_id': u'7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4', u'progress': {}, u'principal_login': u'admin', u'response': u'accepted', u'tags': [u'pulp:consumer:alicia', u'pulp:action:unit_install']}, {u'task_group_id': u'7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4', u'call_request_id': u'320bde47-d2ee-451b-a0ac-a71dd0b59864', u'exception': None, u'_href': u'/pulp/api/v2/task_groups/7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4/', u'task_id': u'320bde47-d2ee-451b-a0ac-a71dd0b59864', u'call_request_tags': [u'pulp:consumer:anna', u'pulp:action:unit_install'], u'reasons': [], u'start_time': None, u'traceback': None, u'schedule_id': None, u'finish_time': None, u'state': u'waiting', u'result': None, u'dependency_failures': {}, u'call_request_group_id': u'7c2cf4e0-46d8-42a9-a3fa-5ee2012baee4', u'progress': {}, u'principal_login': u'admin', u'response': u'accepted', u'tags': [u'pulp:consumer:anna', u'pulp:action:unit_install']}]) >>>
update pic.POST('/v2/consumer_groups/consumer-grp/actions/content/update/',body={'units':[{'unit_key':{'name':'walrus'},'type_id':'rpm'}], 'options':{} }) Request Body { "units": [ { "unit_key": { "name": "walrus" }, "type_id": "rpm" } ], "options": {} } Response Body [ { "task_group_id": "a19376ab-7147-4b4d-8d40-88c6a38730f2", "call_request_id": "8e43981b-92e8-4cef-b09d-f64116738285", "exception": null, "_href": "/pulp/api/v2/task_groups/a19376ab-7147-4b4d-8d40-88c6a38730f2/", "task_id": "8e43981b-92e8-4cef-b09d-f64116738285", "call_request_tags": [ "pulp:consumer:anna", "pulp:action:unit_update" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "a19376ab-7147-4b4d-8d40-88c6a38730f2", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:anna", "pulp:action:unit_update" ] }, { "task_group_id": "a19376ab-7147-4b4d-8d40-88c6a38730f2", "call_request_id": "f965fe85-f38a-43e8-b8a7-972005ac7c0f", "exception": null, "_href": "/pulp/api/v2/task_groups/a19376ab-7147-4b4d-8d40-88c6a38730f2/", "task_id": "f965fe85-f38a-43e8-b8a7-972005ac7c0f", "call_request_tags": [ "pulp:consumer:alicia", "pulp:action:unit_update" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "a19376ab-7147-4b4d-8d40-88c6a38730f2", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:alicia", "pulp:action:unit_update" ] } ] (202, [{u'task_group_id': u'a19376ab-7147-4b4d-8d40-88c6a38730f2', u'call_request_id': u'8e43981b-92e8-4cef-b09d-f64116738285', u'exception': None, u'_href': u'/pulp/api/v2/task_groups/a19376ab-7147-4b4d-8d40-88c6a38730f2/', u'task_id': u'8e43981b-92e8-4cef-b09d-f64116738285', u'call_request_tags': [u'pulp:consumer:anna', u'pulp:action:unit_update'], u'reasons': [], u'start_time': None, u'traceback': None, u'schedule_id': None, u'finish_time': None, u'state': u'waiting', u'result': None, u'dependency_failures': {}, u'call_request_group_id': u'a19376ab-7147-4b4d-8d40-88c6a38730f2', u'progress': {}, u'principal_login': u'admin', u'response': u'accepted', u'tags': [u'pulp:consumer:anna', u'pulp:action:unit_update']}, {u'task_group_id': u'a19376ab-7147-4b4d-8d40-88c6a38730f2', u'call_request_id': u'f965fe85-f38a-43e8-b8a7-972005ac7c0f', u'exception': None, u'_href': u'/pulp/api/v2/task_groups/a19376ab-7147-4b4d-8d40-88c6a38730f2/', u'task_id': u'f965fe85-f38a-43e8-b8a7-972005ac7c0f', u'call_request_tags': [u'pulp:consumer:alicia', u'pulp:action:unit_update'], u'reasons': [], u'start_time': None, u'traceback': None, u'schedule_id': None, u'finish_time': None, u'state': u'waiting', u'result': None, u'dependency_failures': {}, u'call_request_group_id': u'a19376ab-7147-4b4d-8d40-88c6a38730f2', u'progress': {}, u'principal_login': u'admin', u'response': u'accepted', u'tags': [u'pulp:consumer:alicia', u'pulp:action:unit_update']}]) >>> [root@cloud-qe-1 ~]# rpm -q walrus walrus-0.71-1.noarch [root@cloud-qe-1 ~]# rpm -q walrus walrus-5.21-1.noarch [root@cloud-qe-1 ~]#
Uninstall >>> pic.POST('/v2/consumer_groups/consumer-grp/actions/content/uninstall/',body={'units':[{'unit_key':{'name':'walrus'},'type_id':'rpm'}], 'options':{} }) Request Body { "units": [ { "unit_key": { "name": "walrus" }, "type_id": "rpm" } ], "options": {} } Response Body [ { "task_group_id": "fde8d79e-8ddb-4e1d-a50e-b279554e44c9", "call_request_id": "ca6b8688-8c0f-4447-a5d1-6f51829c9dd2", "exception": null, "_href": "/pulp/api/v2/task_groups/fde8d79e-8ddb-4e1d-a50e-b279554e44c9/", "task_id": "ca6b8688-8c0f-4447-a5d1-6f51829c9dd2", "call_request_tags": [ "pulp:consumer:anna", "pulp:action:unit_uninstall" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "fde8d79e-8ddb-4e1d-a50e-b279554e44c9", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:anna", "pulp:action:unit_uninstall" ] }, { "task_group_id": "fde8d79e-8ddb-4e1d-a50e-b279554e44c9", "call_request_id": "5a2506ba-db06-47c5-9132-15e41fa61038", "exception": null, "_href": "/pulp/api/v2/task_groups/fde8d79e-8ddb-4e1d-a50e-b279554e44c9/", "task_id": "5a2506ba-db06-47c5-9132-15e41fa61038", "call_request_tags": [ "pulp:consumer:alicia", "pulp:action:unit_uninstall" ], "reasons": [], "start_time": null, "traceback": null, "schedule_id": null, "finish_time": null, "state": "waiting", "result": null, "dependency_failures": {}, "call_request_group_id": "fde8d79e-8ddb-4e1d-a50e-b279554e44c9", "progress": {}, "principal_login": "admin", "response": "accepted", "tags": [ "pulp:consumer:alicia", "pulp:action:unit_uninstall" ] } ] (202, [{u'task_group_id': u'fde8d79e-8ddb-4e1d-a50e-b279554e44c9', u'call_request_id': u'ca6b8688-8c0f-4447-a5d1-6f51829c9dd2', u'exception': None, u'_href': u'/pulp/api/v2/task_groups/fde8d79e-8ddb-4e1d-a50e-b279554e44c9/', u'task_id': u'ca6b8688-8c0f-4447-a5d1-6f51829c9dd2', u'call_request_tags': [u'pulp:consumer:anna', u'pulp:action:unit_uninstall'], u'reasons': [], u'start_time': None, u'traceback': None, u'schedule_id': None, u'finish_time': None, u'state': u'waiting', u'result': None, u'dependency_failures': {}, u'call_request_group_id': u'fde8d79e-8ddb-4e1d-a50e-b279554e44c9', u'progress': {}, u'principal_login': u'admin', u'response': u'accepted', u'tags': [u'pulp:consumer:anna', u'pulp:action:unit_uninstall']}, {u'task_group_id': u'fde8d79e-8ddb-4e1d-a50e-b279554e44c9', u'call_request_id': u'5a2506ba-db06-47c5-9132-15e41fa61038', u'exception': None, u'_href': u'/pulp/api/v2/task_groups/fde8d79e-8ddb-4e1d-a50e-b279554e44c9/', u'task_id': u'5a2506ba-db06-47c5-9132-15e41fa61038', u'call_request_tags': [u'pulp:consumer:alicia', u'pulp:action:unit_uninstall'], u'reasons': [], u'start_time': None, u'traceback': None, u'schedule_id': None, u'finish_time': None, u'state': u'waiting', u'result': None, u'dependency_failures': {}, u'call_request_group_id': u'fde8d79e-8ddb-4e1d-a50e-b279554e44c9', u'progress': {}, u'principal_login': u'admin', u'response': u'accepted', u'tags': [u'pulp:consumer:alicia', u'pulp:action:unit_uninstall']}]) >>>
Comments above shows package install/update/uninstall on consumer group. Moving the bug to verified [root@ibm-x3550m3-09 ~]# rpm -q pulp-server pulp-server-2.1.2-0.1.beta.el6.noarch [root@ibm-x3550m3-09 ~]#
2.2 released http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/