Ensure UISP integration does not overwrite existing network.json

This commit is contained in:
Robert Chacón 2022-09-10 22:40:33 -06:00 committed by GitHub
parent 903dbc9b13
commit 061adc4bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,10 @@ def createTree(sites,accessPoints,bandwidthDL,bandwidthUL,siteParentDict,siteIDt
return currentNode
def createNetworkJSON():
print("Creating network.json")
if os.path.isfile("network.json"):
print("network.json already exists. Leaving in place.")
else:
print("Generating network.json")
bandwidthDL = {}
bandwidthUL = {}
url = UISPbaseURL + "/nms/api/v2.1/sites?type=site"