Robert Chacón 2023-02-07 06:38:20 -07:00 committed by GitHub
parent 20567736d7
commit 46457878a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -751,13 +751,14 @@ def refreshShapers():
if 'circuits' in data[node]: if 'circuits' in data[node]:
for circuit in data[node]['circuits']: for circuit in data[node]['circuits']:
# Generate TC commands to be executed later # Generate TC commands to be executed later
comment = " # CircuitID: " + circuit['circuitID'] + " DeviceIDs: " tcComment = " # CircuitID: " + circuit['circuitID'] + " DeviceIDs: "
for device in circuit['devices']: for device in circuit['devices']:
comment = comment + device['deviceID'] + ', ' tcComment = tcComment + device['deviceID'] + ', '
if 'devices' in circuit: if 'devices' in circuit:
if 'comment' in circuit['devices'][0]: if 'comment' in circuit['devices'][0]:
comment = comment + '| Comment: ' + circuit['devices'][0]['comment'] tcComment = tcComment + '| Comment: ' + circuit['devices'][0]['comment']
command = 'class add dev ' + interfaceA + ' parent ' + data[node]['classid'] + ' classid ' + circuit['classMinor'] + ' htb rate '+ str(circuit['minDownload']) + 'mbit ceil '+ str(circuit['maxDownload']) + 'mbit prio 3' tcComment = tcComment.replace("\n", "")
command = 'class add dev ' + interfaceA + ' parent ' + data[node]['classid'] + ' classid ' + circuit['classMinor'] + ' htb rate '+ str(circuit['minDownload']) + 'mbit ceil '+ str(circuit['maxDownload']) + 'mbit prio 3' + tcComment
linuxTCcommands.append(command) linuxTCcommands.append(command)
# Only add CAKE / fq_codel qdisc if monitorOnlyMode is Off # Only add CAKE / fq_codel qdisc if monitorOnlyMode is Off
if monitorOnlyMode == False: if monitorOnlyMode == False: