diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-15 14:13:51 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-15 14:13:51 -0700 |
commit | 81b51bb9270e77289604493761a2f7cb047bd3ea (patch) | |
tree | bc8c6d8cb285ea99ba8b4296b9b2a26b6bb4efea /scripts/VyattaQosFairQueue.pm | |
parent | 3dd93c5175de9a4d32cadb7bb0c4f832fb14312d (diff) | |
download | vyatta-cfg-qos-81b51bb9270e77289604493761a2f7cb047bd3ea.tar.gz vyatta-cfg-qos-81b51bb9270e77289604493761a2f7cb047bd3ea.zip |
Look for changes in QoS after commit
Since configuration system doesn't correctly notify on addition/deletion,
have to introduce this extra verbosity to have each traffic-shaper type
check for changes.
Bugfix for 3452
Diffstat (limited to 'scripts/VyattaQosFairQueue.pm')
-rw-r--r-- | scripts/VyattaQosFairQueue.pm | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/VyattaQosFairQueue.pm b/scripts/VyattaQosFairQueue.pm index 8a9dfdf..278bb77 100644 --- a/scripts/VyattaQosFairQueue.pm +++ b/scripts/VyattaQosFairQueue.pm @@ -37,8 +37,8 @@ sub new { my $class = ref($that) || $that; my $self = {%fields}; - $self->{_perturb} = $config->returnValue("hash-interval"); - $self->{_limit} = $config->returnValue("queue-limit"); + $self->{_perturb} = $config->returnValue('hash-interval'); + $self->{_limit} = $config->returnValue('queue-limit'); return bless $self, $class; } @@ -51,4 +51,16 @@ sub commands { print "\n"; } +sub isChanged { + my ( $self, $name ) = @_; + my $config = new VyattaConfig; + + $config->setLevel("qos-policy fair-queue $name"); + foreach my $attr ('hash-interval', 'queue-limit') { + if ($config->isChanged($attr)) { + return $attr + } + } + return undef; # false +} 1; |