Display Curl commands in debugging messages
Legacy CLI clients of several services (python-novaclient,
python-swiftclient, python-
--debug flag, displaying the equivalent curl command of each API call,
as well as the response received. This is very convenient, since it
allows developers to replay these commands for testing/debugging
purpose, without the need to craft the requests by hand.
On the other hand, with its --debug and -v flags
python-
flag shows tracebacks on error, the -v flag displays many debugging
messages, but the equivalent curl commands of API calls nor messages
exchanged.
This blueprint suggests that we implement a mecanism similar to the
one implemented in legacy CLI clients, to display equivalent curl
commands, along with messages exchanged with the services whenever
python-
Example:
$ nova --debug endpoints
REQ: curl -i 'http://
"Content-Type: application/json" -H "Accept: application/json" -H
"User-Agent: python-novaclient" -d '{"auth": {"tenantName": "demo",
"passwordCreden
RESP: [200] {'date': 'Mon, 16 Dec 2013 10:09:04 GMT', 'content-type':
'application/json', 'content-length': '3939', 'vary': 'X-Auth-Token'}
RESP BODY: {...}
...
Blueprint information
- Status:
- Complete
- Approver:
- Dean Troyer
- Priority:
- Undefined
- Drafter:
- Florent Flament
- Direction:
- Needs approval
- Assignee:
- Florent Flament
- Definition:
- New
- Series goal:
- None
- Implementation:
- Implemented
- Milestone target:
- m3
- Started by
- Dean Troyer
- Completed by
- Dean Troyer
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
When using the -v option, displays curl equivalent commands and http messages exchanged with the nova API server. Displays the messages that are displayed with the --debug option of python-novaclient.