diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2011-01-04 14:09:21 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2011-01-04 14:09:21 -0800 |
commit | 2f70079e8ddd4814508e31fe72cb45f47763fb2f (patch) | |
tree | 19e41c20dd5815aca495436b48f0525cba91a42f | |
parent | aec422e5b7cd90347d9b18f3b7f366d63f004eca (diff) | |
download | vyatta-cfg-quagga-2f70079e8ddd4814508e31fe72cb45f47763fb2f.tar.gz vyatta-cfg-quagga-2f70079e8ddd4814508e31fe72cb45f47763fb2f.zip |
Revert "Added OSPFv3 CLI backend that uses Vyatta::Quagga::Config"
This reverts commit 5037f34c798daeab63554633528916103da99d18.
-rwxr-xr-x | scripts/ospfv3/vyatta-ospfv3.pl | 154 |
1 files changed, 0 insertions, 154 deletions
diff --git a/scripts/ospfv3/vyatta-ospfv3.pl b/scripts/ospfv3/vyatta-ospfv3.pl deleted file mode 100755 index c359d348..00000000 --- a/scripts/ospfv3/vyatta-ospfv3.pl +++ /dev/null @@ -1,154 +0,0 @@ -#!/usr/bin/perl - -# Author: Daniil Baturin <daniil@baturin.org> -# Date: 2010 -# Description: OSPFv3 CLI backend - -# **** License **** -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2006, 2007, 2008 Vyatta, Inc. -# All Rights Reserved. -# **** End License **** - -use strict; -use warnings; - -use Getopt::Long; -use NetAddr::IP::Lite; - -use lib "/opt/vyatta/share/perl5/"; -use Vyatta::Config; -use Vyatta::Quagga::Config; -use Vyatta::Misc; - -my %quagga_commands = ( - 'protocols' => { - set => undef, - del => undef - }, - 'protocols ospfv3' => { - set => 'router ospf6', - del => 'no router ospf6' - }, - 'protocols ospfv3 parameters' => { - set => undef, - del => undef - }, - 'protocols ospfv3 parameters router-id' => { - set => 'router ospf6 ; router-id #5', - del => undef - }, - 'protocols ospfv3 area' => { - set => undef, - del => undef - }, - 'protocols ospfv3 area var' => { - set => undef, - del => undef - }, - 'protocols ospfv3 area var range' => { - set => undef, - del => undef - }, - 'protocols ospfv3 area var range var' => { - set => 'router ospf6 ; area #4 range #6', - del => 'router ospf6 ; no area #4 range #6' - }, - 'protocols ospfv3 area var range var advertise' => { - set => 'router ospf6 ; area #4 range #6 advertise', - del => 'router ospf6 ; no area #4 range #6' - }, - 'protocols ospfv3 area var range var not-advertise' => { - set => 'router ospf6 ; area #4 range #6 not-advertise', - del => 'router ospf6 ; no area #4 range #6 not-advertise' - }, - 'protocols ospfv3 area var interface' => { - set => 'router ospf6 ; no interface #6 area #4; interface #6 area #4', - del => 'router ospf6 ; no interface #6 area #4', - noerr => 'set' - }, - 'protocols ospfv3 area var import-list' => { - set => 'router ospf6 ; area #4 import-list #6', - del => 'router ospf6 ; no area #4 import-list #6' - }, - 'protocols ospfv3 area var export-list' => { - set => 'router ospf6 ; area #4 export-list #6', - del => 'router ospf6 ; no area #4 export-list #6' - }, - 'protocols ospfv3 area var filter-list' => { - set => 'router ospf6 ; area #4 filter-list prefix #6', - del => 'router ospf6 ; no area #4 filter-list prefix #6' - }, - 'protocols ospfv3 redistribute' => { - set => undef, - del => undef - }, - 'protocols ospfv3 redistribute connected' => { - set => 'router ospf6 ; redistribute connected ?route-map', - del => 'router ospf6 ; no redistribute connected' - }, - 'protocols ospfv3 redistribute kernel' => { - set => 'router ospf6 ; redistribute kernel ?route-map', - del => 'router ospf6 ; no redistribute kernel' - }, - 'protocols ospfv3 redistribute bgp' => { - set => 'router ospf6 ; redistribute bgp ?route-map', - del => 'router ospf6 ; no redistribute bgp' - }, - 'protocols ospfv3 redistribute ripng' => { - set => 'router ospf6 ; redistribute ripng ?route-map', - del => 'router ospf6 ; no redistribute ripng' - }, - 'protocols ospfv3 redistribute static' => { - set => 'router ospf6 ; redistribute static ?route-map', - del => 'router ospf6 ; no redistribute static' - } -); - -my ($main, $check_area, $area); - -GetOptions( - "main" => \$main, - "check-area" => \$check_area, - "area=s" => \$area -); - -main() if ($main); -check_ospfv3_area($area) if ($check_area); - -exit 0; - -sub main { - # Create a Vyatta Quagga Config object initialized by commands mapping - my $quagga_config = new Vyatta::Quagga::Config('protocols', \%quagga_commands); - #$quagga_config->setDebugLevel('3'); - - $quagga_config->deleteConfigTreeRecursive('protocols ospfv3') || die "exiting $?\n"; - - $quagga_config->setConfigTreeRecursive('protocols ospfv3 parameters') || die "exiting $?\n"; # Priority 630 - $quagga_config->setConfigTreeRecursive('protocols ospfv3') || die "exiting $?\n"; # Priority 640 -} - -# Quagga ospf6d doesn't accept numeric area id, but requires dotted decimal. Bug 4172. -sub check_ospfv3_area { - my $area = shift; - - if ( $area =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ ) { - foreach my $octet ( $1, $2, $3, $4 ) { - if ( ( $octet < 0 ) || ( $octet > 255 ) ) { exit 1; } - } - exit 0; - } - - die "Invalid OSPFv3 area: $area\n"; -} - |