Update integrationCustom.py

This commit is contained in:
Robert Chacón 2024-12-26 07:17:15 -07:00 committed by GitHub
parent 6a103af95e
commit c74224d14f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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