[Pulp-list] pic changes
Jay Dobies
jason.dobies at redhat.com
Tue Jul 24 17:34:02 UTC 2012
Made two quick changes to pic:
- If you accidentally prefix the URL with /pulp/api, pic will no longer
duplicate it and make a bad request.
- By default, body logging is on. The idea is to have a standard
formatting (no unicode, consistent indentation) for request/response
capturing for the REST API docs. For example:
pic.POST('/pulp/api/v2/repo_groups/', {'id' : 'demo-group'})
Request Body
{
"id": "demo-group"
}
Response Body
{
"scratchpad": null,
"display_name": null,
"description": null,
"_ns": "repo_groups",
"notes": {},
"repo_ids": [],
"_id": {
"$oid": "500ed9888a905b04e9000021"
},
"id": "demo-group",
"_href": "/pulp/api/v2/repo_groups/demo-group/"
}
Out[6]:
(201,
{u'_href': u'/pulp/api/v2/repo_groups/demo-group/',
u'_id': {u'$oid': u'500ed9888a905b04e9000021'},
u'_ns': u'repo_groups',
u'description': None,
u'display_name': None,
u'id': u'demo-group',
u'notes': {},
u'repo_ids': [],
u'scratchpad': None})
To disable it, set LOG_BODIES to False in pic after you import it.
--
Jay Dobies
Freenode: jdob @ #pulp
http://pulpproject.org | http://blog.pulpproject.org
More information about the Pulp-list
mailing list