summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos/TrafficShaper.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/Qos/TrafficShaper.pm')
-rw-r--r--lib/Vyatta/Qos/TrafficShaper.pm62
1 files changed, 0 insertions, 62 deletions
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;