Bug 1068633 - Response body of role creation call is different from role's retrieval call
Summary: Response body of role creation call is different from role's retrieval call
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: API/integration
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: pulp-bugs
QA Contact: pulp-qe-list
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-21 14:45 UTC by Ina Panova
Modified: 2015-02-28 22:03 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:03:06 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 401 0 None None None Never

Description Ina Panova 2014-02-21 14:45:53 UTC
Description of problem:
There is a discrepancy in the response body content in:
1) Role creation call
curl -H "Accept: application/json"  POST -k -u admin:admin  -d '{"role_id":"myrole"}' 'https://example.com/pulp/api/v2/roles/' | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   206  100   173  100    33    202     38 --:--:-- --:--:-- --:--:--   235
{
    "_href": "/pulp/api/v2/roles/myrole/", 
    "_id": {
        "$oid": "5307601b356cdf01fefdeeb6"
    }, 
    "_ns": "roles", 
    "description": null, 
    "display_name": "myrole", 
    "id": "myrole", 
    "permissions": {}

2) Retrieval of a single role:
$ curl -H "Accept: application/json" GET -k -u admin:admin  'https://example.com/pulp/api/v2/roles/myrole/' | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   186  100   186    0     0    192      0 --:--:-- --:--:-- --:--:--   228
{
    "_href": "/pulp/api/v2/roles/myrole/", 
    "_id": {
        "$oid": "5307601b356cdf01fefdeeb6"
    }, 
    "_ns": "roles", 
    "description": null, 
    "display_name": "myrole", 
    "id": "myrole", 
    "permissions": {}, 
    "users": []

In first case "user" field is missing, in the second case it is present.

Version-Release number of selected component (if applicable):

pulp-server-2.4.0-0.2.alpha.git.9.236d540.fc19.noarch
How reproducible:


Steps to Reproduce:
1.Create role
2.Retrieve that role
3.Compare results of the response body

Actual results:
response body of role creation call is different from response body of role retrieval 

Expected results:
response body of role creation and role retrieval should be the same

Additional info:

Comment 1 Brian Bouterse 2015-02-28 22:03:06 UTC
Moved to https://pulp.plan.io/issues/401


Note You need to log in before you can comment on or make changes to this bug.