(traffic shaper) work in progress model and config template

This commit is contained in:
Ad Schellevis 2015-05-18 21:08:54 +02:00
parent b668fdeb13
commit 58edd8524d
2 changed files with 8 additions and 4 deletions

View File

@ -14,7 +14,8 @@
</number>
<bandwidth type="IntegerField">
<Required>Y</Required>
<default>899795</default>
<MinimumValue>1</MinimumValue>
<MaximumValue>899795</MaximumValue>
</bandwidth>
<bandwidthMetric type="OptionField">
<Required>Y</Required>
@ -28,8 +29,6 @@
</bandwidthMetric>
<queue type="IntegerField">
<Required>N</Required>
<MinimumValue>1</MinimumValue>
<MaximumValue>100</MaximumValue>
</queue>
<queueMetric type="OptionField">
<Required>N</Required>

View File

@ -27,8 +27,13 @@ flush
#======================================================================================
# define dummynet pipes
#======================================================================================
{% if helpers.exists('OPNsense.TrafficShaper.pipe') %}
{% if helpers.exists('OPNsense.TrafficShaper.pipes.pipe') %}
{% for pipe in OPNsense.TrafficShaper.pipes.pipe %}
ipfw pipe {{ pipe.number }} config bw {{ pipe.bandwidth }}{{ pipe.bandwidthMetric }}/s {%
if pipe.queue %} queue {{ pipe.queue }} {%
if pipe.queueMetric != 'slots' %} {{pipe.queueMetric}} {% endif %} {% endif %}
{% endfor %}
{% endif %}
#======================================================================================