Signed-off-by: Hannes Laimer <[email protected]>
---
 .../expected_controller_config                | 64 ++++++++++++++
 .../expected_sdn_interfaces                   | 56 ++++++++++++
 .../exitnode_local_routing_ipv6/interfaces    |  7 ++
 .../exitnode_local_routing_ipv6/sdn_config    | 27 ++++++
 .../expected_controller_config                | 86 +++++++++++++++++++
 .../expected_sdn_interfaces                   | 64 ++++++++++++++
 .../evpn/openfabric_fabric_ipv6/interfaces    |  6 ++
 .../evpn/openfabric_fabric_ipv6/sdn_config    | 83 ++++++++++++++++++
 .../expected_controller_config                | 74 ++++++++++++++++
 .../expected_sdn_interfaces                   | 58 +++++++++++++
 .../openfabric_fabric_ipv6_only/interfaces    |  6 ++
 .../openfabric_fabric_ipv6_only/sdn_config    | 79 +++++++++++++++++
 12 files changed, 610 insertions(+)
 create mode 100644 
src/test/zones/evpn/exitnode_local_routing_ipv6/expected_controller_config
 create mode 100644 
src/test/zones/evpn/exitnode_local_routing_ipv6/expected_sdn_interfaces
 create mode 100644 src/test/zones/evpn/exitnode_local_routing_ipv6/interfaces
 create mode 100644 src/test/zones/evpn/exitnode_local_routing_ipv6/sdn_config
 create mode 100644 
src/test/zones/evpn/openfabric_fabric_ipv6/expected_controller_config
 create mode 100644 
src/test/zones/evpn/openfabric_fabric_ipv6/expected_sdn_interfaces
 create mode 100644 src/test/zones/evpn/openfabric_fabric_ipv6/interfaces
 create mode 100644 src/test/zones/evpn/openfabric_fabric_ipv6/sdn_config
 create mode 100644 
src/test/zones/evpn/openfabric_fabric_ipv6_only/expected_controller_config
 create mode 100644 
src/test/zones/evpn/openfabric_fabric_ipv6_only/expected_sdn_interfaces
 create mode 100644 src/test/zones/evpn/openfabric_fabric_ipv6_only/interfaces
 create mode 100644 src/test/zones/evpn/openfabric_fabric_ipv6_only/sdn_config

diff --git 
a/src/test/zones/evpn/exitnode_local_routing_ipv6/expected_controller_config 
b/src/test/zones/evpn/exitnode_local_routing_ipv6/expected_controller_config
new file mode 100644
index 0000000..8d7c225
--- /dev/null
+++ b/src/test/zones/evpn/exitnode_local_routing_ipv6/expected_controller_config
@@ -0,0 +1,64 @@
+frr version 10.4.1
+frr defaults datacenter
+hostname localhost
+log syslog informational
+service integrated-vtysh-config
+!
+!
+vrf vrf_myzone
+ vni 1000
+exit-vrf
+!
+router bgp 65000
+ bgp router-id 192.168.0.1
+ no bgp hard-administrative-reset
+ no bgp default ipv4-unicast
+ coalesce-time 1000
+ no bgp graceful-restart notification
+ neighbor VTEP peer-group
+ neighbor VTEP remote-as 65000
+ neighbor VTEP bfd
+ neighbor 192.168.0.2 peer-group VTEP
+ neighbor 192.168.0.3 peer-group VTEP
+ !
+ address-family l2vpn evpn
+  neighbor VTEP activate
+  neighbor VTEP route-map MAP_VTEP_IN in
+  neighbor VTEP route-map MAP_VTEP_OUT out
+  advertise-all-vni
+ exit-address-family
+exit
+!
+router bgp 65000 vrf vrf_myzone
+ bgp router-id 192.168.0.1
+ no bgp hard-administrative-reset
+ no bgp graceful-restart notification
+ !
+ address-family l2vpn evpn
+  default-originate ipv4
+  default-originate ipv6
+ exit-address-family
+exit
+!
+ip prefix-list only_default seq 1 permit 0.0.0.0/0
+!
+ipv6 prefix-list only_default_v6 seq 1 permit ::/0
+!
+route-map MAP_VTEP_IN deny 1
+ match ip address prefix-list only_default
+exit
+!
+route-map MAP_VTEP_IN deny 2
+ match ipv6 address prefix-list only_default_v6
+exit
+!
+route-map MAP_VTEP_IN permit 3
+exit
+!
+route-map MAP_VTEP_OUT permit 1
+exit
+!
+ip route 2a08:2142:302:3::/64 10.255.255.2 xvrf_myzone
+!
+line vty
+!
diff --git 
a/src/test/zones/evpn/exitnode_local_routing_ipv6/expected_sdn_interfaces 
b/src/test/zones/evpn/exitnode_local_routing_ipv6/expected_sdn_interfaces
new file mode 100644
index 0000000..53a03a9
--- /dev/null
+++ b/src/test/zones/evpn/exitnode_local_routing_ipv6/expected_sdn_interfaces
@@ -0,0 +1,56 @@
+#version:1
+
+auto myvnet
+iface myvnet
+       address 2a08:2142:302:3::1/64
+       bridge_ports vxlan_myvnet
+       bridge_stp off
+       bridge_fd 0
+       mtu 1450
+       ip6-forward on
+       arp-accept on
+       vrf vrf_myzone
+
+auto vrf_myzone
+iface vrf_myzone
+       vrf-table auto
+       post-up ip route del vrf vrf_myzone unreachable default metric 
4278198272
+
+auto vrfbr_myzone
+iface vrfbr_myzone
+       bridge-ports vrfvx_myzone
+       bridge_stp off
+       bridge_fd 0
+       mtu 1450
+       vrf vrf_myzone
+
+auto vrfvx_myzone
+iface vrfvx_myzone
+       vxlan-id 1000
+       vxlan-local-tunnelip 192.168.0.1
+       bridge-learning off
+       bridge-arp-nd-suppress on
+       mtu 1450
+
+auto vxlan_myvnet
+iface vxlan_myvnet
+       vxlan-id 100
+       vxlan-local-tunnelip 192.168.0.1
+       bridge-learning off
+       bridge-arp-nd-suppress on
+       mtu 1450
+
+auto xvrf_myzone
+iface xvrf_myzone
+       link-type veth
+       address 10.255.255.1/30
+       veth-peer-name xvrfp_myzone
+       mtu 1500
+
+auto xvrfp_myzone
+iface xvrfp_myzone
+       link-type veth
+       address 10.255.255.2/30
+       veth-peer-name xvrf_myzone
+       vrf vrf_myzone
+       mtu 1500
diff --git a/src/test/zones/evpn/exitnode_local_routing_ipv6/interfaces 
b/src/test/zones/evpn/exitnode_local_routing_ipv6/interfaces
new file mode 100644
index 0000000..66bb826
--- /dev/null
+++ b/src/test/zones/evpn/exitnode_local_routing_ipv6/interfaces
@@ -0,0 +1,7 @@
+auto vmbr0
+iface vmbr0 inet static
+       address 192.168.0.1/24
+       gateway 192.168.0.254
+        bridge-ports eth0
+        bridge-stp off
+        bridge-fd 0
diff --git a/src/test/zones/evpn/exitnode_local_routing_ipv6/sdn_config 
b/src/test/zones/evpn/exitnode_local_routing_ipv6/sdn_config
new file mode 100644
index 0000000..499b13a
--- /dev/null
+++ b/src/test/zones/evpn/exitnode_local_routing_ipv6/sdn_config
@@ -0,0 +1,27 @@
+{
+  version => 1,
+  vnets   => {
+               ids => {
+                        myvnet => { tag => "100", type => "vnet", zone => 
"myzone" },
+                      },
+             },
+
+  zones   => {
+               ids => { myzone => { ipam => "pve", type => "evpn", controller 
=> "evpnctl", 'vrf-vxlan' => 1000, exitnodes => { 'localhost' => 1 }, 
'exitnodes-local-routing' => 1 },
+                     },
+             },
+  controllers  => {
+               ids => { evpnctl => { type => "evpn", 'peers' => 
'192.168.0.1,192.168.0.2,192.168.0.3', asn => "65000" } },
+             },
+
+  subnets => {
+              ids => { 'myzone-2a08:2142:302:3::-64' => {
+                                                       'type' => 'subnet',
+                                                       'vnet' => 'myvnet',
+                                                       'gateway' => 
'2a08:2142:302:3::1',
+                                                 },
+                    }
+            }
+}
+
+
diff --git 
a/src/test/zones/evpn/openfabric_fabric_ipv6/expected_controller_config 
b/src/test/zones/evpn/openfabric_fabric_ipv6/expected_controller_config
new file mode 100644
index 0000000..4402476
--- /dev/null
+++ b/src/test/zones/evpn/openfabric_fabric_ipv6/expected_controller_config
@@ -0,0 +1,86 @@
+frr version 10.4.1
+frr defaults datacenter
+hostname localhost
+log syslog informational
+service integrated-vtysh-config
+!
+!
+vrf vrf_evpn
+ vni 100
+exit-vrf
+!
+router bgp 65000
+ bgp router-id 17.29.105.96
+ no bgp hard-administrative-reset
+ no bgp default ipv4-unicast
+ coalesce-time 1000
+ no bgp graceful-restart notification
+ neighbor VTEP peer-group
+ neighbor VTEP remote-as 65000
+ neighbor VTEP bfd
+ neighbor VTEP update-source dummy_test
+ neighbor fd00::2 peer-group VTEP
+ neighbor fd00::3 peer-group VTEP
+ !
+ address-family l2vpn evpn
+  neighbor VTEP activate
+  neighbor VTEP route-map MAP_VTEP_IN in
+  neighbor VTEP route-map MAP_VTEP_OUT out
+  advertise-all-vni
+ exit-address-family
+exit
+!
+router bgp 65000 vrf vrf_evpn
+ bgp router-id 17.29.105.96
+ no bgp hard-administrative-reset
+ no bgp graceful-restart notification
+exit
+!
+route-map MAP_VTEP_IN permit 1
+exit
+!
+route-map MAP_VTEP_OUT permit 1
+exit
+router openfabric test
+ net 49.0001.1720.2000.3001.00
+exit
+!
+interface dummy_test
+ ipv6 router openfabric test
+ ip router openfabric test
+ openfabric passive
+exit
+!
+interface ens20
+ ipv6 router openfabric test
+ ip router openfabric test
+ openfabric hello-interval 1
+exit
+!
+interface ens21
+ ipv6 router openfabric test
+ ip router openfabric test
+ openfabric hello-interval 1
+exit
+!
+access-list pve_openfabric_test_ips permit 172.20.3.0/24
+!
+ipv6 access-list pve_openfabric_test_ip6s permit fd00::/64
+!
+route-map pve_openfabric permit 100
+ match ip address pve_openfabric_test_ips
+ set src 172.20.3.1
+exit
+!
+route-map pve_openfabric6 permit 110
+ match ipv6 address pve_openfabric_test_ip6s
+ set src fd00::1
+exit
+!
+ip protocol openfabric route-map pve_openfabric
+!
+ipv6 protocol openfabric route-map pve_openfabric6
+!
+!
+line vty
+!
diff --git a/src/test/zones/evpn/openfabric_fabric_ipv6/expected_sdn_interfaces 
b/src/test/zones/evpn/openfabric_fabric_ipv6/expected_sdn_interfaces
new file mode 100644
index 0000000..d017713
--- /dev/null
+++ b/src/test/zones/evpn/openfabric_fabric_ipv6/expected_sdn_interfaces
@@ -0,0 +1,64 @@
+#version:1
+
+auto vnet0
+iface vnet0
+       address 10.123.123.1/24
+       hwaddress BC:24:11:3B:39:34
+       bridge_ports vxlan_vnet0
+       bridge_stp off
+       bridge_fd 0
+       mtu 1450
+       ip-forward on
+       arp-accept on
+       vrf vrf_evpn
+
+auto vrf_evpn
+iface vrf_evpn
+       vrf-table auto
+       post-up ip route add vrf vrf_evpn unreachable default metric 4278198272
+
+auto vrfbr_evpn
+iface vrfbr_evpn
+       bridge-ports vrfvx_evpn
+       bridge_stp off
+       bridge_fd 0
+       mtu 1450
+       vrf vrf_evpn
+
+auto vrfvx_evpn
+iface vrfvx_evpn
+       vxlan-id 100
+       vxlan-local-tunnelip fd00::1
+       bridge-learning off
+       bridge-arp-nd-suppress on
+       mtu 1450
+
+auto vxlan_vnet0
+iface vxlan_vnet0
+       vxlan-id 123456
+       vxlan-local-tunnelip fd00::1
+       bridge-learning off
+       bridge-arp-nd-suppress on
+       mtu 1450
+
+auto dummy_test
+iface dummy_test inet static
+       address 172.20.3.1/32
+       link-type dummy
+       ip-forward 1
+
+auto dummy_test
+iface dummy_test inet6 static
+       address fd00::1/128
+       link-type dummy
+       ip-forward 1
+
+auto ens20
+iface ens20 inet static
+       address 172.20.3.1/32
+       ip-forward 1
+
+auto ens21
+iface ens21 inet static
+       address 172.20.3.1/32
+       ip-forward 1
diff --git a/src/test/zones/evpn/openfabric_fabric_ipv6/interfaces 
b/src/test/zones/evpn/openfabric_fabric_ipv6/interfaces
new file mode 100644
index 0000000..1b4384b
--- /dev/null
+++ b/src/test/zones/evpn/openfabric_fabric_ipv6/interfaces
@@ -0,0 +1,6 @@
+auto vmbr0
+iface vmbr0 inet static
+       address 172.20.3.1/32
+    bridge-ports eth0
+    bridge-stp off
+    bridge-fd 0
diff --git a/src/test/zones/evpn/openfabric_fabric_ipv6/sdn_config 
b/src/test/zones/evpn/openfabric_fabric_ipv6/sdn_config
new file mode 100644
index 0000000..6fe01cc
--- /dev/null
+++ b/src/test/zones/evpn/openfabric_fabric_ipv6/sdn_config
@@ -0,0 +1,83 @@
+{
+          'zones' => {
+                       'ids' => {
+                                  'evpn' => {
+                                              'type' => 'evpn',
+                                              'ipam' => 'pve',
+                                              'mac' => 'BC:24:11:3B:39:34',
+                                              'controller' => 'ctrl',
+                                              'vrf-vxlan' => 100
+                                            }
+                                }
+                     },
+          'vnets' => {
+                       'ids' => {
+                                  'vnet0' => {
+                                               'zone' => 'evpn',
+                                               'type' => 'vnet',
+                                               'tag' => 123456
+                                             }
+                                }
+                     },
+          'version' => 1,
+          'subnets' => {
+                         'ids' => {
+                                    'evpn-10.123.123.0-24' => {
+                                                                'vnet' => 
'vnet0',
+                                                                'type' => 
'subnet',
+                                                                'gateway' => 
'10.123.123.1'
+                                                              }
+                                  }
+                       },
+          'controllers' => {
+                             'ids' => {
+                                        'ctrl' => {
+                                                    'fabric' => 'test',
+                                                    'asn' => 65000,
+                                                    'type' => 'evpn'
+                                                  }
+                                      }
+                           },
+           'fabrics' => {
+                 'ids' => {
+                               'test' => {
+                                           'type' => 'openfabric_fabric',
+                                           'id' => 'test',
+                                           'hello_interval' => 1,
+                                          'ip_prefix' => '172.20.3.0/24',
+                                          'ip6_prefix' => 'fd00::/64',
+                                         },
+                               'test_localhost' => {
+                                                   'interfaces' => [
+                                                                    
'name=ens20',
+                                                                    
'name=ens21'
+                                                                  ],
+                                                   'id' => 'test_localhost',
+                                                   'type' => 'openfabric_node',
+                                                 'ip' => '172.20.3.1',
+                                                 'ip6' => 'fd00::1',
+                                                 },
+                               'test_pathfinder' => {
+                                                      'id' => 
'test_pathfinder',
+                                                      'interfaces' => [
+                                                                       
'name=ens20',
+                                                                       
'name=ens21'
+                                                                     ],
+                                                     'ip' => '172.20.3.2',
+                                                     'ip6' => 'fd00::2',
+                                                      'type' => 
'openfabric_node',
+                                                    },
+                               'test_raider' => {
+                                                 'ip' => '172.20.3.3',
+                                                 'ip6' => 'fd00::3',
+                                                  'type' => 'openfabric_node',
+                                                  'interfaces' => [
+                                                                   
'name=ens21',
+                                                                   'name=ens20'
+                                                                 ],
+                                                  'id' => 'test_raider',
+                                                }
+                                     }
+              }
+        };
+
diff --git 
a/src/test/zones/evpn/openfabric_fabric_ipv6_only/expected_controller_config 
b/src/test/zones/evpn/openfabric_fabric_ipv6_only/expected_controller_config
new file mode 100644
index 0000000..fbdc168
--- /dev/null
+++ b/src/test/zones/evpn/openfabric_fabric_ipv6_only/expected_controller_config
@@ -0,0 +1,74 @@
+frr version 10.4.1
+frr defaults datacenter
+hostname localhost
+log syslog informational
+service integrated-vtysh-config
+!
+!
+vrf vrf_evpn
+ vni 100
+exit-vrf
+!
+router bgp 65000
+ bgp router-id 17.29.105.96
+ no bgp hard-administrative-reset
+ no bgp default ipv4-unicast
+ coalesce-time 1000
+ no bgp graceful-restart notification
+ neighbor VTEP peer-group
+ neighbor VTEP remote-as 65000
+ neighbor VTEP bfd
+ neighbor VTEP update-source dummy_test
+ neighbor fd00::2 peer-group VTEP
+ neighbor fd00::3 peer-group VTEP
+ !
+ address-family l2vpn evpn
+  neighbor VTEP activate
+  neighbor VTEP route-map MAP_VTEP_IN in
+  neighbor VTEP route-map MAP_VTEP_OUT out
+  advertise-all-vni
+ exit-address-family
+exit
+!
+router bgp 65000 vrf vrf_evpn
+ bgp router-id 17.29.105.96
+ no bgp hard-administrative-reset
+ no bgp graceful-restart notification
+exit
+!
+route-map MAP_VTEP_IN permit 1
+exit
+!
+route-map MAP_VTEP_OUT permit 1
+exit
+router openfabric test
+ net 49.0001.0000.0000.0001.00
+exit
+!
+interface dummy_test
+ ipv6 router openfabric test
+ openfabric passive
+exit
+!
+interface ens20
+ ipv6 router openfabric test
+ openfabric hello-interval 1
+exit
+!
+interface ens21
+ ipv6 router openfabric test
+ openfabric hello-interval 1
+exit
+!
+ipv6 access-list pve_openfabric_test_ip6s permit fd00::/64
+!
+route-map pve_openfabric6 permit 100
+ match ipv6 address pve_openfabric_test_ip6s
+ set src fd00::1
+exit
+!
+ipv6 protocol openfabric route-map pve_openfabric6
+!
+!
+line vty
+!
diff --git 
a/src/test/zones/evpn/openfabric_fabric_ipv6_only/expected_sdn_interfaces 
b/src/test/zones/evpn/openfabric_fabric_ipv6_only/expected_sdn_interfaces
new file mode 100644
index 0000000..51507d7
--- /dev/null
+++ b/src/test/zones/evpn/openfabric_fabric_ipv6_only/expected_sdn_interfaces
@@ -0,0 +1,58 @@
+#version:1
+
+auto vnet0
+iface vnet0
+       address 10.123.123.1/24
+       hwaddress BC:24:11:3B:39:34
+       bridge_ports vxlan_vnet0
+       bridge_stp off
+       bridge_fd 0
+       mtu 1450
+       ip-forward on
+       arp-accept on
+       vrf vrf_evpn
+
+auto vrf_evpn
+iface vrf_evpn
+       vrf-table auto
+       post-up ip route add vrf vrf_evpn unreachable default metric 4278198272
+
+auto vrfbr_evpn
+iface vrfbr_evpn
+       bridge-ports vrfvx_evpn
+       bridge_stp off
+       bridge_fd 0
+       mtu 1450
+       vrf vrf_evpn
+
+auto vrfvx_evpn
+iface vrfvx_evpn
+       vxlan-id 100
+       vxlan-local-tunnelip fd00::1
+       bridge-learning off
+       bridge-arp-nd-suppress on
+       mtu 1450
+
+auto vxlan_vnet0
+iface vxlan_vnet0
+       vxlan-id 123456
+       vxlan-local-tunnelip fd00::1
+       bridge-learning off
+       bridge-arp-nd-suppress on
+       mtu 1450
+
+auto dummy_test
+iface dummy_test inet6 static
+       address fd00::1/128
+       link-type dummy
+       ip-forward 1
+
+auto ens20
+iface ens20 inet6 static
+       address fd00::1/128
+       ip-forward 1
+
+auto ens21
+iface ens21 inet6 static
+       address fd00::1/128
+       ip-forward 1
diff --git a/src/test/zones/evpn/openfabric_fabric_ipv6_only/interfaces 
b/src/test/zones/evpn/openfabric_fabric_ipv6_only/interfaces
new file mode 100644
index 0000000..1b4384b
--- /dev/null
+++ b/src/test/zones/evpn/openfabric_fabric_ipv6_only/interfaces
@@ -0,0 +1,6 @@
+auto vmbr0
+iface vmbr0 inet static
+       address 172.20.3.1/32
+    bridge-ports eth0
+    bridge-stp off
+    bridge-fd 0
diff --git a/src/test/zones/evpn/openfabric_fabric_ipv6_only/sdn_config 
b/src/test/zones/evpn/openfabric_fabric_ipv6_only/sdn_config
new file mode 100644
index 0000000..5dc2163
--- /dev/null
+++ b/src/test/zones/evpn/openfabric_fabric_ipv6_only/sdn_config
@@ -0,0 +1,79 @@
+{
+          'zones' => {
+                       'ids' => {
+                                  'evpn' => {
+                                              'type' => 'evpn',
+                                              'ipam' => 'pve',
+                                              'mac' => 'BC:24:11:3B:39:34',
+                                              'controller' => 'ctrl',
+                                              'vrf-vxlan' => 100
+                                            }
+                                }
+                     },
+          'vnets' => {
+                       'ids' => {
+                                  'vnet0' => {
+                                               'zone' => 'evpn',
+                                               'type' => 'vnet',
+                                               'tag' => 123456
+                                             }
+                                }
+                     },
+          'version' => 1,
+          'subnets' => {
+                         'ids' => {
+                                    'evpn-10.123.123.0-24' => {
+                                                                'vnet' => 
'vnet0',
+                                                                'type' => 
'subnet',
+                                                                'gateway' => 
'10.123.123.1'
+                                                              }
+                                  }
+                       },
+          'controllers' => {
+                             'ids' => {
+                                        'ctrl' => {
+                                                    'fabric' => 'test',
+                                                    'asn' => 65000,
+                                                    'type' => 'evpn'
+                                                  }
+                                      }
+                           },
+           'fabrics' => {
+                 'ids' => {
+                               'test' => {
+                                           'type' => 'openfabric_fabric',
+                                           'id' => 'test',
+                                           'hello_interval' => 1,
+                                          'ip6_prefix' => 'fd00::/64',
+                                         },
+                               'test_localhost' => {
+                                                   'interfaces' => [
+                                                                    
'name=ens20',
+                                                                    
'name=ens21'
+                                                                  ],
+                                                   'id' => 'test_localhost',
+                                                   'type' => 'openfabric_node',
+                                                 'ip6' => 'fd00::1',
+                                                 },
+                               'test_pathfinder' => {
+                                                      'id' => 
'test_pathfinder',
+                                                      'interfaces' => [
+                                                                       
'name=ens20',
+                                                                       
'name=ens21'
+                                                                     ],
+                                                     'ip6' => 'fd00::2',
+                                                      'type' => 
'openfabric_node',
+                                                    },
+                               'test_raider' => {
+                                                 'ip6' => 'fd00::3',
+                                                  'type' => 'openfabric_node',
+                                                  'interfaces' => [
+                                                                   
'name=ens21',
+                                                                   'name=ens20'
+                                                                 ],
+                                                  'id' => 'test_raider',
+                                                }
+                                     }
+              }
+        };
+
-- 
2.47.3



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to