Improve debug readability
- Pretty print data returned, so humans can read them. - Cosmetic fixes.
This commit is contained in:
parent
45fdc2819e
commit
92d4aa880a
@ -205,9 +205,6 @@ class RedfishConnection(object):
|
|||||||
"this is insecure and can allow" +
|
"this is insecure and can allow" +
|
||||||
" a man in the middle attack")
|
" a man in the middle attack")
|
||||||
|
|
||||||
# Show redfish standard headers
|
|
||||||
config.logger.debug(self.connection_parameters.headers)
|
|
||||||
|
|
||||||
config.logger.debug("Root url : %s",
|
config.logger.debug("Root url : %s",
|
||||||
self.connection_parameters.rooturl)
|
self.connection_parameters.rooturl)
|
||||||
self.Root = types.Root(self.connection_parameters.rooturl,
|
self.Root = types.Root(self.connection_parameters.rooturl,
|
||||||
|
@ -32,7 +32,12 @@ class Base(object):
|
|||||||
self.url = url
|
self.url = url
|
||||||
self.api_url = tortilla.wrap(url, debug=config.TORTILLADEBUG)
|
self.api_url = tortilla.wrap(url, debug=config.TORTILLADEBUG)
|
||||||
|
|
||||||
config.logger.debug(connection_parameters.headers)
|
config.logger.debug(
|
||||||
|
"------------------------------------------------------------")
|
||||||
|
config.logger.debug("Url: %s" % url)
|
||||||
|
config.logger.debug("Header: %s" % connection_parameters.headers)
|
||||||
|
config.logger.debug(
|
||||||
|
"------------------------------------------------------------")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.data = self.api_url.get(
|
self.data = self.api_url.get(
|
||||||
@ -50,7 +55,7 @@ class Base(object):
|
|||||||
'Ivalid content : Content does not appear to be a valid ' + \
|
'Ivalid content : Content does not appear to be a valid ' + \
|
||||||
'Redfish json\n'
|
'Redfish json\n'
|
||||||
raise exception.InvalidRedfishContentException(msg)
|
raise exception.InvalidRedfishContentException(msg)
|
||||||
config.logger.debug(self.data)
|
config.logger.debug(pprint.PrettyPrinter(indent=4).pformat(self.data))
|
||||||
|
|
||||||
def get_link_url(self, link_type):
|
def get_link_url(self, link_type):
|
||||||
'''Need to be explained.
|
'''Need to be explained.
|
||||||
|
Loading…
Reference in New Issue
Block a user