go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/traffic/bridge_domain/test_bridge_domain.robot (about) 1 *** Settings *** 2 3 Library OperatingSystem 4 Library String 5 6 Resource ../../../variables/${VARIABLES}_variables.robot 7 8 Resource ../../../libraries/all_libs.robot 9 Resource ../../../libraries/pretty_keywords.robot 10 Resource ../../../libraries/interface/vxlan.robot 11 12 Force Tags traffic IPv4 13 Suite Setup Run Keywords Discard old results 14 15 *** Variables *** 16 ${VARIABLES}= common 17 ${ENV}= common 18 19 *** Test Cases *** 20 Create agents in Bridge Domain with Memif interfaces and try traffic 21 [Setup] Test Setup 22 [Teardown] Test Teardown 23 24 Add Agent VPP Node agent_vpp_1 25 Add Agent VPP Node agent_vpp_2 26 Create Loopback Interface bvi_loop0 On agent_vpp_1 With Ip 10.1.1.1/24 And Mac 8a:f1:be:90:00:00 27 Create Master memif0 On agent_vpp_1 With MAC 02:f1:be:90:00:00, Key 1 And m1.sock Socket 28 Create Loopback Interface bvi_loop0 On agent_vpp_2 With Ip 10.1.1.2/24 And Mac 8a:f1:be:90:00:02 29 Create Slave memif0 On agent_vpp_2 With MAC 02:f1:be:90:00:02, Key 1 And m1.sock Socket 30 Create Bridge Domain bd1 With Autolearn On agent_vpp_1 With Interfaces bvi_loop0, memif0 31 Create Bridge Domain bd1 With Autolearn On agent_vpp_2 With Interfaces bvi_loop0, memif0 32 Wait Until Keyword Succeeds 60s 10s 33 ... Ping From agent_vpp_1 To 10.1.1.2 34 Ping From agent_vpp_2 To 10.1.1.1 35 Add Agent VPP Node agent_vpp_3 36 Create Master memif1 On agent_vpp_1 With MAC 02:f1:be:90:00:10, Key 2 And m2.sock Socket 37 Create Loopback Interface bvi_loop0 On agent_vpp_3 With Ip 10.1.1.3/24 And Mac 8a:f1:be:90:00:03 38 Create Slave memif0 On agent_vpp_3 With MAC 02:f1:be:90:00:03, Key 2 And m2.sock Socket 39 Create Bridge Domain bd1 With Autolearn On agent_vpp_1 With Interfaces bvi_loop0, memif0, memif1 40 Create Bridge Domain bd1 With Autolearn On agent_vpp_3 With Interfaces bvi_loop0, memif0 41 Wait Until Keyword Succeeds 60s 10s 42 ... Ping From agent_vpp_2 To 10.1.1.3 43 Ping From agent_vpp_3 To 10.1.1.2 44 45 First configure Bridge Domain with Memif interfaces and VXLan then add two agents and try traffic 46 [Setup] Test Setup 47 [Teardown] Test Teardown 48 49 Create Master memif0 On agent_vpp_1 With IP 10.1.1.1, MAC 02:f1:be:90:00:00, Key 1 And m0.sock Socket 50 Create Slave memif0 On agent_vpp_2 With IP 10.1.1.2, MAC 02:f1:be:90:00:02, Key 1 And m0.sock Socket 51 Create Loopback Interface bvi_loop0 On agent_vpp_1 With Ip 20.1.1.1/24 And Mac 8a:f1:be:90:00:00 52 Create Loopback Interface bvi_loop0 On agent_vpp_2 With Ip 20.1.1.2/24 And Mac 8a:f1:be:90:00:02 53 Create VXLan vxlan1 From 10.1.1.1 To 10.1.1.2 With Vni 13 On agent_vpp_1 54 Create VXLan vxlan1 From 10.1.1.2 To 10.1.1.1 With Vni 13 On agent_vpp_2 55 Create Bridge Domain bd1 With Autolearn On agent_vpp_1 With Interfaces bvi_loop0, vxlan1 56 Create Bridge Domain bd1 With Autolearn On agent_vpp_2 With Interfaces bvi_loop0, vxlan1 57 58 Add Agent VPP Node agent_vpp_1 59 Add Agent VPP Node agent_vpp_2 60 # Wait until Agents are up and configured 61 Wait Until Keyword Succeeds 60s 10s 62 ... Ping From agent_vpp_1 To 10.1.1.2 63 Ping From agent_vpp_2 To 10.1.1.1 64 Ping From agent_vpp_1 To 20.1.1.2 65 Ping From agent_vpp_2 To 20.1.1.1 66 67 68 Create Bridge Domain without autolearn 69 [Setup] Test Setup 70 [Teardown] Test Teardown 71 72 Add Agent VPP Node agent_vpp_1 73 Add Agent VPP Node agent_vpp_2 74 # setup first agent 75 Create Loopback Interface bvi_loop0 On agent_vpp_1 With Ip 10.1.1.1/24 And Mac 8a:f1:be:90:00:00 76 Create Master memif0 On agent_vpp_1 With MAC 02:f1:be:90:00:00, Key 1 And m1.sock Socket 77 Create Bridge Domain bd1 Without Autolearn On agent_vpp_1 With Interfaces bvi_loop0, memif0 78 # setup second agent 79 Create Loopback Interface bvi_loop0 On agent_vpp_2 With Ip 10.1.1.2/24 And Mac 8a:f1:be:90:00:02 80 Create Slave memif0 On agent_vpp_2 With MAC 02:f1:be:90:00:02, Key 1 And m1.sock Socket 81 Create Bridge Domain bd1 Without Autolearn On agent_vpp_2 With Interfaces bvi_loop0, memif0 82 # without static fib entries ping should fail 83 Command: Ping From agent_vpp_1 To 10.1.1.2 should fail 84 Command: Ping From agent_vpp_2 To 10.1.1.1 should fail 85 Add fib entry for 8a:f1:be:90:00:02 in bd1 over memif0 on agent_vpp_1 86 Add fib entry for 02:f1:be:90:00:02 in bd1 over memif0 on agent_vpp_1 87 Add fib entry for 8a:f1:be:90:00:00 in bd1 over memif0 on agent_vpp_2 88 Add fib entry for 02:f1:be:90:00:00 in bd1 over memif0 on agent_vpp_2 89 # and now ping must pass 90 Wait Until Keyword Succeeds 60s 10s 91 ... Ping From agent_vpp_1 To 10.1.1.2 92 Ping From agent_vpp_2 To 10.1.1.1 93 94 *** Keywords ***