TT#47255 Add comprehensive test of network config with ngcp-network

The configuration is getting more complex and it's important to have
comprehensive tests that help us to detect problems with the new options.

Change-Id: I5d0004ce5a23b46d48e85294d6fb3bf14073b253
changes/55/24755/11
Manuel Montecelo 7 years ago
parent ceed325c6f
commit 43ac83d1d6

@ -0,0 +1,70 @@
---
hosts:
sp1:
bond0:
bond_miimon: '100'
bond_mode: active-backup
bond_slaves: eth11 eth22
gateway: 10.10.10.254
ip: 10.10.10.2
netmask: 255.0.0.0
eth11:
dhcp: yes
hwaddr: 11:11:11:11:11:11
mtu: '1111'
eth22:
dhcp: yes
hwaddr: 22:22:22:22:22:22
mtu: '2222'
eth46:
dns_nameservers:
- 127.0.0.1
- 1.1.1.1
- ::1
- 2606:4700:4700::1111
gateway: 127.11.22.254
hwaddr: c0:ff:ee:15:90:0d
ip: 127.11.22.33
netmask: 255.0.0.0
v6gateway: 2001:aaaa:1111:bbbb:2222:cccc:3333:0001
v6ip: 2001:aaaa:1111:bbbb:2222:cccc:3333:dddd
v6netmask: '64'
interfaces:
- lo
- eth46
- bond0
- eth11
- eth22
- vlan1111
- vlan2222
- vlan3333
lo:
ip: 127.0.0.1
netmask: 255.255.255.0
type:
- sip_int
- ha_int
- web_ext
- sip_ext
- rtp_ext
- ssh_ext
- mon_ext
role:
- proxy
- lb
- mgmt
vlan1111:
gateway: 10.11.11.254
ip: 10.11.11.11
netmask: 255.0.0.0
vlan_raw_device: bond0
vlan2222:
gateway: 10.22.22.254
ip: 10.22.22.22
netmask: 255.0.0.0
vlan_raw_device: bond0
vlan3333:
gateway: 10.33.33.254
ip: 10.33.33.33
netmask: 255.0.0.0
vlan_raw_device: bond0

@ -52,6 +52,40 @@ ${CMD} --input-file=network-config/network_pro.yml --output-file=testfiles/eth42
--host=sp1 --set-interface=eth42 --ip=1.2.3.4 --netmask=255.255.255.248
assertEqualFiles testfiles/eth42.yml network-config/eth42.yml
# test IPv4/IPv6 with many options
cp network-config/network_pro.yml testfiles/eth46.yml
${CMD} --input-file=testfiles/eth46.yml --output-file=testfiles/eth46.yml \
--host=sp1 --set-interface=eth46 \
--hwaddr c0:ff:ee:15:90:0d \
--ip=127.11.22.33 --netmask=255.0.0.0 --gateway 127.11.22.254 \
--ipv6 2001:aaaa:1111:bbbb:2222:cccc:3333:dddd --netmask-ipv6 64 --gateway-ipv6 2001:aaaa:1111:bbbb:2222:cccc:3333:0001 \
--dns 127.0.0.1 --dns 1.1.1.1 --dns ::1 --dns 2606:4700:4700::1111
${CMD} --input-file=testfiles/eth46.yml --output-file=testfiles/eth46.yml \
--host=sp1 --set-interface=bond0 \
--bond-mode active-backup --bond-miimon '100' --bond-slaves 'eth11 eth22' \
--ip 10.10.10.2 --netmask 255.0.0.0 --gateway 10.10.10.254
${CMD} --input-file=testfiles/eth46.yml --output-file=testfiles/eth46.yml \
--host=sp1 --set-interface=eth11 \
--hwaddr 11:11:11:11:11:11 --mtu 1111 \
--dhcp yes
${CMD} --input-file=testfiles/eth46.yml --output-file=testfiles/eth46.yml \
--host=sp1 --set-interface=eth22 \
--hwaddr 22:22:22:22:22:22 --mtu 2222 \
--dhcp yes
${CMD} --input-file=testfiles/eth46.yml --output-file=testfiles/eth46.yml \
--host=sp1 --set-interface=vlan1111 \
--vlan-raw-device bond0 \
--ip 10.11.11.11 --netmask 255.0.0.0 --gateway 10.11.11.254
${CMD} --input-file=testfiles/eth46.yml --output-file=testfiles/eth46.yml \
--host=sp1 --set-interface=vlan2222 \
--vlan-raw-device bond0 \
--ip 10.22.22.22 --netmask 255.0.0.0 --gateway 10.22.22.254
${CMD} --input-file=testfiles/eth46.yml --output-file=testfiles/eth46.yml \
--host=sp1 --set-interface=vlan3333 \
--vlan-raw-device bond0 \
--ip 10.33.33.33 --netmask 255.0.0.0 --gateway 10.33.33.254
assertEqualFiles testfiles/eth46.yml network-config/eth46.yml
# verify deployment steps
ROLE=sp1; PEER=sp2; DEFAULT_INSTALL_DEV=eth0; INTERNAL_DEV=eth1;

Loading…
Cancel
Save