diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2010-08-12 15:56:01 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2010-08-12 15:56:01 -0700 |
commit | 17930c693d449784e7d6d5aa12748de921664527 (patch) | |
tree | 32ed0f8efdec4733da758af5e11a84ee7e37cdc3 /lib | |
parent | 62386c46dc0029eaefff55966d8cdaa6b53b1ab2 (diff) | |
download | vyatta-cfg-17930c693d449784e7d6d5aa12748de921664527.tar.gz vyatta-cfg-17930c693d449784e7d6d5aa12748de921664527.zip |
add required special cases for adsl/pppo* interfaces.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Interface.pm | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/Vyatta/Interface.pm b/lib/Vyatta/Interface.pm index 4c7244a..ff9e067 100755 --- a/lib/Vyatta/Interface.pm +++ b/lib/Vyatta/Interface.pm @@ -108,6 +108,34 @@ sub get_all_cfg_interfaces { } } } + + # now special cases for pppo*/adsl + for my $eth ($cfg->$vfunc('interfaces ethernet')) { + for my $ep ($cfg->$vfunc("interfaces ethernet $eth pppoe")) { + push @ret_ifs, { 'name' => "pppoe$ep", + 'path' => "interfaces ethernet $eth pppoe $ep" }; + } + } + for my $a ($cfg->$vfunc('interfaces adsl')) { + for my $p ($cfg->$vfunc("interfaces adsl $a pvc")) { + for my $t ($cfg->$vfunc("interfaces adsl $a pvc $p")) { + if ($t eq 'classical-ipoa' or $t eq 'bridged-ethernet') { + # classical-ipoa or bridged-ethernet + push @ret_ifs, + { 'name' => $a, + 'path' => "interfaces adsl $a pvc $p $t" }; + next; + } + # pppo[ea] + for my $i ($cfg->$vfunc("interfaces adsl $a pvc $p $t")) { + push @ret_ifs, + { 'name' => "$t$i", + 'path' => "interfaces adsl $a pvc $p $t $i" }; + } + } + } + } + return @ret_ifs; } |