The debug flag should print request and response

Registered by Limor Stotland

The requests and response (include body) and the authentication should be printed when a use use the debug flag ( like any other openstack service )
for example :
mistral execution-list --limit 5
DEBUG (session) REQ: curl -g -i -X GET http://10.1.20.5:35357/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
INFO (connectionpool) Starting new HTTP connection (1): 10.1.20.5
DEBUG (connectionpool) "GET /v2.0 HTTP/1.1" 200 336
DEBUG (session) RESP: [200] date: Tue, 17 Nov 2015 12:42:44 GMT vary: X-Auth-Token content-length: 336 content-type: application/json x-openstack-request-id: req-cdb2126a-c7b6-40fa-8cab-8c986ff2c70b
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://10.1.20.5:35357/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}}

DEBUG (v2) Making authentication request to http://10.1.20.5:35357/v2.0/tokens
DEBUG (connectionpool) "POST /v2.0/tokens HTTP/1.1" 200 4626
DEBUG (httpclient) HTTP GET http://10.43.20.5:8989/v2/executions?sort_keys=created_at&limit=1&sort_dirs=asc
DEBUG (session) RESP: [200] date: Tue, 17 Nov 2015 12:42:44 GMT content-length: 14 content-type: application/json; charset=UTF-8 x-openstack-request-id: req-2c436292-3094-4859-a012-32a01c2c3799
RESP BODY:
{
  "next": "http://10.20.60.5:8989/v2/executions?sort_keys=created_at&sort_dirs=desc&limit=1&marker=37498d6c-4203-429a-8a93-8f42cc7a0eb8",
  "executions": [
    {
      "state_info": "Failure caused by error in task 'delete_vm': Failed to run action [action_ex_id=b4806f25-9c6f-46bb-9f34-7234bf22ba24, action_cls='<class 'mistral.actions.action_factory.NovaAction'>', attributes='{u'client_method_name': u'servers.delete'}', params='{u'server': u'123'}']\n NovaAction.servers.delete failed: <class 'novaclient.exceptions.NotFound'>: Instance 123 could not be found.",
      "created_at": "2015-11-17 12:31:36",
      "description": "",
      "workflow_name": "std.delete_instance",
      "updated_at": "2015-11-17 12:31:58",
      "state": "ERROR",
      "params": "{}",
      "output": "{}",
      "input": "{\"instance_id\": \"123\"}",
      "id": "37498d6c-4203-429a-8a93-8f42cc7a0eb8"
    }
  ]
}

Blueprint information

Status:
Complete
Approver:
Renat Akhmerov
Priority:
Medium
Drafter:
Limor Stotland
Direction:
Approved
Assignee:
Sharat Sharma
Definition:
Superseded
Series goal:
Accepted for ocata
Implementation:
Not started
Milestone target:
None
Completed by
Renat Akhmerov

Related branches

Sprints

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.