Properly log request headers in metadata API
Properly log request headers in metadata API

Currently we log the request headers in the metadata
API in a useless form:

  DEBUG nova.api.metadata.handler [None \
  req-4b5eab00-e132-4551-b7f8-c80a238727a2 None None] \
  Metadata request headers: <webob.headers.EnvironHeaders object \
  at 0x7f2d6fdb5e90> {{(pid=9311) __call__ \
  /opt/stack/nova/nova/api/metadata/handler.py:99}}

This change builds a dict from the headers and then
also masks any sensitive information before logging it,
but only does this if debug logging is enabled.

Closes-Bug: #1808879

Change-Id: I609d96293f7e77f59df3f33240f5fc4bb72470d0

mahak/nova,openstack/nova,mikalstill/nova,klmitch/nova,klmitch/nova,rahulunair/nova,mikalstill/nova,rahulunair/nova,klmitch/nova,mahak/nova,mikalstill/nova,openstack/nova,mahak/nova,klmitch/nova,openstack/nova,rahulunair/nova