diff options
Diffstat (limited to 'lib/Vyatta')
-rw-r--r-- | lib/Vyatta/Qos/DropTail.pm | 8 | ||||
-rw-r--r-- | lib/Vyatta/Qos/FairQueue.pm | 11 | ||||
-rw-r--r-- | lib/Vyatta/Qos/NetworkEmulator.pm | 12 | ||||
-rw-r--r-- | lib/Vyatta/Qos/RandomDetect.pm | 24 | ||||
-rw-r--r-- | lib/Vyatta/Qos/RateLimiter.pm | 11 | ||||
-rw-r--r-- | lib/Vyatta/Qos/RoundRobin.pm | 51 | ||||
-rw-r--r-- | lib/Vyatta/Qos/TrafficLimiter.pm | 45 | ||||
-rw-r--r-- | lib/Vyatta/Qos/TrafficShaper.pm | 62 |
8 files changed, 0 insertions, 224 deletions
diff --git a/lib/Vyatta/Qos/DropTail.pm b/lib/Vyatta/Qos/DropTail.pm index 1b14a81..0ff15e9 100644 --- a/lib/Vyatta/Qos/DropTail.pm +++ b/lib/Vyatta/Qos/DropTail.pm @@ -47,12 +47,4 @@ sub commands { printf "%s\n", $cmd; } -sub isChanged { - my ($self, $name) = @_; - my $config = new Vyatta::Config; - - $config->setLevel("qos-policy drop-tail $name"); - return $config->isChanged('queue-limit'); -} - 1; diff --git a/lib/Vyatta/Qos/FairQueue.pm b/lib/Vyatta/Qos/FairQueue.pm index bc3a872..c74cb01 100644 --- a/lib/Vyatta/Qos/FairQueue.pm +++ b/lib/Vyatta/Qos/FairQueue.pm @@ -52,15 +52,4 @@ sub commands { print "\n"; } -sub isChanged { - my ( $self, $name ) = @_; - my $config = new Vyatta::Config; - - $config->setLevel("qos-policy fair-queue $name"); - foreach my $attr ('hash-interval', 'queue-limit') { - return $attr if ($config->isChanged($attr)); - } - return; # false -} - 1; diff --git a/lib/Vyatta/Qos/NetworkEmulator.pm b/lib/Vyatta/Qos/NetworkEmulator.pm index d7a3404..602393c 100644 --- a/lib/Vyatta/Qos/NetworkEmulator.pm +++ b/lib/Vyatta/Qos/NetworkEmulator.pm @@ -81,16 +81,4 @@ sub commands { print "\n"; } -sub isChanged { - my ( $self, $name ) = @_; - my $config = new Vyatta::Config; - - $config->setLevel("qos-policy network-emulator $name"); - foreach my $attr ( "bandwidth", "burst", "queue-limit", "network-delay", - "packet-loss", "packet-corruption", "packet-reordering", ) { - return $attr if ( $config->isChanged($attr) ); - } - return; -} - 1; diff --git a/lib/Vyatta/Qos/RandomDetect.pm b/lib/Vyatta/Qos/RandomDetect.pm index 0ceb4d6..6e6dad0 100644 --- a/lib/Vyatta/Qos/RandomDetect.pm +++ b/lib/Vyatta/Qos/RandomDetect.pm @@ -130,28 +130,4 @@ sub commands { } } -# Walk configuration tree and look for changed nodes -# The configuration system should do this but doesn't do it right -sub isChanged { - my ( $self, $name ) = @_; - my $config = new Vyatta::Config; - - $config->setLevel("qos-policy random-detect $name"); - - return 'bandwidth' if ( $config->isChanged('bandwidth') ); - - my %precedenceNodes = $config->listNodeStatus('precedence'); - while ( my ( $pred, $status ) = each %precedenceNodes ) { - return "precedence $pred" if ( $status ne 'static' ); - - foreach my $attr qw(average-packet min-threshold mark-probability - max-threshold queue-limit) { - return "precedence $pred $attr" - if ( $config->isChanged("precedence $pred $attr") ); - } - } - - return; # false -} - 1; diff --git a/lib/Vyatta/Qos/RateLimiter.pm b/lib/Vyatta/Qos/RateLimiter.pm index c20646e..ac0cd2c 100644 --- a/lib/Vyatta/Qos/RateLimiter.pm +++ b/lib/Vyatta/Qos/RateLimiter.pm @@ -55,15 +55,4 @@ sub commands { $dev, $self->{_rate}, $self->{_latency}, $self->{_burst}; } -sub isChanged { - my ($self, $name) = @_; - my $config = new Vyatta::Config; - - $config->setLevel("qos-policy rate-limit $name"); - foreach my $attr ('bandwidth', 'burst', 'latency') { - return $attr if ($config->isChanged($attr)); - } - return; # false -} - 1; diff --git a/lib/Vyatta/Qos/RoundRobin.pm b/lib/Vyatta/Qos/RoundRobin.pm index 7cd6b4f..af45875 100644 --- a/lib/Vyatta/Qos/RoundRobin.pm +++ b/lib/Vyatta/Qos/RoundRobin.pm @@ -74,55 +74,4 @@ sub commands { } } -# Walk configuration tree and look for changed nodes -# The configuration system should do this but doesn't do it right -sub isChanged { - my ( $self, $name ) = @_; - my $config = new Vyatta::Config; - - $config->setLevel("qos-policy round-robin $name"); - - return 'quantum' if ( $config->isChanged('quantum') ); - - foreach my $attr (qw(queue-limit queue-type)) { - return "default $attr" if ( $config->isChanged("default $attr") ); - } - - my %classNodes = $config->listNodeStatus('class'); - while ( my ( $class, $status ) = each %classNodes ) { - return "class $class" if ( $status ne 'static' ); - - foreach my $attr (qw(queue-limit queue-type)) { - return "class $class $attr" - if ( $config->isChanged("class $class $attr") ); - } - - my %matchNodes = $config->listNodeStatus("class $class match"); - while ( my ( $match, $status ) = each %matchNodes ) { - my $level = "class $class match $match"; - if ( $status ne 'static' ) { - return $level; - } - - foreach my $parm ( - ( - 'vif', - 'interface', - 'ip protocol', - 'ip source address', - 'ip destination address', - 'ip source port', - 'ip destination port' - ) - ) - { - return "$level $parm" - if ( $config->isChanged("$level $parm") ); - } - } - } - - return; # false -} - 1; diff --git a/lib/Vyatta/Qos/TrafficLimiter.pm b/lib/Vyatta/Qos/TrafficLimiter.pm index fd3460c..b2fd07c 100644 --- a/lib/Vyatta/Qos/TrafficLimiter.pm +++ b/lib/Vyatta/Qos/TrafficLimiter.pm @@ -90,49 +90,4 @@ sub commands { } } -# Walk configuration tree and look for changed nodes -# The configuration system should do this but doesn't do it right -sub isChanged { - my ( $self, $name ) = @_; - my $config = new Vyatta::Config; - - $config->setLevel("qos-policy traffic-limiter $name"); - my %classNodes = $config->listNodeStatus('class'); - while ( my ( $class, $status ) = each %classNodes ) { - if ( $status ne 'static' ) { - return "class $class"; - } - - foreach my $attr ( 'bandwidth', 'burst', 'priority' ) { - if ( $config->isChanged("class $class $attr") ) { - return "class $class $attr"; - } - } - - my %matchNodes = $config->listNodeStatus("class $class match"); - while ( my ( $match, $status ) = each %matchNodes ) { - my $level = "class $class match $match"; - if ( $status ne 'static' ) { - return $level; - } - - foreach my $parm ( - 'vif', - 'interface', - 'ip dscp', - 'ip protocol', - 'ip source address', - 'ip destination address', - 'ip source port', - 'ip destination port' - ) - { - return "$level $parm" if ( $config->isChanged("$level $parm") ); - } - } - } - - return; # false -} - 1; diff --git a/lib/Vyatta/Qos/TrafficShaper.pm b/lib/Vyatta/Qos/TrafficShaper.pm index c808c7d..f51d373 100644 --- a/lib/Vyatta/Qos/TrafficShaper.pm +++ b/lib/Vyatta/Qos/TrafficShaper.pm @@ -157,66 +157,4 @@ sub commands { } } -# Walk configuration tree and look for changed nodes -# The configuration system should do this but doesn't do it right -sub isChanged { - my ( $self, $name ) = @_; - my $config = new Vyatta::Config; - my @attributes = qw(bandwidth burst ceiling priority queue-limit queue-type); - - $config->setLevel("qos-policy traffic-shaper $name"); - - if ( $config->isChanged('bandwidth') ) { - return 'bandwidth'; - } - - foreach my $attr (@attributes) { - if ( $config->isChanged("default $attr") ) { - return "default $attr"; - } - } - - my %classNodes = $config->listNodeStatus('class'); - while ( my ( $class, $status ) = each %classNodes ) { - if ( $status ne 'static' ) { - return "class $class"; - } - - foreach my $attr (@attributes) { - if ( $config->isChanged("class $class $attr") ) { - return "class $class $attr"; - } - } - - my %matchNodes = $config->listNodeStatus("class $class match"); - while ( my ( $match, $status ) = each %matchNodes ) { - my $level = "class $class match $match"; - if ( $status ne 'static' ) { - return $level; - } - - foreach my $parm ( - 'vif', - 'ether destination', - 'ether source', - 'ether protocol', - 'interface', - 'ip dscp', - 'ip protocol', - 'ip source address', - 'ip destination address', - 'ip source port', - 'ip destination port' - ) - { - if ( $config->isChanged("$level $parm") ) { - return "$level $parm"; - } - } - } - } - - return; # false -} - 1; |