go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/trafficIPv6/tap_int_traffic/tap_int_trafficIPv6.robot (about) 1 *** Settings *** 2 Library OperatingSystem 3 #Library RequestsLibrary 4 #Library SSHLibrary timeout=60s 5 #Library String 6 7 Resource ../../../variables/${VARIABLES}_variables.robot 8 Resource ../../../libraries/all_libs.robot 9 Resource ../../../libraries/pretty_keywords.robot 10 11 Force Tags traffic IPv6 12 Suite Setup Testsuite Setup 13 Suite Teardown Testsuite Teardown 14 Test Setup TestSetup 15 Test Teardown TestTeardown 16 *** Variables *** 17 ${VARIABLES}= common 18 ${ENV}= common 19 ${NAME_VPP1_TAP1}= vpp1_tap1 20 ${NAME_VPP2_TAP1}= vpp2_tap1 21 ${MAC_VPP1_TAP1}= 12:21:21:11:11:11 22 ${MAC_VPP2_TAP1}= 22:21:21:22:22:22 23 ${IP_VPP1_TAP1}= fd30::1:a:0:0:1 24 ${IP_VPP2_TAP1}= fd31::1:a:0:0:1 25 ${IP_LINUX_VPP1_TAP1}= fd30::1:a:0:0:2 26 ${IP_LINUX_VPP2_TAP1}= fd31::1:a:0:0:2 27 ${IP_VPP1_TAP1_NETWORK}= fd30::1:0:0:0:0 28 ${IP_VPP2_TAP1_NETWORK}= fd31::1:0:0:0:0 29 ${NAME_VPP1_MEMIF1}= vpp1_memif1 30 ${NAME_VPP2_MEMIF1}= vpp2_memif1 31 ${MAC_VPP1_MEMIF1}= 13:21:21:11:11:11 32 ${MAC_VPP2_MEMIF1}= 23:21:21:22:22:22 33 ${IP_VPP1_MEMIF1}= fd33::1:a:0:0:1 34 ${IP_VPP2_MEMIF1}= fd33::1:a:0:0:2 35 ${PREFIX}= 64 36 ${UP_STATE}= up 37 ${SYNC_SLEEP}= 10s 38 # wait for resync vpps after restart 39 ${RESYNC_WAIT}= 50s 40 41 *** Test Cases *** 42 Configure Environment 43 Configure Environment 1 44 45 Show Interfaces Before Setup 46 vpp_term: Show Interfaces agent_vpp_1 47 vpp_term: Show Interfaces agent_vpp_2 48 49 Add VPP1_TAP1 Interface 50 vpp_term: Interface Not Exists node=agent_vpp_1 mac=${MAC_VPP1_TAP1} 51 Put TAPv2 Interface With IP node=agent_vpp_1 name=${NAME_VPP1_TAP1} mac=${MAC_VPP1_TAP1} ip=${IP_VPP1_TAP1} prefix=${PREFIX} host_if_name=linux_${NAME_VPP1_TAP1} 52 linux: Set Host TAP Interface node=agent_vpp_1 host_if_name=linux_${NAME_VPP1_TAP1} ip=${IP_LINUX_VPP1_TAP1} prefix=${PREFIX} 53 54 Check VPP1_TAP1 Interface Is Created 55 ${interfaces}= vat_term: Interfaces Dump node=agent_vpp_1 56 vpp_term: Interface Is Created node=agent_vpp_1 mac=${MAC_VPP1_TAP1} 57 ${actual_state}= vpp_term: Check TAP IP6 interface State agent_vpp_1 ${NAME_VPP1_TAP1} mac=${MAC_VPP1_TAP1} ipv6=${IP_VPP1_TAP1}/${PREFIX} state=${UP_STATE} 58 59 Check Ping Between VPP1 and linux_VPP1_TAP1 Interface 60 linux: Check Ping node=agent_vpp_1 ip=${IP_VPP1_TAP1} 61 vpp_term: Check Ping node=agent_vpp_1 ip=${IP_LINUX_VPP1_TAP1} 62 63 Add VPP1_memif1 Interface 64 vpp_term: Interface Not Exists node=agent_vpp_1 mac=${MAC_VPP1_MEMIF1} 65 Put Memif Interface With IP node=agent_vpp_1 name=${NAME_VPP1_MEMIF1} mac=${MAC_VPP1_MEMIF1} master=true id=1 ip=${IP_VPP1_MEMIF1} prefix=24 socket=memif.sock 66 67 Check Memif on Agent1 is created 68 vpp_term: Interface Is Created node=agent_vpp_1 mac=${MAC_VPP1_MEMIF1} 69 vat_term: Check Memif Interface State agent_vpp_1 ${NAME_VPP1_MEMIF1} mac=${MAC_VPP1_MEMIF1} role=master id=1 connected=0 enabled=1 socket=${AGENT_VPP_2_MEMIF_SOCKET_FOLDER}/memif.sock 70 71 Add VPP2_TAP1 Interface 72 vpp_term: Interface Not Exists node=agent_vpp_2 mac=${MAC_VPP2_TAP1} 73 Put TAPv2 Interface With IP node=agent_vpp_2 name=${NAME_VPP2_TAP1} mac=${MAC_VPP2_TAP1} ip=${IP_VPP2_TAP1} prefix=${PREFIX} host_if_name=linux_${NAME_VPP2_TAP1} 74 linux: Set Host TAP Interface node=agent_vpp_2 host_if_name=linux_${NAME_VPP2_TAP1} ip=${IP_LINUX_VPP2_TAP1} prefix=${PREFIX} 75 76 Check VPP2_TAP1 Interface Is Created 77 ${interfaces}= vat_term: Interfaces Dump node=agent_vpp_1 78 vpp_term: Interface Is Created node=agent_vpp_2 mac=${MAC_VPP2_TAP1} 79 ${actual_state}= vpp_term: Check TAP IP6 interface State agent_vpp_2 ${NAME_VPP2_TAP1} mac=${MAC_VPP2_TAP1} ipv6=${IP_VPP2_TAP1}/${PREFIX} state=${UP_STATE} 80 81 Check Ping Between VPP2 And linux_VPP2_TAP1 Interface 82 linux: Check Ping node=agent_vpp_2 ip=${IP_VPP2_TAP1} 83 vpp_term: Check Ping node=agent_vpp_2 ip=${IP_LINUX_VPP2_TAP1} 84 85 Add VPP2_memif1 Interface 86 vpp_term: Interface Not Exists node=agent_vpp_2 mac=${MAC_VPP2_MEMIF1} 87 Put Memif Interface With IP node=agent_vpp_2 name=${NAME_VPP2_MEMIF1} mac=${MAC_VPP2_MEMIF1} master=false id=1 ip=${IP_VPP2_MEMIF1} prefix=24 socket=memif.sock 88 vpp_term: Interface Is Created node=agent_vpp_1 mac=${MAC_VPP1_MEMIF1} 89 90 Check Ping From VPP1 To VPP2_memif1 91 vpp_term: Check Ping node=agent_vpp_1 ip=${IP_VPP2_MEMIF1} 92 93 Check Ping From VPP2 To VPP1_memif1 94 vpp_term: Check Ping node=agent_vpp_2 ip=${IP_VPP1_MEMIF1} 95 96 Ping From VPP1 Linux To VPP2_TAP1 And LINUX_VPP2_TAP1 Should Not Pass 97 ${status1}= Run Keyword And Return Status linux: Check Ping node=agent_vpp_1 ip=${IP_VPP2_TAP1} 98 ${status2}= Run Keyword And Return Status linux: Check Ping node=agent_vpp_1 ip=${IP_LINUX_VPP2_TAP1} 99 Should Be Equal As Strings ${status1} False 100 Should Be Equal As Strings ${status2} False 101 102 Ping From VPP2 Linux To VPP1_TAP1 And LINUX_VPP1_TAP1 Should Not Pass 103 ${status1}= Run Keyword And Return Status linux: Check Ping node=agent_vpp_2 ip=${IP_VPP1_TAP1} 104 ${status2}= Run Keyword And Return Status linux: Check Ping node=agent_vpp_2 ip=${IP_LINUX_VPP1_TAP1} 105 Should Be Equal As Strings ${status1} False 106 Should Be Equal As Strings ${status2} False 107 108 Add Static Route From VPP1 Linux To VPP2 109 linux: Add Route node=agent_vpp_1 destination_ip=${IP_VPP2_TAP1_NETWORK} prefix=${PREFIX} next_hop_ip=${IP_VPP1_TAP1} 110 111 Add Static Route From VPP1 To VPP2 112 Create Route On agent_vpp_1 With IP ${IP_VPP2_TAP1_NETWORK}/${PREFIX} With Next Hop ${IP_VPP2_MEMIF1} And Vrf Id 0 113 114 Add Static Route From VPP2 Linux To VPP1 115 linux: Add Route node=agent_vpp_2 destination_ip=${IP_VPP1_TAP1_NETWORK} prefix=${PREFIX} next_hop_ip=${IP_VPP2_TAP1} 116 117 Add Static Route From VPP2 To VPP1 118 Create Route On agent_vpp_2 With IP ${IP_VPP1_TAP1_NETWORK}/${PREFIX} With Next Hop ${IP_VPP1_MEMIF1} And Vrf Id 0 119 120 Check Interfaces And Fib Table 121 Show Interfaces On agent_vpp_1 122 Show Interfaces Address On agent_vpp_1 123 Show IP6 Fib On agent_vpp_1 124 Show Interfaces On agent_vpp_2 125 Show Interfaces Address On agent_vpp_2 126 Show IP6 Fib On agent_vpp_2 127 128 Check Ping From VPP1 Linux To VPP2_TAP1 And LINUX_VPP2_TAP1 129 linux: Check Ping node=agent_vpp_1 ip=${IP_VPP2_TAP1} 130 linux: Check Ping node=agent_vpp_1 ip=${IP_LINUX_VPP2_TAP1} 131 132 Check Ping From VPP2 Linux To VPP1_TAP1 And LINUX_VPP1_TAP1 133 linux: Check Ping node=agent_vpp_2 ip=${IP_VPP1_TAP1} 134 linux: Check Ping node=agent_vpp_2 ip=${IP_LINUX_VPP1_TAP1} 135 136 Remove VPP Nodes 137 Remove All Nodes 138 Sleep ${SYNC_SLEEP} 139 140 Start VPP1 And VPP2 Again 141 Add Agent VPP Node agent_vpp_1 142 Add Agent VPP Node agent_vpp_2 143 Sleep ${RESYNC_WAIT} 144 145 Create linux_VPP1_TAP1 And linux_VPP2_TAP1 Interfaces After Resync 146 linux: Set Host TAP Interface node=agent_vpp_1 host_if_name=linux_${NAME_VPP1_TAP1} ip=${IP_LINUX_VPP1_TAP1} prefix=${PREFIX} 147 linux: Set Host TAP Interface node=agent_vpp_2 host_if_name=linux_${NAME_VPP2_TAP1} ip=${IP_LINUX_VPP2_TAP1} prefix=${PREFIX} 148 149 Check Linux Interfaces On VPP1 After Resync 150 ${out}= Execute In Container agent_vpp_1 ip a 151 Should Contain ${out} linux_${NAME_VPP1_TAP1} 152 153 Check Interfaces On VPP1 After Resync 154 ${out}= vpp_term: Show Interfaces agent_vpp_1 155 ${int}= Get Interface Internal Name node=agent_vpp_1 interface=${NAME_VPP1_MEMIF1} 156 Should Contain ${out} ${int} 157 ${int}= Get Interface Internal Name node=agent_vpp_1 interface=${NAME_VPP1_TAP1} 158 Should Contain ${out} ${int} 159 160 Check Linux Interfaces On VPP2 After Resync 161 ${out}= Execute In Container agent_vpp_2 ip a 162 Should Contain ${out} linux_${NAME_VPP2_TAP1} 163 164 Check Interfaces On VPP2 After Resync 165 ${out}= vpp_term: Show Interfaces agent_vpp_2 166 ${int}= Get Interface Internal Name node=agent_vpp_2 interface=${NAME_VPP2_MEMIF1} 167 Should Contain ${out} ${int} 168 ${int}= Get Interface Internal Name node=agent_vpp_2 interface=${NAME_VPP2_TAP1} 169 Should Contain ${out} ${int} 170 171 Add Static Route From VPP1 Linux To VPP2 After Resync 172 linux: Add Route node=agent_vpp_1 destination_ip=${IP_VPP2_TAP1_NETWORK} prefix=${PREFIX} next_hop_ip=${IP_VPP1_TAP1} 173 174 Add Static Route From VPP2 Linux To VPP1 After Resync 175 linux: Add Route node=agent_vpp_2 destination_ip=${IP_VPP1_TAP1_NETWORK} prefix=${PREFIX} next_hop_ip=${IP_VPP2_TAP1} 176 177 Check Ping From VPP1 Linux To VPP2_TAP1 And LINUX_VPP2_TAP1 After Resync 178 linux: Check Ping node=agent_vpp_1 ip=${IP_VPP2_TAP1} 179 linux: Check Ping node=agent_vpp_1 ip=${IP_LINUX_VPP2_TAP1} 180 181 Check Ping From VPP2 Linux To VPP1_TAP1 And LINUX_VPP1_TAP1 After Resync 182 linux: Check Ping node=agent_vpp_2 ip=${IP_VPP1_TAP1} 183 linux: Check Ping node=agent_vpp_2 ip=${IP_LINUX_VPP1_TAP1} 184 185 *** Keywords *** 186 TestSetup 187 Make Datastore Snapshots ${TEST_NAME}_test_setup 188 189 TestTeardown 190 Make Datastore Snapshots ${TEST_NAME}_test_teardown