From 3f7450c71a9d3750337d8b2a079f5e482a3d167d Mon Sep 17 00:00:00 2001 From: mikachu Date: Mon, 5 Oct 2020 19:50:41 +0200 Subject: [PATCH] if no radius in global config get it from switch config --- generate-conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generate-conf.py b/generate-conf.py index 992e2b6..37c46a3 100644 --- a/generate-conf.py +++ b/generate-conf.py @@ -278,6 +278,8 @@ def gen_conf_re2o(re2o_config, header, modules): interfaces.sort(key=lambda x: x["number"]) radius_key = re2o_config.get("get_radius_key_value") radius_servers = [ {"ip": i, "secret": radius_key } for i in mgmt_utils["radius_servers"]["ipv4"] + mgmt_utils["radius_servers"]["ipv6"]] + if radius_servers == []: + radius_servers = [ {"ip": i, "secret": radius_key } for i in re2o_config["get_radius_servers"]["ipv4"] + mgmt_utils["radius_servers"]["ipv6"]] config_dict = { "header": header, "modules": modules,