Middleware Sever Mode
go run main.go -mode=server -netbox-url="https://netbox.quanza.net" -netbox-token="TOKEN_EXAMPLE"
Example CURL
curl -X POST http://localhost/calculateImpact \
-H "Content-Type: application/json" \
-d '{"device_ids": [], "circuit_ids": [202], "interface_ids": [], "impact_type": "incident-work"}'
Middleware CLI Mode
go run main.go -mode=server -netbox-url="https://netbox.quanza.net" -netbox-token="TOKEN_EXAMPLE"
Formula:
A forum module is first calculated based on the weight given by the user and the weight per device, which are calculated in the formula below
-
$D$ is the count of devices -
$C$ is the count of circuits -
$I$ is the count of interfaces -
$M$ is the impact type multiplier -
$R$ is the impact type multiplier (e.g., 1.0, 1.5, or 2.0)
To account for redudance in the circuits, there is a factor
Computed formula
\text{Impact} = M \times \Bigl(5 \times \text{# Devices} + \sum_{i=1}^{C}\bigl(3 \times R_i\bigr) + 1 \times \text{# Interfaces}\Bigr)
After checking the weights and the formula we get a final impact formula which is as follows.