From ccf8cf925f7ff236950ab25af57abd13a6edc73c Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Wed, 5 May 2021 11:23:17 +0200 Subject: [PATCH] Improve subnet debug message Change-Id: If0ea7ffcea77792fd2da64b2a7daddbfb9a8b219 --- tobiko/tests/scenario/neutron/test_port.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tobiko/tests/scenario/neutron/test_port.py b/tobiko/tests/scenario/neutron/test_port.py index e22a62e05..b53e443be 100644 --- a/tobiko/tests/scenario/neutron/test_port.py +++ b/tobiko/tests/scenario/neutron/test_port.py @@ -14,6 +14,7 @@ # under the License. from __future__ import absolute_import +import json import typing import netaddr @@ -84,7 +85,8 @@ class PortTest(testtools.TestCase): network_id = self.stack.network_stack.network_id subnets = neutron.list_subnets(network_id=network_id, enable_dhcp=True) - LOG.debug(f"Subnets with DHCP enabled are: {subnets}") + LOG.debug("Subnets with DHCP enabled are:\n" + f"{json.dumps(subnets, indent=4, sort_keys=True)}") gateway_ips = [netaddr.IPAddress(subnet['gateway_ip']) for subnet in subnets] LOG.debug(f"Gateway IPs are: {gateway_ips}")