Skip to content

Commit

Permalink
Log Content-Type/Accept API request info
Browse files Browse the repository at this point in the history
Also remove an unused content type mapping dictionary.

Change-Id: I5af1357b614b50af4a842151b8c0d652a84e7ec6
  • Loading branch information
comstud committed Mar 11, 2014
1 parent 556ab84 commit 2ebc832
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions nova/api/openstack/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@

LOG = logging.getLogger(__name__)

# The vendor content types should serialize identically to the non-vendor
# content types. So to avoid littering the code with both options, we
# map the vendor to the other when looking up the type
_CONTENT_TYPE_MAP = {
'application/vnd.openstack.compute+json': 'application/json',
'application/vnd.openstack.compute+xml': 'application/xml',
}

SUPPORTED_CONTENT_TYPES = (
'application/json',
'application/vnd.openstack.compute+json',
Expand Down Expand Up @@ -946,7 +938,11 @@ def _process_stack(self, request, action, action_args,
"%(body)s") % {'action': action,
'body': unicode(body, 'utf-8')}
LOG.debug(logging.mask_password(msg))
LOG.debug(_("Calling method %s") % str(meth))
LOG.debug(_("Calling method '%(meth)s' (Content-type='%(ctype)s', "
"Accept='%(accept)s')"),
{'meth': str(meth),
'ctype': content_type,
'accept': accept})

# Now, deserialize the request body...
try:
Expand Down

0 comments on commit 2ebc832

Please sign in to comment.