public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH pve-network 0/3] evpn improvment
@ 2022-08-24  8:56 Alexandre Derumier
  2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 1/3] frr: update config frrversion to 8.2.2 Alexandre Derumier
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexandre Derumier @ 2022-08-24  8:56 UTC (permalink / raw)
  To: pve-devel

This patches series cleanup some frr 8.2 config file format,

add support for routemaps,

and also improve custom local configuration merging.

Alexandre Derumier (3):
  frr: update config frrversion to 8.2.2
  frr: add a local config parser and merge with generated config
  frr: config : add exit on router && routemaps.

 PVE/Network/SDN/Controllers/EvpnPlugin.pm     | 102 ++++++++++++++++--
 .../expected_controller_config                |   6 +-
 .../expected_controller_config                |   6 +-
 .../evpn/ebgp/expected_controller_config      |   6 +-
 .../ebgp_loopback/expected_controller_config  |   7 +-
 .../evpn/exitnode/expected_controller_config  |   7 +-
 .../expected_controller_config                |   7 +-
 .../expected_controller_config                |   7 +-
 .../exitnode_snat/expected_controller_config  |   7 +-
 .../evpn/ipv4/expected_controller_config      |   6 +-
 .../evpn/ipv4ipv6/expected_controller_config  |   6 +-
 .../expected_controller_config                |   6 +-
 .../evpn/ipv6/expected_controller_config      |   6 +-
 .../expected_controller_config                |   6 +-
 .../evpn/rt_import/expected_controller_config |   6 +-
 15 files changed, 167 insertions(+), 24 deletions(-)

-- 
2.30.2




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH pve-network 1/3] frr: update config frrversion to 8.2.2
  2022-08-24  8:56 [pve-devel] [PATCH pve-network 0/3] evpn improvment Alexandre Derumier
@ 2022-08-24  8:56 ` Alexandre Derumier
  2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 2/3] frr: add a local config parser and merge with generated config Alexandre Derumier
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alexandre Derumier @ 2022-08-24  8:56 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/Network/SDN/Controllers/EvpnPlugin.pm                       | 2 +-
 test/zones/evpn/advertise_subnets/expected_controller_config    | 2 +-
 .../evpn/disable_arp_nd_suppression/expected_controller_config  | 2 +-
 test/zones/evpn/ebgp/expected_controller_config                 | 2 +-
 test/zones/evpn/ebgp_loopback/expected_controller_config        | 2 +-
 test/zones/evpn/exitnode/expected_controller_config             | 2 +-
 .../evpn/exitnode_local_routing/expected_controller_config      | 2 +-
 test/zones/evpn/exitnode_primary/expected_controller_config     | 2 +-
 test/zones/evpn/exitnode_snat/expected_controller_config        | 2 +-
 test/zones/evpn/ipv4/expected_controller_config                 | 2 +-
 test/zones/evpn/ipv4ipv6/expected_controller_config             | 2 +-
 test/zones/evpn/ipv4ipv6nogateway/expected_controller_config    | 2 +-
 test/zones/evpn/ipv6/expected_controller_config                 | 2 +-
 test/zones/evpn/multipath_relax/expected_controller_config      | 2 +-
 test/zones/evpn/rt_import/expected_controller_config            | 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 22480d4..15b268b 100644
--- a/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -382,7 +382,7 @@ sub generate_controller_rawconfig {
     my $nodename = PVE::INotify::nodename();
 
     my $final_config = [];
-    push @{$final_config}, "frr version 8.0.1";
+    push @{$final_config}, "frr version 8.2.2";
     push @{$final_config}, "frr defaults datacenter";
     push @{$final_config}, "hostname $nodename";
     push @{$final_config}, "log syslog informational";
diff --git a/test/zones/evpn/advertise_subnets/expected_controller_config b/test/zones/evpn/advertise_subnets/expected_controller_config
index 742bbf4..1a7fea2 100644
--- a/test/zones/evpn/advertise_subnets/expected_controller_config
+++ b/test/zones/evpn/advertise_subnets/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config b/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
index 2f819e5..7b6caf6 100644
--- a/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
+++ b/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/ebgp/expected_controller_config b/test/zones/evpn/ebgp/expected_controller_config
index d1956df..20e7dce 100644
--- a/test/zones/evpn/ebgp/expected_controller_config
+++ b/test/zones/evpn/ebgp/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/ebgp_loopback/expected_controller_config b/test/zones/evpn/ebgp_loopback/expected_controller_config
index 905433b..9c53a58 100644
--- a/test/zones/evpn/ebgp_loopback/expected_controller_config
+++ b/test/zones/evpn/ebgp_loopback/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/exitnode/expected_controller_config b/test/zones/evpn/exitnode/expected_controller_config
index 0ee4b8a..7fa9b23 100644
--- a/test/zones/evpn/exitnode/expected_controller_config
+++ b/test/zones/evpn/exitnode/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/exitnode_local_routing/expected_controller_config b/test/zones/evpn/exitnode_local_routing/expected_controller_config
index 6ceaca7..5ddb42b 100644
--- a/test/zones/evpn/exitnode_local_routing/expected_controller_config
+++ b/test/zones/evpn/exitnode_local_routing/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/exitnode_primary/expected_controller_config b/test/zones/evpn/exitnode_primary/expected_controller_config
index dfa158d..3155866 100644
--- a/test/zones/evpn/exitnode_primary/expected_controller_config
+++ b/test/zones/evpn/exitnode_primary/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/exitnode_snat/expected_controller_config b/test/zones/evpn/exitnode_snat/expected_controller_config
index 0ee4b8a..7fa9b23 100644
--- a/test/zones/evpn/exitnode_snat/expected_controller_config
+++ b/test/zones/evpn/exitnode_snat/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/ipv4/expected_controller_config b/test/zones/evpn/ipv4/expected_controller_config
index 2f819e5..7b6caf6 100644
--- a/test/zones/evpn/ipv4/expected_controller_config
+++ b/test/zones/evpn/ipv4/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/ipv4ipv6/expected_controller_config b/test/zones/evpn/ipv4ipv6/expected_controller_config
index 2f819e5..7b6caf6 100644
--- a/test/zones/evpn/ipv4ipv6/expected_controller_config
+++ b/test/zones/evpn/ipv4ipv6/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/ipv4ipv6nogateway/expected_controller_config b/test/zones/evpn/ipv4ipv6nogateway/expected_controller_config
index 2f819e5..7b6caf6 100644
--- a/test/zones/evpn/ipv4ipv6nogateway/expected_controller_config
+++ b/test/zones/evpn/ipv4ipv6nogateway/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/ipv6/expected_controller_config b/test/zones/evpn/ipv6/expected_controller_config
index 2f819e5..7b6caf6 100644
--- a/test/zones/evpn/ipv6/expected_controller_config
+++ b/test/zones/evpn/ipv6/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/multipath_relax/expected_controller_config b/test/zones/evpn/multipath_relax/expected_controller_config
index 4f8d7de..b2df0b5 100644
--- a/test/zones/evpn/multipath_relax/expected_controller_config
+++ b/test/zones/evpn/multipath_relax/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
diff --git a/test/zones/evpn/rt_import/expected_controller_config b/test/zones/evpn/rt_import/expected_controller_config
index 60d22e3..3fd6870 100644
--- a/test/zones/evpn/rt_import/expected_controller_config
+++ b/test/zones/evpn/rt_import/expected_controller_config
@@ -1,4 +1,4 @@
-frr version 8.0.1
+frr version 8.2.2
 frr defaults datacenter
 hostname localhost
 log syslog informational
-- 
2.30.2




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH pve-network 2/3] frr: add a local config parser and merge with generated config
  2022-08-24  8:56 [pve-devel] [PATCH pve-network 0/3] evpn improvment Alexandre Derumier
  2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 1/3] frr: update config frrversion to 8.2.2 Alexandre Derumier
@ 2022-08-24  8:56 ` Alexandre Derumier
  2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 3/3] frr: config : add exit on router && routemaps Alexandre Derumier
  2022-08-31  9:49 ` [pve-devel] applied-series: [PATCH pve-network 0/3] evpn improvment Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Alexandre Derumier @ 2022-08-24  8:56 UTC (permalink / raw)
  To: pve-devel

some users with very specific config want to be able to add
custom local config and merge it with generated config

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/Network/SDN/Controllers/EvpnPlugin.pm | 95 ++++++++++++++++++++---
 1 file changed, 86 insertions(+), 9 deletions(-)

diff --git a/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 15b268b..2bc10f5 100644
--- a/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -376,6 +376,28 @@ sub generate_frr_routemap {
 	}
    }
 }
+
+sub generate_frr_accesslist {
+    my ($final_config, $accesslists) = @_;
+
+    my @config = ();
+
+    for my $id (sort keys %$accesslists) {
+
+	my $accesslist = $accesslists->{$id};
+
+	for my $seq (sort keys %$accesslist) {
+	    my $rule = $accesslist->{$seq};
+	    push @config, "access-list $id seq $seq $rule";
+	}
+    }
+
+    if(@config > 0) {
+	push @{$final_config}, "!";
+	push @{$final_config}, @config;
+    }
+}
+
 sub generate_controller_rawconfig {
     my ($class, $plugin_config, $config) = @_;
 
@@ -390,18 +412,14 @@ sub generate_controller_rawconfig {
     push @{$final_config}, "!";
 
     if (-e "/etc/frr/frr.conf.local") {
-	generate_frr_recurse($final_config, $config->{frr}->{vrf}, "vrf", 1);
-	generate_frr_routemap($final_config, $config->{frr_routemap});
-	push @{$final_config}, "!";
-
 	my $local_conf = file_get_contents("/etc/frr/frr.conf.local");
-	chomp ($local_conf);
-	push @{$final_config}, $local_conf;
-    } else {
-	generate_frr_recurse($final_config, $config->{frr}, undef, 0);
-	generate_frr_routemap($final_config, $config->{frr_routemap});
+	parse_merge_frr_local_config($config, $local_conf);
     }
 
+    generate_frr_recurse($final_config, $config->{frr}, undef, 0);
+    generate_frr_accesslist($final_config, $config->{frr_access_list});
+    generate_frr_routemap($final_config, $config->{frr_routemap});
+
     push @{$final_config}, "!";
     push @{$final_config}, "line vty";
     push @{$final_config}, "!";
@@ -412,6 +430,65 @@ sub generate_controller_rawconfig {
     return $rawconfig;
 }
 
+sub parse_merge_frr_local_config {
+    my ($config, $local_conf) = @_;
+
+    my $section = \$config->{""};
+    my $router = undef;
+    my $routemap = undef;
+    my $routemap_config = ();
+    my $routemap_action = undef;
+
+    while ($local_conf =~ /^\s*(.+?)\s*$/gm) {
+        my $line = $1;
+	$line =~ s/^\s+|\s+$//g;
+
+	if ($line =~ m/^router (.+)$/) {
+	    $router = $1;
+	    $section = \$config->{'frr'}->{'router'}->{$router}->{""};
+	    next;
+	} elsif ($line =~ m/^vrf (.+)$/) {
+	    $section = \$config->{'frr'}->{'vrf'}->{$1};
+	    next;
+	} elsif ($line =~ m/address-family (.+)$/) {
+	    $section = \$config->{'frr'}->{'router'}->{$router}->{'address-family'}->{$1};
+	    next;
+	} elsif ($line =~ m/^route-map (.+) (permit|deny) (\d+)/) {
+	    $routemap = $1;
+	    $routemap_config = ();
+	    $routemap_action = $2;
+	    $section = \$config->{'frr_routemap'}->{$routemap};
+	    next;
+	} elsif ($line =~ m/^access-list (.+) seq (\d+) (.+)$/) {
+	    $config->{'frr_access_list'}->{$1}->{$2} = $3;
+	    next;
+	} elsif($line =~ m/^exit-address-family$/) {
+	    next;
+	} elsif($line =~ m/^exit$/) {
+	    if($router) {
+		$section = \$config->{''};
+		$router = undef;
+	    } elsif($routemap) {
+		push(@{$$section}, { rule => $routemap_config, action => $routemap_action });
+		$section = \$config->{''};
+		$routemap = undef;
+		$routemap_action = undef;
+		$routemap_config = ();
+	    }
+	    next;
+	} elsif($line =~ m/!/) {
+	    next;
+	}
+
+	next if !$section;
+	if($routemap) {
+	    push(@{$routemap_config}, $line);
+	} else {
+	    push(@{$$section}, $line);
+	}
+    }
+}
+
 sub write_controller_config {
     my ($class, $plugin_config, $config) = @_;
 
-- 
2.30.2




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] [PATCH pve-network 3/3] frr: config : add exit on router && routemaps.
  2022-08-24  8:56 [pve-devel] [PATCH pve-network 0/3] evpn improvment Alexandre Derumier
  2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 1/3] frr: update config frrversion to 8.2.2 Alexandre Derumier
  2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 2/3] frr: add a local config parser and merge with generated config Alexandre Derumier
@ 2022-08-24  8:56 ` Alexandre Derumier
  2022-08-31  9:49 ` [pve-devel] applied-series: [PATCH pve-network 0/3] evpn improvment Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Alexandre Derumier @ 2022-08-24  8:56 UTC (permalink / raw)
  To: pve-devel

added recently in last frr releases,

just to be sure to no break on future releases

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 PVE/Network/SDN/Controllers/EvpnPlugin.pm                    | 5 +++++
 test/zones/evpn/advertise_subnets/expected_controller_config | 4 ++++
 .../disable_arp_nd_suppression/expected_controller_config    | 4 ++++
 test/zones/evpn/ebgp/expected_controller_config              | 4 ++++
 test/zones/evpn/ebgp_loopback/expected_controller_config     | 5 +++++
 test/zones/evpn/exitnode/expected_controller_config          | 5 +++++
 .../evpn/exitnode_local_routing/expected_controller_config   | 5 +++++
 test/zones/evpn/exitnode_primary/expected_controller_config  | 5 +++++
 test/zones/evpn/exitnode_snat/expected_controller_config     | 5 +++++
 test/zones/evpn/ipv4/expected_controller_config              | 4 ++++
 test/zones/evpn/ipv4ipv6/expected_controller_config          | 4 ++++
 test/zones/evpn/ipv4ipv6nogateway/expected_controller_config | 4 ++++
 test/zones/evpn/ipv6/expected_controller_config              | 4 ++++
 test/zones/evpn/multipath_relax/expected_controller_config   | 4 ++++
 test/zones/evpn/rt_import/expected_controller_config         | 4 ++++
 15 files changed, 66 insertions(+)

diff --git a/PVE/Network/SDN/Controllers/EvpnPlugin.pm b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
index 2bc10f5..857ad04 100644
--- a/PVE/Network/SDN/Controllers/EvpnPlugin.pm
+++ b/PVE/Network/SDN/Controllers/EvpnPlugin.pm
@@ -325,6 +325,9 @@ sub generate_frr_recurse{
    $exitkeylist->{vrf} = 1;
    $exitkeylist->{'address-family'} = 1;
 
+   my $simple_exitkeylist = {};
+   $simple_exitkeylist->{router} = 1;
+
    # FIXME: make this generic
    my $paddinglevel = undef;
    if ($level == 1 || $level == 2) {
@@ -349,6 +352,7 @@ sub generate_frr_recurse{
 	    generate_frr_recurse($final_config, $option, $key, $level+1);
 
 	    push @{$final_config}, $padding."exit-$parentkey" if $parentkey && defined($exitkeylist->{$parentkey});
+	    push @{$final_config}, $padding."exit" if $parentkey && defined($simple_exitkeylist->{$parentkey});
 	}
     }
 
@@ -373,6 +377,7 @@ sub generate_frr_routemap {
 		my $rule = $seq->{rule};
 		push @config, map { " $_" } @$rule;
 		push @{$final_config}, @config;
+		push @{$final_config}, "exit";
 	}
    }
 }
diff --git a/test/zones/evpn/advertise_subnets/expected_controller_config b/test/zones/evpn/advertise_subnets/expected_controller_config
index 1a7fea2..82b06b4 100644
--- a/test/zones/evpn/advertise_subnets/expected_controller_config
+++ b/test/zones/evpn/advertise_subnets/expected_controller_config
@@ -25,6 +25,7 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
@@ -41,10 +42,13 @@ router bgp 65000 vrf vrf_myzone
   advertise ipv4 unicast
   advertise ipv6 unicast
  exit-address-family
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config b/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
index 7b6caf6..bd7830a 100644
--- a/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
+++ b/test/zones/evpn/disable_arp_nd_suppression/expected_controller_config
@@ -25,13 +25,17 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/ebgp/expected_controller_config b/test/zones/evpn/ebgp/expected_controller_config
index 20e7dce..ccc0b28 100644
--- a/test/zones/evpn/ebgp/expected_controller_config
+++ b/test/zones/evpn/ebgp/expected_controller_config
@@ -37,6 +37,7 @@ router bgp 65001
   advertise-all-vni
   autort as 65000
  exit-address-family
+exit
 !
 router bgp 65001 vrf vrf_myzone
  bgp router-id 192.168.0.1
@@ -45,10 +46,13 @@ router bgp 65001 vrf vrf_myzone
   route-target import 65000:1000
   route-target export 65000:1000
  exit-address-family
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/ebgp_loopback/expected_controller_config b/test/zones/evpn/ebgp_loopback/expected_controller_config
index 9c53a58..64fca31 100644
--- a/test/zones/evpn/ebgp_loopback/expected_controller_config
+++ b/test/zones/evpn/ebgp_loopback/expected_controller_config
@@ -42,6 +42,7 @@ router bgp 65001
   advertise-all-vni
   autort as 65000
  exit-address-family
+exit
 !
 router bgp 65001 vrf vrf_myzone
  bgp router-id 192.168.0.1
@@ -50,14 +51,18 @@ router bgp 65001 vrf vrf_myzone
   route-target import 65000:1000
   route-target export 65000:1000
  exit-address-family
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 route-map correct_src permit 1
  match ip address prefix-list loopbacks_ips
  set src 192.168.0.1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/exitnode/expected_controller_config b/test/zones/evpn/exitnode/expected_controller_config
index 7fa9b23..48830a3 100644
--- a/test/zones/evpn/exitnode/expected_controller_config
+++ b/test/zones/evpn/exitnode/expected_controller_config
@@ -33,6 +33,7 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
@@ -49,13 +50,17 @@ router bgp 65000 vrf vrf_myzone
   default-originate ipv4
   default-originate ipv6
  exit-address-family
+exit
 !
 route-map MAP_VTEP_IN deny 1
  match evpn route-type prefix
+exit
 !
 route-map MAP_VTEP_IN permit 2
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/exitnode_local_routing/expected_controller_config b/test/zones/evpn/exitnode_local_routing/expected_controller_config
index 5ddb42b..f671b63 100644
--- a/test/zones/evpn/exitnode_local_routing/expected_controller_config
+++ b/test/zones/evpn/exitnode_local_routing/expected_controller_config
@@ -26,6 +26,7 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
@@ -34,13 +35,17 @@ router bgp 65000 vrf vrf_myzone
   default-originate ipv4
   default-originate ipv6
  exit-address-family
+exit
 !
 route-map MAP_VTEP_IN deny 1
  match evpn route-type prefix
+exit
 !
 route-map MAP_VTEP_IN permit 2
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/exitnode_primary/expected_controller_config b/test/zones/evpn/exitnode_primary/expected_controller_config
index 3155866..e45b22c 100644
--- a/test/zones/evpn/exitnode_primary/expected_controller_config
+++ b/test/zones/evpn/exitnode_primary/expected_controller_config
@@ -33,6 +33,7 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
@@ -49,15 +50,19 @@ router bgp 65000 vrf vrf_myzone
   default-originate ipv4
   default-originate ipv6
  exit-address-family
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
  match evpn vni 1000
  match evpn route-type prefix
  set metric 200
+exit
 !
 route-map MAP_VTEP_OUT permit 2
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/exitnode_snat/expected_controller_config b/test/zones/evpn/exitnode_snat/expected_controller_config
index 7fa9b23..48830a3 100644
--- a/test/zones/evpn/exitnode_snat/expected_controller_config
+++ b/test/zones/evpn/exitnode_snat/expected_controller_config
@@ -33,6 +33,7 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
@@ -49,13 +50,17 @@ router bgp 65000 vrf vrf_myzone
   default-originate ipv4
   default-originate ipv6
  exit-address-family
+exit
 !
 route-map MAP_VTEP_IN deny 1
  match evpn route-type prefix
+exit
 !
 route-map MAP_VTEP_IN permit 2
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/ipv4/expected_controller_config b/test/zones/evpn/ipv4/expected_controller_config
index 7b6caf6..bd7830a 100644
--- a/test/zones/evpn/ipv4/expected_controller_config
+++ b/test/zones/evpn/ipv4/expected_controller_config
@@ -25,13 +25,17 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/ipv4ipv6/expected_controller_config b/test/zones/evpn/ipv4ipv6/expected_controller_config
index 7b6caf6..bd7830a 100644
--- a/test/zones/evpn/ipv4ipv6/expected_controller_config
+++ b/test/zones/evpn/ipv4ipv6/expected_controller_config
@@ -25,13 +25,17 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/ipv4ipv6nogateway/expected_controller_config b/test/zones/evpn/ipv4ipv6nogateway/expected_controller_config
index 7b6caf6..bd7830a 100644
--- a/test/zones/evpn/ipv4ipv6nogateway/expected_controller_config
+++ b/test/zones/evpn/ipv4ipv6nogateway/expected_controller_config
@@ -25,13 +25,17 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/ipv6/expected_controller_config b/test/zones/evpn/ipv6/expected_controller_config
index 7b6caf6..bd7830a 100644
--- a/test/zones/evpn/ipv6/expected_controller_config
+++ b/test/zones/evpn/ipv6/expected_controller_config
@@ -25,13 +25,17 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/multipath_relax/expected_controller_config b/test/zones/evpn/multipath_relax/expected_controller_config
index b2df0b5..2d1ad44 100644
--- a/test/zones/evpn/multipath_relax/expected_controller_config
+++ b/test/zones/evpn/multipath_relax/expected_controller_config
@@ -37,13 +37,17 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
diff --git a/test/zones/evpn/rt_import/expected_controller_config b/test/zones/evpn/rt_import/expected_controller_config
index 3fd6870..f4f28dd 100644
--- a/test/zones/evpn/rt_import/expected_controller_config
+++ b/test/zones/evpn/rt_import/expected_controller_config
@@ -25,6 +25,7 @@ router bgp 65000
   neighbor VTEP activate
   advertise-all-vni
  exit-address-family
+exit
 !
 router bgp 65000 vrf vrf_myzone
  bgp router-id 192.168.0.1
@@ -34,10 +35,13 @@ router bgp 65000 vrf vrf_myzone
   route-target import 65002:1000
   route-target import 65003:1000
  exit-address-family
+exit
 !
 route-map MAP_VTEP_IN permit 1
+exit
 !
 route-map MAP_VTEP_OUT permit 1
+exit
 !
 line vty
 !
\ No newline at end of file
-- 
2.30.2




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pve-devel] applied-series: [PATCH pve-network 0/3] evpn improvment
  2022-08-24  8:56 [pve-devel] [PATCH pve-network 0/3] evpn improvment Alexandre Derumier
                   ` (2 preceding siblings ...)
  2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 3/3] frr: config : add exit on router && routemaps Alexandre Derumier
@ 2022-08-31  9:49 ` Thomas Lamprecht
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2022-08-31  9:49 UTC (permalink / raw)
  To: Proxmox VE development discussion, Alexandre Derumier

Am 24/08/2022 um 10:56 schrieb Alexandre Derumier:
> This patches series cleanup some frr 8.2 config file format,
> 
> add support for routemaps,
> 
> and also improve custom local configuration merging.
> 
> Alexandre Derumier (3):
>   frr: update config frrversion to 8.2.2
>   frr: add a local config parser and merge with generated config
>   frr: config : add exit on router && routemaps.
> 
>  PVE/Network/SDN/Controllers/EvpnPlugin.pm     | 102 ++++++++++++++++--
>  .../expected_controller_config                |   6 +-
>  .../expected_controller_config                |   6 +-
>  .../evpn/ebgp/expected_controller_config      |   6 +-
>  .../ebgp_loopback/expected_controller_config  |   7 +-
>  .../evpn/exitnode/expected_controller_config  |   7 +-
>  .../expected_controller_config                |   7 +-
>  .../expected_controller_config                |   7 +-
>  .../exitnode_snat/expected_controller_config  |   7 +-
>  .../evpn/ipv4/expected_controller_config      |   6 +-
>  .../evpn/ipv4ipv6/expected_controller_config  |   6 +-
>  .../expected_controller_config                |   6 +-
>  .../evpn/ipv6/expected_controller_config      |   6 +-
>  .../expected_controller_config                |   6 +-
>  .../evpn/rt_import/expected_controller_config |   6 +-
>  15 files changed, 167 insertions(+), 24 deletions(-)
> 

applied, thanks!




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-31  9:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24  8:56 [pve-devel] [PATCH pve-network 0/3] evpn improvment Alexandre Derumier
2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 1/3] frr: update config frrversion to 8.2.2 Alexandre Derumier
2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 2/3] frr: add a local config parser and merge with generated config Alexandre Derumier
2022-08-24  8:56 ` [pve-devel] [PATCH pve-network 3/3] frr: config : add exit on router && routemaps Alexandre Derumier
2022-08-31  9:49 ` [pve-devel] applied-series: [PATCH pve-network 0/3] evpn improvment Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal