From d53982112f26bbc07f9097c2c66b3e48d337e4dd Mon Sep 17 00:00:00 2001 From: DmitriyEshenko Date: Wed, 30 Dec 2020 13:37:00 +0000 Subject: pppoe-server: T3162: Add generation pado-delay to jinja2 template --- data/templates/accel-ppp/pppoe.config.tmpl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/templates/accel-ppp/pppoe.config.tmpl b/data/templates/accel-ppp/pppoe.config.tmpl index b39c4452d..3dfb615da 100644 --- a/data/templates/accel-ppp/pppoe.config.tmpl +++ b/data/templates/accel-ppp/pppoe.config.tmpl @@ -111,7 +111,15 @@ service-name={{ service_name | join(',') }} {% endif %} {% if pado_delay %} -pado-delay={{ pado_delay }} +{% set pado_delay_param = namespace(value='0') %} +{% for delay in pado_delay|sort(attribute='0') %} +{% if not loop.last %} +{% set pado_delay_param.value = pado_delay_param.value + ',' + delay + ':' + pado_delay[delay].sessions %} +{% else %} +{% set pado_delay_param.value = pado_delay_param.value + ',-1:' + pado_delay[delay].sessions %} +{% endif %} +{% endfor %} +pado-delay={{ pado_delay_param.value }} {% endif %} {% if limits is defined %} -- cgit v1.2.3