Add infrastructure to the generated topology. Commit for testing.

This commit is contained in:
Herbert Wolverson
2023-07-11 14:03:16 +00:00
parent c055fb337b
commit 72e407e1da
2 changed files with 6 additions and 2 deletions

View File

@@ -359,14 +359,17 @@ class NetworkGraph:
# Builds ShapedDevices.csv from the network tree.
circuits = []
for (i, node) in enumerate(self.nodes):
if node.type == NodeType.client:
#if node.type == NodeType.client:
parent = self.nodes[node.parentIndex].displayName
if parent == "Shaper Root": parent = ""
if circuitNameUseAddress:
displayNameToUse = node.address
else:
displayNameToUse = node.customerName
if node.type == NodeType.client:
displayNameToUse = node.displayName
else:
displayNameToUse = node.customerName + " (" + nodeTypeToString(node.type) + ")"
circuit = {
"id": node.id,
"name": displayNameToUse,

View File

@@ -433,6 +433,7 @@ def buildFullGraph():
match type:
case "site":
nodeType = NodeType.site
customerName = name
if name in siteBandwidth:
# Use the CSV bandwidth values
download = siteBandwidth[name]["download"]