diff --git a/docker-net-graph.py b/docker-net-graph.py index 3125f1b..11ecb0c 100755 --- a/docker-net-graph.py +++ b/docker-net-graph.py @@ -64,21 +64,26 @@ def generate_graph(verbose: bool, file: str): except IndexError: gateway = None + internal = "" try: if net['Internal']: - internal = "| Internal" - else: - internal = "" - + internal = "| Internal " except IndexError: - internal = "" + pass + + isolated = "" + try: + if net["Options"]["com.docker.network.bridge.enable_icc"] == "false": + isolated = "| Containers isolated" + except KeyError: + pass if verbose: print("Network: %s %s gw:%s" % (net_name, internal, gateway)) net_node_id = "net_%s" % (net_name,) - label = "{ %s | %s %s}" % (gateway, net_name, internal) + label = "{ %s | %s %s%s}" % (gateway, net_name, internal, isolated) g.node(net_node_id, shape='record',