Read network ICC value
This commit is contained in:
parent
ea7ecc2381
commit
2a89518aef
1 changed files with 11 additions and 6 deletions
|
@ -64,21 +64,26 @@ def generate_graph(verbose: bool, file: str):
|
||||||
except IndexError:
|
except IndexError:
|
||||||
gateway = None
|
gateway = None
|
||||||
|
|
||||||
|
internal = ""
|
||||||
try:
|
try:
|
||||||
if net['Internal']:
|
if net['Internal']:
|
||||||
internal = "| Internal"
|
internal = "| Internal "
|
||||||
else:
|
|
||||||
internal = ""
|
|
||||||
|
|
||||||
except IndexError:
|
except IndexError:
|
||||||
internal = ""
|
pass
|
||||||
|
|
||||||
|
isolated = ""
|
||||||
|
try:
|
||||||
|
if net["Options"]["com.docker.network.bridge.enable_icc"] == "false":
|
||||||
|
isolated = "| Containers isolated"
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
print("Network: %s %s gw:%s" % (net_name, internal, gateway))
|
print("Network: %s %s gw:%s" % (net_name, internal, gateway))
|
||||||
|
|
||||||
net_node_id = "net_%s" % (net_name,)
|
net_node_id = "net_%s" % (net_name,)
|
||||||
|
|
||||||
label = "{<gw_iface> %s | %s %s}" % (gateway, net_name, internal)
|
label = "{<gw_iface> %s | %s %s%s}" % (gateway, net_name, internal, isolated)
|
||||||
|
|
||||||
g.node(net_node_id,
|
g.node(net_node_id,
|
||||||
shape='record',
|
shape='record',
|
||||||
|
|
Loading…
Reference in a new issue