Commit 89f64ae4 authored by Ad Schellevis's avatar Ad Schellevis

(trafficshaper) make use of helpers.toList()

parent 91fedb03
......@@ -28,7 +28,7 @@ flush
# define dummynet pipes
#======================================================================================
{% if helpers.exists('OPNsense.TrafficShaper.pipes.pipe') %}
{% for pipe in OPNsense.TrafficShaper.pipes.pipe %}
{% for pipe in helpers.toList('OPNsense.TrafficShaper.pipes.pipe') %}
pipe {{ pipe.number }} config bw {{ pipe.bandwidth }}{{ pipe.bandwidthMetric }}/s {%
if pipe.queue %} queue {{ pipe.queue }} {%
if pipe.queueMetric != 'slots' %} {{pipe.queueMetric}} {% endif %} {% endif
......@@ -124,7 +124,7 @@ add 30000 set 0 count ip from any to any
add 60000 return via any
{% if helpers.exists('OPNsense.TrafficShaper.rules.rule') %}
{% for rule in OPNsense.TrafficShaper.rules.rule %}
{% for rule in helpers.toList('OPNsense.TrafficShaper.rules.rule') %}
{% if helpers.getUUIDtag(rule.target) in ['pipe','queue'] %}
add {{loop.index + 60000}} {{ helpers.getUUIDtag(rule.target) }} {{
helpers.getUUID(rule.target).number }} {{ rule.proto }} from {{ rule.source }} to {{rule.destination
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment