mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Update integrationCustom.py
This commit is contained in:
parent
6a103af95e
commit
c74224d14f
@ -40,7 +40,7 @@ def createShaper():
|
||||
siteBandwidthOverride = importBandwidthOverrides()
|
||||
|
||||
# Create sites
|
||||
for site_item in your_site_list: # Iterate through a site list you've created somewhere
|
||||
for site_item in your_site_list: # Iterate through a site list you've created somewhere
|
||||
parent_id = None # No parent id by default, but you can add specify it later, prior to the line node = NetworkNode
|
||||
download = 10000 # Default speed is 10G, but you can add specify it later, prior to the line node = NetworkNode
|
||||
upload = 10000 # Default speed is 10G, but you can add specify it later, prior to the line node = NetworkNode
|
||||
@ -52,16 +52,16 @@ def createShaper():
|
||||
net.addRawNode(node)
|
||||
|
||||
# Create subscriber sites and devices
|
||||
for serviceItem in your_list_of_service: # Iterate through a service/customer list you've created somewhere
|
||||
for serviceItem in your_list_of_service: # Iterate through a service/customer list you've created somewhere
|
||||
customer = NetworkNode(
|
||||
type=NodeType.client,
|
||||
id=parentNodeIDCounter,
|
||||
parentId='', # Parent node ID
|
||||
displayName='', # Customer display name
|
||||
address='', # Customer address
|
||||
address='', # Customer address
|
||||
customerName='', # Customer name
|
||||
download=1000, # Customer download
|
||||
upload=1000 # Customer upload
|
||||
upload=1000 # Customer upload
|
||||
)
|
||||
net.addRawNode(customer)
|
||||
|
||||
@ -71,8 +71,8 @@ def createShaper():
|
||||
type=NodeType.device,
|
||||
parentId=parentNodeIDCounter,
|
||||
mac=serviceItem['mac'],
|
||||
ipv4=your_devices_ipv4_list, # Device IPv4 list
|
||||
ipv6=your_devices_ipv6_list # Device IPv6 list
|
||||
ipv4=your_devices_ipv4_list, # Device IPv4 list
|
||||
ipv6=your_devices_ipv6_list # Device IPv6 list
|
||||
)
|
||||
net.addRawNode(device)
|
||||
parentNodeIDCounter = parentNodeIDCounter + 1
|
||||
|
Loading…
Reference in New Issue
Block a user