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:
parent
96ea32139e
commit
0ed68c044d
@ -88,7 +88,8 @@ def refreshShapers():
|
||||
#clientsList.append((100, '100.65.1.1'))
|
||||
|
||||
#Bring in clients from UCRM if enabled
|
||||
shapableDevices.extend(pullUNMSDevices())
|
||||
if importFromUNMS:
|
||||
shapableDevices.extend(pullUNMSDevices())
|
||||
|
||||
#Categorize Clients By IPv4 /16
|
||||
listOfSlash16SubnetsInvolved = []
|
||||
|
@ -38,7 +38,7 @@ def pullUNMSDevices():
|
||||
#print(jsonData)
|
||||
unmsDevicesToImport = []
|
||||
for unmsClientSite in jsonData:
|
||||
try:
|
||||
if (unmsClientSite['identification']['status'] == 'active') and (unmsClientSite['qos']['downloadSpeed']) and (unmsClientSite['qos']['uploadSpeed']):
|
||||
downloadSpeedMbps = int(round(unmsClientSite['qos']['downloadSpeed']/1000000))
|
||||
uploadSpeedMbps = int(round(unmsClientSite['qos']['uploadSpeed']/1000000))
|
||||
address = unmsClientSite['description']['address']
|
||||
@ -53,7 +53,7 @@ def pullUNMSDevices():
|
||||
if '/' in deviceIP:
|
||||
deviceIP = deviceIP.split('/')[0]
|
||||
if deviceModel not in deviceModelBlacklist:
|
||||
print("Added " + deviceModel + ":\t" + deviceName)
|
||||
print("Added " + ":\t" + deviceName)
|
||||
thisShapedDevice = {
|
||||
"identification": {
|
||||
"name": deviceName,
|
||||
@ -73,8 +73,8 @@ def pullUNMSDevices():
|
||||
}
|
||||
unmsDevicesToImport.append(thisShapedDevice)
|
||||
print("Imported " + address)
|
||||
except:
|
||||
print("Failed to import devices from customer at " + unmsClientSite['description']['address'])
|
||||
else:
|
||||
print("Failed to import devices from " + unmsClientSite['description']['address'] + ". Missing QoS.")
|
||||
return unmsDevicesToImport
|
||||
|
||||
def getUNMSdevicesAtClientSite(siteID):
|
||||
|
Loading…
Reference in New Issue
Block a user