Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uisp suspend #360

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@ tramp
# virtual environments
.venv
venv

# pshinx
_build

# MacOS
.DS_Store
6 changes: 6 additions & 0 deletions docs/TechnicalDocs/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ You can modify the network.json file to more accurately reflect bandwidth limits
ShapedDevices.csv will be overwritten every time the UISP integration is run.
You have the option to run integrationUISP.py automatically on boot and every 30 minutes, which is recommended. This can be enabled by setting ```automaticImportUISP = True``` in ispConfig.py

There are a number of other variables for UISP in `ispConfig.py`. Here's some explanation on some of them.

- `circuitNameUseAcctService` - This variable will create a circuit name in the format of `<customer_name>-<account_number>_<service_id>`. Only enable this if you are using UISP sync. Also set `circuitNameUseAddress` to false for this naming to take effect.
- `suspendedDownload` - This specifies a download limit that will override whatever bandwidth plan the client has assigned to them if the service is not in an "active" state.
- `suspendedUpload` - This specifies a upload limit that will override whatever bandwidth plan the client has assigned to them if the service is not in an "active" state.

## Splynx Integration

First, set the relevant parameters for Splynx (splynx_api_key, splynx_api_secret, etc.) in ispConfig.py.
Expand Down
8 changes: 4 additions & 4 deletions src/LibreQoS.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,16 +225,16 @@ def validateNetworkAndDevices():
devicesValidatedOrNot = False
try:
a = int(downloadMax)
if a < 2:
warnings.warn("Provided downloadMax '" + downloadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is < 2 Mbps.", stacklevel=2)
if a < 1:
warnings.warn("Provided downloadMax '" + downloadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is < 1 Mbps.", stacklevel=2)
devicesValidatedOrNot = False
except:
warnings.warn("Provided downloadMax '" + downloadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.", stacklevel=2)
devicesValidatedOrNot = False
try:
a = int(uploadMax)
if a < 2:
warnings.warn("Provided uploadMax '" + uploadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is < 2 Mbps.", stacklevel=2)
if a < 1:
warnings.warn("Provided uploadMax '" + uploadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is < 1 Mbps.", stacklevel=2)
devicesValidatedOrNot = False
except:
warnings.warn("Provided uploadMax '" + uploadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.", stacklevel=2)
Expand Down
Loading