Add integration tests in intest/

This commit is contained in:
Pim van Pelt
2022-04-03 09:18:40 +00:00
parent 75e5a23538
commit 27b4500d3e
15 changed files with 726 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,6 +1,5 @@
build/ build/
dist/ dist/
hippo*.yaml
integration-test.sh
*.swp *.swp
*.out
__pycache__ __pycache__

13
intest/hippo-empty.yaml Normal file
View File

@ -0,0 +1,13 @@
interfaces:
GigabitEthernet3/0/0:
mtu: 1500
description: Not Used
GigabitEthernet3/0/1:
mtu: 1500
description: Not Used
HundredGigabitEthernet12/0/0:
mtu: 1500
description: Not Used
HundredGigabitEthernet12/0/1:
mtu: 1500
description: Not Used

85
intest/hippo1.yaml Normal file
View File

@ -0,0 +1,85 @@
bondethernets:
BondEthernet0:
interfaces: [ GigabitEthernet3/0/0, GigabitEthernet3/0/1 ]
interfaces:
GigabitEthernet3/0/0:
mtu: 9000
description: "LAG #1"
GigabitEthernet3/0/1:
mtu: 9000
description: "LAG #2"
HundredGigabitEthernet12/0/0:
lcp: "ice0"
mtu: 9000
addresses: [ 192.0.2.17/30, 2001:db8:3::1/64 ]
sub-interfaces:
1234:
mtu: 1200
lcp: "ice0.1234"
encapsulation:
dot1q: 1234
exact-match: True
1235:
mtu: 1100
lcp: "ice0.1234.1000"
encapsulation:
dot1q: 1234
inner-dot1q: 1000
exact-match: True
HundredGigabitEthernet12/0/1:
mtu: 2000
description: "Bridged"
BondEthernet0:
mtu: 9000
lcp: "be0"
sub-interfaces:
100:
mtu: 2500
l2xc: BondEthernet0.200
encapsulation:
dot1q: 100
exact-match: False
200:
mtu: 2500
l2xc: BondEthernet0.100
encapsulation:
dot1q: 200
exact-match: False
500:
mtu: 2000
encapsulation:
dot1ad: 500
exact-match: False
501:
mtu: 2000
encapsulation:
dot1ad: 501
exact-match: False
vxlan_tunnel1:
mtu: 2000
loopbacks:
loop0:
lcp: "lo0"
addresses: [ 10.0.0.1/32, 2001:db8::1/128 ]
loop1:
lcp: "bvi1"
addresses: [ 10.0.1.1/24, 2001:db8:1::1/64 ]
bridgedomains:
bd1:
mtu: 2000
bvi: loop1
interfaces: [ BondEthernet0.500, BondEthernet0.501, HundredGigabitEthernet12/0/1, vxlan_tunnel1 ]
bd11:
mtu: 1500
vxlan_tunnels:
vxlan_tunnel1:
local: 192.0.2.1
remote: 192.0.2.2
vni: 101

44
intest/hippo10.yaml Normal file
View File

@ -0,0 +1,44 @@
bondethernets:
BondEthernet0:
interfaces: [ GigabitEthernet3/0/0, GigabitEthernet3/0/1 ]
interfaces:
GigabitEthernet3/0/0:
mtu: 9000
description: "LAG #1"
GigabitEthernet3/0/1:
mtu: 9000
description: "LAG #2"
HundredGigabitEthernet12/0/0:
description: Not Used
HundredGigabitEthernet12/0/1:
description: Not Used
BondEthernet0:
mtu: 9000
lcp: "be0"
sub-interfaces:
100:
mtu: 2500
l2xc: BondEthernet0.200
encapsulation:
dot1q: 100
exact-match: False
200:
mtu: 2500
l2xc: BondEthernet0.100
encapsulation:
dot1q: 200
exact-match: False
500:
mtu: 2000
encapsulation:
dot1ad: 500
exact-match: False
501:
mtu: 2000
encapsulation:
dot1ad: 501
exact-match: False

44
intest/hippo11.yaml Normal file
View File

@ -0,0 +1,44 @@
bondethernets:
BondEthernet0:
interfaces: [ GigabitEthernet3/0/0, GigabitEthernet3/0/1 ]
interfaces:
GigabitEthernet3/0/0:
mtu: 9000
description: "LAG #1"
GigabitEthernet3/0/1:
mtu: 9000
description: "LAG #2"
HundredGigabitEthernet12/0/0:
description: Not Used
HundredGigabitEthernet12/0/1:
description: Not Used
BondEthernet0:
mtu: 9000
lcp: "be0"
sub-interfaces:
200:
mtu: 2500
l2xc: BondEthernet0.100
encapsulation:
dot1q: 100
exact-match: False
100:
mtu: 2500
l2xc: BondEthernet0.200
encapsulation:
dot1q: 200
exact-match: False
501:
mtu: 2000
encapsulation:
dot1ad: 500
exact-match: False
500:
mtu: 2000
encapsulation:
dot1ad: 501
exact-match: False

88
intest/hippo12.yaml Normal file
View File

@ -0,0 +1,88 @@
bondethernets:
BondEthernet0:
interfaces: [ GigabitEthernet3/0/0, GigabitEthernet3/0/1 ]
interfaces:
GigabitEthernet3/0/0:
mtu: 9000
description: "LAG #1"
GigabitEthernet3/0/1:
mtu: 9000
description: "LAG #2"
HundredGigabitEthernet12/0/0:
lcp: "ice12-0-0"
mtu: 9000
addresses: [ 192.0.2.17/30, 2001:db8:3::1/64 ]
sub-interfaces:
1234:
mtu: 1200
lcp: "ice0.1234"
encapsulation:
dot1q: 1234
exact-match: True
1235:
mtu: 1100
lcp: "ice0.1234.1000"
encapsulation:
dot1q: 1234
inner-dot1q: 1000
exact-match: True
HundredGigabitEthernet12/0/1:
mtu: 2000
description: "Bridged"
BondEthernet0:
mtu: 9000
lcp: "bond0"
sub-interfaces:
10:
lcp: "bond0.10"
mtu: 3000
100:
mtu: 2500
l2xc: BondEthernet0.200
encapsulation:
dot1q: 100
exact-match: False
200:
mtu: 2500
l2xc: BondEthernet0.100
encapsulation:
dot1q: 200
exact-match: False
500:
mtu: 2000
encapsulation:
dot1ad: 500
exact-match: False
501:
mtu: 2000
encapsulation:
dot1ad: 501
exact-match: False
vxlan_tunnel1:
mtu: 2000
loopbacks:
loop0:
lcp: "lo0"
addresses: [ 10.0.0.1/32, 2001:db8::1/128 ]
loop1:
lcp: "bvi1"
addresses: [ 10.0.1.1/24, 2001:db8:1::1/64 ]
bridgedomains:
bd1:
mtu: 2000
bvi: loop1
interfaces: [ BondEthernet0.500, BondEthernet0.501, HundredGigabitEthernet12/0/1, vxlan_tunnel1 ]
bd11:
mtu: 1500
vxlan_tunnels:
vxlan_tunnel1:
local: 192.0.2.1
remote: 192.0.2.2
vni: 101

62
intest/hippo2.yaml Normal file
View File

@ -0,0 +1,62 @@
interfaces:
GigabitEthernet3/0/0:
sub-interfaces:
100:
description: "Sub-int"
101:
encapsulation:
dot1q: 100
inner-dot1q: 100
exact-match: true
200:
description: "Sub-int"
encapsulation:
dot1ad: 100
exact-match: true
201:
encapsulation:
dot1ad: 100
inner-dot1q: 100
exact-match: true
GigabitEthernet3/0/1:
sub-interfaces:
100:
description: "Sub-int"
200:
description: "Sub-int"
encapsulation:
dot1ad: 100
exact-match: true
201:
encapsulation:
dot1ad: 100
inner-dot1q: 100
HundredGigabitEthernet12/0/0:
sub-interfaces:
100:
description: "Sub-int"
200:
description: "Sub-int"
encapsulation:
dot1ad: 100
exact-match: true
201:
encapsulation:
dot1ad: 100
inner-dot1q: 100
HundredGigabitEthernet12/0/1:
sub-interfaces:
100:
description: "Sub-int"
101:
encapsulation:
dot1q: 100
inner-dot1q: 100
200:
description: "Sub-int"
encapsulation:
dot1ad: 100
exact-match: true

49
intest/hippo3.yaml Normal file
View File

@ -0,0 +1,49 @@
bondethernets:
BondEthernet1:
interfaces: [ GigabitEthernet3/0/0, GigabitEthernet3/0/1 ]
interfaces:
GigabitEthernet3/0/0:
mtu: 9000
description: LAG
GigabitEthernet3/0/1:
mtu: 9000
description: LAG
HundredGigabitEthernet12/0/0:
mtu: 2500
HundredGigabitEthernet12/0/1:
description: Not Used
BondEthernet1:
lcp: "bond1"
mtu: 9000
sub-interfaces:
200:
lcp: "bond1.1000"
encapsulation:
dot1q: 1000
exact-match: True
addresses: [ 192.168.0.1/24 ]
201:
mtu: 3000
encapsulation:
dot1ad: 1000
202:
lcp: "bond1.1000.1234"
encapsulation:
dot1q: 1000
inner-dot1q: 1234
exact-match: True
addresses: [ 192.168.1.1/24 ]
203:
mtu: 2500
encapsulation:
dot1ad: 1000
inner-dot1q: 1000
bridgedomains:
bd10:
description: "Bridge Domain 10"
mtu: 2500
interfaces: [ BondEthernet1.203, HundredGigabitEthernet12/0/0 ]

33
intest/hippo4.yaml Normal file
View File

@ -0,0 +1,33 @@
interfaces:
GigabitEthernet3/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 2000
l2xc: HundredGigabitEthernet12/0/1.100
GigabitEthernet3/0/1:
description: Not Used
HundredGigabitEthernet12/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 3000
101:
mtu: 2000
encapsulation:
dot1q: 100
inner-dot1q: 200
exact-match: True
HundredGigabitEthernet12/0/1:
mtu: 9216
sub-interfaces:
100:
mtu: 2000
l2xc: GigabitEthernet3/0/0.100
bridgedomains:
bd10:
description: "Bridge Domain 10"
mtu: 2000
interfaces: [ HundredGigabitEthernet12/0/0.101 ]

46
intest/hippo5.yaml Normal file
View File

@ -0,0 +1,46 @@
interfaces:
GigabitEthernet3/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 2000
l2xc: vxlan_tunnel0
101:
l2xc: vxlan_tunnel1
GigabitEthernet3/0/1:
lcp: "e3-0-1"
addresses: [ 10.0.0.1/24 ]
HundredGigabitEthernet12/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 3000
101:
mtu: 2000
encapsulation:
dot1q: 100
inner-dot1q: 200
exact-match: True
HundredGigabitEthernet12/0/1:
mtu: 9216
vxlan_tunnel0:
mtu: 2000
l2xc: GigabitEthernet3/0/0.100
vxlan_tunnel1:
l2xc: GigabitEthernet3/0/0.101
bridgedomains:
bd10:
description: "Bridge Domain 10"
mtu: 2000
interfaces: [ HundredGigabitEthernet12/0/0.101 ]
vxlan_tunnels:
vxlan_tunnel0:
local: 10.0.0.1
remote: 10.0.0.3
vni: 100
vxlan_tunnel1:
local: 192.0.2.1
remote: 192.0.2.2
vni: 101

46
intest/hippo6.yaml Normal file
View File

@ -0,0 +1,46 @@
interfaces:
GigabitEthernet3/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 2000
l2xc: vxlan_tunnel0
101:
mtu: 3000
GigabitEthernet3/0/1:
lcp: "e3-0-1"
addresses: [ 10.0.0.1/24 ]
HundredGigabitEthernet12/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 3000
101:
mtu: 3000
encapsulation:
dot1q: 100
inner-dot1q: 200
exact-match: True
HundredGigabitEthernet12/0/1:
mtu: 9216
vxlan_tunnel0:
mtu: 2000
l2xc: GigabitEthernet3/0/0.100
vxlan_tunnel1:
mtu: 3000
bridgedomains:
bd10:
description: "Bridge Domain 10"
mtu: 3000
interfaces: [ HundredGigabitEthernet12/0/0.101, GigabitEthernet3/0/0.101, vxlan_tunnel1 ]
vxlan_tunnels:
vxlan_tunnel0:
local: 10.0.0.1
remote: 10.0.0.3
vni: 100
vxlan_tunnel1:
local: 192.0.2.1
remote: 192.0.2.2
vni: 101

45
intest/hippo7.yaml Normal file
View File

@ -0,0 +1,45 @@
interfaces:
GigabitEthernet3/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 2000
l2xc: vxlan_tunnel0
101:
mtu: 3000
GigabitEthernet3/0/1:
description: Not Used
HundredGigabitEthernet12/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 3000
101:
mtu: 3000
encapsulation:
dot1q: 100
inner-dot1q: 200
exact-match: True
HundredGigabitEthernet12/0/1:
mtu: 9216
vxlan_tunnel0:
mtu: 2000
l2xc: GigabitEthernet3/0/0.100
vxlan_tunnel1:
mtu: 3000
bridgedomains:
bd10:
description: "Bridge Domain 10"
mtu: 3000
interfaces: [ HundredGigabitEthernet12/0/0.101, GigabitEthernet3/0/0.101, vxlan_tunnel1 ]
vxlan_tunnels:
vxlan_tunnel0:
local: 10.0.0.1
remote: 10.0.0.3
vni: 100
vxlan_tunnel1:
local: 192.0.2.1
remote: 192.0.2.2
vni: 101

56
intest/hippo8.yaml Normal file
View File

@ -0,0 +1,56 @@
interfaces:
GigabitEthernet3/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 2000
l2xc: vxlan_tunnel10
101:
mtu: 3000
GigabitEthernet3/0/1:
description: Not Used
HundredGigabitEthernet12/0/0:
mtu: 9216
sub-interfaces:
100:
mtu: 3000
101:
mtu: 3000
encapsulation:
dot1q: 100
inner-dot1q: 200
exact-match: True
HundredGigabitEthernet12/0/1:
mtu: 9216
sub-interfaces:
100:
l2xc: HundredGigabitEthernet12/0/1.101
101:
l2xc: HundredGigabitEthernet12/0/1.100
vxlan_tunnel10:
mtu: 2000
l2xc: GigabitEthernet3/0/0.100
vxlan_tunnel11:
mtu: 3000
loopbacks:
loop11:
lcp: "bvi11"
addresses: [ 2001:db8:1::1/64, 192.0.2.1/30 ]
bridgedomains:
bd11:
description: "Bridge Domain 11"
mtu: 3000
interfaces: [ HundredGigabitEthernet12/0/0.101, GigabitEthernet3/0/0.101, vxlan_tunnel11 ]
bvi: loop11
vxlan_tunnels:
vxlan_tunnel10:
local: 10.0.0.1
remote: 10.0.0.3
vni: 100
vxlan_tunnel11:
local: 192.0.2.1
remote: 192.0.2.2
vni: 101

85
intest/hippo9.yaml Normal file
View File

@ -0,0 +1,85 @@
bondethernets:
BondEthernet0:
interfaces: [ GigabitEthernet3/0/0, GigabitEthernet3/0/1 ]
interfaces:
GigabitEthernet3/0/0:
mtu: 9000
description: "LAG #1"
GigabitEthernet3/0/1:
mtu: 9000
description: "LAG #2"
HundredGigabitEthernet12/0/0:
lcp: "ice0"
HundredGigabitEthernet12/0/1:
lcp: "ice1"
mtu: 9000
addresses: [ 192.0.2.17/30, 2001:db8:3::1/64 ]
sub-interfaces:
1234:
mtu: 1500
lcp: "ice1.1234"
encapsulation:
dot1q: 1234
exact-match: True
1235:
mtu: 1400
lcp: "ice1.1234.1000"
encapsulation:
dot1q: 1234
inner-dot1q: 1000
exact-match: True
BondEthernet0:
mtu: 9000
lcp: "be0"
sub-interfaces:
100:
mtu: 2500
l2xc: BondEthernet0.200
encapsulation:
dot1q: 100
exact-match: False
200:
mtu: 2500
l2xc: BondEthernet0.100
encapsulation:
dot1q: 200
exact-match: False
500:
mtu: 2000
encapsulation:
dot1ad: 500
exact-match: False
501:
mtu: 2000
encapsulation:
dot1ad: 501
exact-match: False
vxlan_tunnel1:
mtu: 1500
loopbacks:
loop1:
lcp: "bvi1"
addresses: [ 192.0.2.1/30 ]
loop2:
lcp: "bvi2"
addresses: [ 192.0.2.5/30 ]
bridgedomains:
bd1:
mtu: 2000
bvi: loop2
interfaces: [ BondEthernet0.500, BondEthernet0.501 ]
bd11:
mtu: 1500
vxlan_tunnels:
vxlan_tunnel1:
local: 192.0.2.1
remote: 192.0.2.2
vni: 101

29
intest/intest.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
## NOTE(pim):
## This integration test, while added to the public repository, is meant as an
## internal validation / regression / integration test suite to be run on Hippo
## and Rhino, two reference installs of VPP in IPng Networks. The config files
## here should not be used although they can be a source of config inspiration :)
## Run me:
# ./intest.sh 2>&1 | tee -a intest.out
for i in hippo[0-9]*.yaml; do
echo "Clearing: Moving to hippo-empty.yaml"
../vppcfg -s ../schema.yaml -c hippo-empty.yaml > /tmp/vppcfg-exec-empty
[ -s /tmp/vppcfg-exec-empty ] && vppctl exec /tmp/vppcfg-exec-empty
for j in hippo[0-9]*.yaml; do
echo " - Moving to $i .. "
../vppcfg -s ../schema.yaml -c $i > /tmp/vppcfg-exec_$i
[ -s /tmp/vppcfg-exec_$i ] && vppctl exec /tmp/vppcfg-exec_$i
echo " - Moving from $i to $j"
../vppcfg -s ../schema.yaml -c $j > /tmp/vppcfg-exec_${i}_${j}
[ -s /tmp/vppcfg-exec_${i}_${j} ] && vppctl exec /tmp/vppcfg-exec_${i}_${j}
echo " - Checking that from $j to $j is empty"
../vppcfg -s ../schema.yaml -c $j > /tmp/vppcfg-exec_${j}_${j}_null
done
done