mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Add files via upload
This commit is contained in:
@@ -192,6 +192,12 @@ def refreshShapers():
|
||||
startPointForHash = '12' #Position of src-address in IP header
|
||||
shell('tc filter add dev ' + interfaceB + ' parent ' + str(parentIDFirstPart) + ': prio 5 u32 ht 800:: match ip ' + srcOrDst + ' '+ thisSlash16Dec1 + '.' + thisSlash16Dec2 + '.0.0/16 hashkey mask 0x000000ff at ' + startPointForHash + ' link ' + str(hashIDCounter) + ':')
|
||||
hashIDCounter += 1
|
||||
#Recap
|
||||
for customer in clientsList:
|
||||
ipAddr, downloadSpeed, uploadSpeed = customer
|
||||
downloadSpeed = str(downloadSpeed)
|
||||
uploadSpeed = str(uploadSpeed)
|
||||
print("Applied rate limiting |\t" + ipAddr + "\t| " + downloadSpeed + " down " + uploadSpeed + " up")
|
||||
#Done
|
||||
today = date.today()
|
||||
d1 = today.strftime("%d/%m/%Y")
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
# v.0.4-alpha
|
||||
#
|
||||
import requests
|
||||
from ispConfig import orgUNMSxAuthToken, unmsBaseURL
|
||||
from ispConfig import orgUNMSxAuthToken, unmsBaseURL, deviceModelBlacklistEnabled
|
||||
|
||||
#To omit bridged CPEs from shaping
|
||||
#deviceModelBlacklist = ['LBE-5AC-Gen2', 'LBE-5AC-Gen2', 'LBE-5AC-LR', 'AF-LTU5', 'AFLTULR', 'AFLTUPro', 'LTU-LITE']
|
||||
deviceModelBlacklist = []
|
||||
if deviceModelBlacklistEnabled:
|
||||
deviceModelBlacklist = ['LBE-5AC-Gen2', 'LBE-5AC-Gen2', 'LBE-5AC-LR', 'AF-LTU5', 'AFLTULR', 'AFLTUPro', 'LTU-LITE']
|
||||
else:
|
||||
deviceModelBlacklist = []
|
||||
|
||||
def pullUNMSCustomers():
|
||||
url = unmsBaseURL + "/nms/api/v2.1/sites?type=client&ucrm=true&ucrmDetails=true"
|
||||
@@ -67,9 +69,11 @@ def getUNMSclientSiteDevices(siteID):
|
||||
deviceMAC = device['identification']['mac']
|
||||
deviceIP = device['ipAddress']
|
||||
deviceModel = device['identification']['model']
|
||||
if not deviceModel:
|
||||
deviceModel = device['identification']['modelName']
|
||||
if deviceModel not in deviceModelBlacklist:
|
||||
deviceIPs.append(deviceIP)
|
||||
print("Added " + deviceModel + " device " + deviceName)
|
||||
print("Added " + deviceModel + ":\t" + deviceName)
|
||||
return deviceIPs
|
||||
|
||||
|
||||
@@ -89,3 +93,4 @@ def getUNMSclientSiteDevices(siteID):
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user