mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Add routing_policy to nedge configuration callback
This commit is contained in:
parent
b357bcb626
commit
87a3ad8baa
2 changed files with 26 additions and 4 deletions
|
|
@ -55,16 +55,16 @@ function http_bridge_conf_utils.configureBridge()
|
|||
-- ["ConnectivityCheck"] = "pass"
|
||||
-- }
|
||||
-- },
|
||||
-- ["maina"] = {
|
||||
-- ["full_name"] = "Maina Fast",
|
||||
-- ["guest"] = {
|
||||
-- ["full_name"] = "Guest Users",
|
||||
-- ["password"] = "ntop0101",
|
||||
-- ["default_policy"] = "pass",
|
||||
-- ["policies"] = {
|
||||
-- [10] = "slow_pass", ["Facebook"] = "slower_pass", ["YouTube"] = "drop"
|
||||
-- }
|
||||
-- },
|
||||
-- ["simon"] = {
|
||||
-- ["full_name"] = "Simon Speed",
|
||||
-- ["iot"] = {
|
||||
-- ["full_name"] = "IoT Devices",
|
||||
-- ["password"] = "ntop0202",
|
||||
-- ["default_policy"] = "drop",
|
||||
-- ["policies"] = {
|
||||
|
|
@ -121,8 +121,14 @@ function http_bridge_conf_utils.configureBridge()
|
|||
end
|
||||
|
||||
local pool_id = host_pools_nedge.usernameToPoolId(username) or host_pools_nedge.DEFAULT_POOL_ID
|
||||
|
||||
host_pools_nedge.traceHostPoolEvent(TRACE_NORMAL, ifname..": creating user: "..username.. " pool id: "..pool_id)
|
||||
|
||||
if not isEmptyString(user_config["routing_policy"]) then
|
||||
local routing_policy_id = host_pools_nedge.routingPolicyNameToId(user_config["routing_policy"])
|
||||
host_pools_nedge.setRoutingPolicyId(pool_id, routing_policy_id)
|
||||
end
|
||||
|
||||
if not isEmptyString(user_config["default_policy"]) then
|
||||
local default_policy = string.lower(user_config["default_policy"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue