From e26ef3d622940ac65e749325f1eecb8ca4eab97f Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Mon, 13 Nov 2017 23:38:53 +0000 Subject: [PATCH] Add debug statement for response data We have debug statement for request data which is helpful. It is even better to have debug statement for response data as well. Change-Id: Id92df0c18259c4c829ffbd15878458c685353721 --- kuryr_libnetwork/controllers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kuryr_libnetwork/controllers.py b/kuryr_libnetwork/controllers.py index d7c9d1c1..80be5f1d 100644 --- a/kuryr_libnetwork/controllers.py +++ b/kuryr_libnetwork/controllers.py @@ -1140,6 +1140,8 @@ def network_driver_create_endpoint(): _process_interface_address( fixed_ip, subnets_dict_by_id, response_interface) + LOG.debug("Response JSON data %s for /NetworkDriver.CreateEndpoint", + {'Interface': response_interface}) return flask.jsonify({'Interface': response_interface}) @@ -1168,6 +1170,8 @@ def network_driver_endpoint_operational_info(): response_port_status = ( _get_neutron_port_status_from_docker_endpoint(endpoint_id)) + LOG.debug("Response JSON data %s for /NetworkDriver.EndpointOperInfo", + {'Value': response_port_status}) return flask.jsonify({'Value': response_port_status}) @@ -1333,6 +1337,8 @@ def network_driver_join(): } join_response['StaticRoutes'].append(static_route) + LOG.debug("Response JSON data %s for /NetworkDriver.Join", + join_response) return flask.jsonify(join_response) @@ -1534,6 +1540,8 @@ def ipam_request_pool(): req_pool_res = {'PoolID': pool_id, 'Pool': subnet_cidr} + LOG.debug("Response JSON data %s for /IpamDriver.RequestPool", + req_pool_res) return flask.jsonify(req_pool_res) @@ -1694,6 +1702,8 @@ def ipam_request_address(): allocated_address = '{}/{}'.format(req_address, subnet_cidr.prefixlen) + LOG.debug("Response JSON data %s for /IpamDriver.RequestAddress", + {'Address': allocated_address}) return flask.jsonify({'Address': allocated_address})