go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/crudIPv6/arp_crudIPv6.robot (about) 1 *** Settings *** 2 Library OperatingSystem 3 4 Resource ../../variables/${VARIABLES}_variables.robot 5 6 Resource ../../libraries/vpp_api.robot 7 Resource ../../libraries/vpp_term.robot 8 Resource ../../libraries/docker.robot 9 Resource ../../libraries/setup-teardown.robot 10 Resource ../../libraries/configurations.robot 11 Resource ../../libraries/etcdctl.robot 12 Resource ../../libraries/linux.robot 13 14 Resource ../../libraries/interface/vxlan.robot 15 Resource ../../libraries/interface/loopback.robot 16 Resource ../../libraries/interface/afpacket.robot 17 Resource ../../libraries/interface/interface_generic.robot 18 19 Force Tags crud IPv6 20 Suite Setup Testsuite Setup 21 Suite Teardown Testsuite Teardown 22 Test Setup TestSetup 23 Test Teardown TestTeardown 24 25 *** Variables *** 26 ${VARIABLES}= common 27 ${ENV}= common 28 ${WAIT_TIMEOUT}= 20s 29 ${SYNC_SLEEP}= 3s 30 ${VETH1_MAC}= 1a:00:00:11:11:11 31 ${VETH2_MAC}= 2a:00:00:22:22:22 32 ${AFP1_MAC}= a2:01:01:01:01:01 33 ${VETH1_IP}= fd30::1:e:0:0:1 34 ${VETH2_IP}= fd30::1:e:0:0:2 35 ${PREFIX}= 64 36 ${MEMIF_IP}= fd31::1:1:0:0:1 37 ${VXLAN_IP_SRC}= fd31::1:1:0:0:1 38 ${VXLAN_IP_DST}= fd31::1:1:0:0:2 39 ${LOOPBACK_IP}= fd32::1:1:0:0:1 40 ${TAP_IP}= fd33::1:1:0:0:1 41 ${ARP1_IP}= ab:cd:12:34:: 42 ${ARP2_IP}= ab:cd:12:35:: 43 ${ARP1_MAC}= 32:51:51:51:51:51 44 ${ARP2_MAC}= 32:51:51:51:51:52 45 ${ARP1_MAC_MODIFIED}= 32:51:51:51:51:53 46 47 *** Test Cases *** 48 Configure Environment 49 [Tags] setup 50 Configure Environment 1 51 52 Show Interfaces Before Setup 53 vpp_term: Show Interfaces agent_vpp_1 54 55 56 Add Veth1 Interface Pair 57 linux: Interface Not Exists node=agent_vpp_1 mac=${VETH1_MAC} 58 linux: Interface Not Exists node=agent_vpp_1 mac=${VETH2_MAC} 59 Put Veth Interface With IP node=agent_vpp_1 name=vpp1_veth1 60 ... mac=${VETH1_MAC} peer=vpp1_veth2 ip=${VETH1_IP} prefix=${PREFIX} mtu=1500 61 Put Veth Interface With IP node=agent_vpp_1 name=vpp1_veth2 62 ... mac=${VETH2_MAC} peer=vpp1_veth1 ip=${VETH2_IP} prefix=${PREFIX} mtu=1500 63 linux: Interface Is Created node=agent_vpp_1 mac=${VETH1_MAC} 64 linux: Interface Is Created node=agent_vpp_1 mac=${VETH2_MAC} 65 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 66 ... linux: Check Veth Interface State agent_vpp_1 vpp1_veth1 67 ... mac=${VETH1_MAC} ipv6=${VETH1_IP}/${PREFIX} mtu=1500 state=up 68 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 69 ... linux: Check Veth Interface State agent_vpp_1 vpp1_veth2 70 ... mac=${VETH2_MAC} ipv6=${VETH2_IP}/${PREFIX} mtu=1500 state=up 71 vpp_term: Show Interface Mode agent_vpp_1 72 vpp_term: Show Interface Mode agent_vpp_2 73 74 Add Memif Interface 75 Put Memif Interface With IP node=agent_vpp_1 name=vpp1_memif1 76 ... mac=62:61:61:61:61:61 master=true id=1 ip=${MEMIF_IP} 77 ... prefix=${PREFIX} socket=default.sock 78 vpp_term: Interface Is Created node=agent_vpp_1 mac=62:61:61:61:61:61 79 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 80 ... vpp_term: Check Memif Interface State agent_vpp_1 vpp1_memif1 81 ... mac=62:61:61:61:61:61 role=master id=1 ipv6=${MEMIF_IP}/${PREFIX} 82 ... connected=0 enabled=1 socket=${AGENT_VPP_1_MEMIF_SOCKET_FOLDER}/default.sock 83 84 Add VXLan Interface 85 Put VXLan Interface node=agent_vpp_1 name=vpp1_vxlan1 86 ... src=${VXLAN_IP_SRC} dst=${VXLAN_IP_DST} vni=5 87 VXLan Tunnel Is Created node=agent_vpp_1 src=${VXLAN_IP_SRC} dst=${VXLAN_IP_DST} vni=5 88 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 89 ... vpp_api: Check VXLan Interface State agent_vpp_1 vpp1_vxlan1 90 ... enabled=1 src=${VXLAN_IP_SRC} dst=${VXLAN_IP_DST} vni=5 91 92 Add Loopback Interface 93 Put Loopback Interface With IP node=agent_vpp_1 name=vpp1_loop1 94 ... mac=12:21:21:11:11:11 ip=${LOOPBACK_IP} prefix=${PREFIX} mtu=1400 95 vpp_term: Interface Is Created node=agent_vpp_1 mac=12:21:21:11:11:11 96 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 97 ... vpp_api: Check Loopback Interface State agent_vpp_1 vpp1_loop1 98 ... enabled=1 mac=12:21:21:11:11:11 mtu=1400 ipv6=${LOOPBACK_IP}/${PREFIX} 99 100 Add Tap Interface 101 Put TAPv2 Interface With IP node=agent_vpp_1 name=vpp1_tap1 102 ... mac=32:21:21:11:11:11 ip=${TAP_IP} prefix=${PREFIX} host_if_name=linux_vpp1_tap1 103 vpp_term: Interface Is Created node=agent_vpp_1 mac=32:21:21:11:11:11 104 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 105 ... vpp_term: Check TAP IP6 interface State agent_vpp_1 vpp1_tap1 106 ... mac=32:21:21:11:11:11 ipv6=${TAP_IP}/${PREFIX} state=up 107 108 ADD Afpacket Interface 109 Put Afpacket Interface node=agent_vpp_1 name=vpp1_afpacket1 110 ... mac=a2:a1:a1:a1:a1:a1 host_int=vpp1_veth2 111 vpp_term: Interface Is Created node=agent_vpp_1 mac=a2:a1:a1:a1:a1:a1 112 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 113 ... vpp_api: Check Afpacket Interface State agent_vpp_1 vpp1_afpacket1 114 ... enabled=1 mac=a2:a1:a1:a1:a1:a1 115 116 Check Stuff 117 Show Interfaces And Other Objects 118 119 Add ARPs 120 Put ARP agent_vpp_1 vpp1_memif1 ${ARP1_IP} ${ARP1_MAC} false 121 Put ARP agent_vpp_1 vpp1_memif1 ${ARP2_IP} ${ARP2_MAC} false 122 Put Linux ARP agent_vpp_1 vpp1_veth1 ${ARP1_IP} ${ARP1_MAC} 123 Put Linux ARP agent_vpp_1 vpp1_veth1 ${ARP2_IP} ${ARP2_MAC} 124 Put Linux ARP agent_vpp_1 vpp1_veth2 ${ARP1_IP} ${ARP1_MAC} 125 Put Linux ARP agent_vpp_1 vpp1_veth2 ${ARP2_IP} ${ARP2_MAC} 126 Put ARP agent_vpp_1 vpp1_vxlan1 ${ARP1_IP} ${ARP1_MAC} false 127 Put ARP agent_vpp_1 vpp1_vxlan1 ${ARP2_IP} ${ARP2_MAC} false 128 Put ARP agent_vpp_1 vpp1_loop1 ${ARP1_IP} ${ARP1_MAC} false 129 Put ARP agent_vpp_1 vpp1_loop1 ${ARP2_IP} ${ARP2_MAC} false 130 Put ARP agent_vpp_1 vpp1_tap1 ${ARP1_IP} ${ARP1_MAC} false 131 Put ARP agent_vpp_1 vpp1_tap1 ${ARP2_IP} ${ARP2_MAC} false 132 Put ARP agent_vpp_1 vpp1_afpacket1 ${ARP1_IP} ${ARP1_MAC} false 133 Put ARP agent_vpp_1 vpp1_afpacket1 ${ARP2_IP} ${ARP2_MAC} false 134 Sleep ${SYNC_SLEEP} 135 136 Check Memif ARP 137 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 138 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_memif1 139 ... ${ARP1_IP} ${ARP1_MAC} True 140 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 141 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_memif1 142 ... ${ARP2_IP} ${ARP2_MAC} True 143 144 Check Veth1 ARP 145 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 146 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 147 ... ${ARP1_IP} ${ARP1_MAC} True 148 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 149 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 150 ... ${ARP2_IP} ${ARP2_MAC} True 151 152 Check Veth2 ARP 153 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 154 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth2 155 ... ${ARP1_IP} ${ARP1_MAC} True 156 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 157 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth2 158 ... ${ARP2_IP} ${ARP2_MAC} True 159 160 Check VXLan ARP 161 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 162 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_vxlan1 163 ... ${ARP1_IP} ${ARP1_MAC} True 164 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 165 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_vxlan1 166 ... ${ARP2_IP} ${ARP2_MAC} True 167 168 Check Loopback ARP 169 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 170 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_loop1 171 ... ${ARP1_IP} ${ARP1_MAC} True 172 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 173 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_loop1 174 ... ${ARP2_IP} ${ARP2_MAC} True 175 176 Check TAP ARP 177 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 178 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_tap1 179 ... ${ARP1_IP} ${ARP1_MAC} True 180 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 181 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_tap1 182 ... ${ARP2_IP} ${ARP2_MAC} True 183 184 Check Afpacket ARP 185 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 186 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_afpacket1 187 ... ${ARP1_IP} ${ARP1_MAC} True 188 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 189 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_afpacket1 190 ... ${ARP2_IP} ${ARP2_MAC} True 191 192 Modify ARPs 193 Put ARP agent_vpp_1 vpp1_memif1 ${ARP1_IP} ${ARP1_MAC_MODIFIED} false 194 Put Linux ARP agent_vpp_1 vpp1_veth1 ${ARP1_IP} ${ARP1_MAC_MODIFIED} 195 Put Linux ARP agent_vpp_1 vpp1_veth2 ${ARP1_IP} ${ARP1_MAC_MODIFIED} 196 Put ARP agent_vpp_1 vpp1_vxlan1 ${ARP1_IP} ${ARP1_MAC_MODIFIED} false 197 Put ARP agent_vpp_1 vpp1_loop1 ${ARP1_IP} ${ARP1_MAC_MODIFIED} false 198 Put ARP agent_vpp_1 vpp1_tap1 ${ARP1_IP} ${ARP1_MAC_MODIFIED} false 199 Put ARP agent_vpp_1 host-vpp1_veth2 ${ARP1_IP} ${ARP1_MAC_MODIFIED} false 200 Put ARP agent_vpp_1 vpp1_afpacket1 ${ARP1_IP} ${ARP1_MAC_MODIFIED} false 201 Sleep ${SYNC_SLEEP} 202 203 Check Memif ARP After Modify 204 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 205 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_memif1 206 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 207 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 208 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_memif1 209 ... ${ARP1_IP} ${ARP1_MAC} False 210 211 Check Veth1 ARP After Modify 212 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 213 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 214 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 215 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 216 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 217 ... ${ARP1_IP} ${ARP1_MAC} False 218 219 Check Veth2 ARP After Modify 220 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 221 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth2 222 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 223 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 224 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth2 225 ... ${ARP1_IP} ${ARP1_MAC} False 226 227 Check VXLan ARP After Modify 228 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 229 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_vxlan1 230 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 231 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 232 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 233 ... ${ARP1_IP} ${ARP1_MAC} False 234 235 Check Loopback ARP After Modify 236 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 237 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_loop1 238 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 239 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 240 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 241 ... ${ARP1_IP} ${ARP1_MAC} False 242 243 Check TAP ARP After Modify 244 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 245 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_tap1 246 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 247 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 248 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 249 ... ${ARP1_IP} ${ARP1_MAC} False 250 251 Check Afpacket ARP After Modify 252 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 253 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_afpacket1 254 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 255 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 256 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 257 ... ${ARP1_IP} ${ARP1_MAC} False 258 259 Delete ARPs 260 Delete ARP agent_vpp_1 vpp1_memif1 ${ARP2_IP} 261 Delete Linux ARP agent_vpp_1 vpp1_veth1 ${ARP2_IP} 262 Delete Linux ARP agent_vpp_1 vpp1_veth2 ${ARP2_IP} 263 Delete ARP agent_vpp_1 vpp1_vxlan1 ${ARP2_IP} 264 Delete ARP agent_vpp_1 vpp1_loop1 ${ARP2_IP} 265 Delete ARP agent_vpp_1 vpp1_tap1 ${ARP2_IP} 266 Delete ARP agent_vpp_1 host-vpp1_veth2 ${ARP2_IP} 267 Delete ARP agent_vpp_1 vpp1_afpacket1 ${ARP2_IP} 268 vpp_term:Show ARP agent_vpp_1 269 Execute In Container agent_vpp_1 ip neigh 270 Sleep ${SYNC_SLEEP} 271 272 Check Memif ARP After Delete 273 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 274 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_memif1 275 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 276 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 277 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_memif1 278 ... ${ARP2_IP} ${ARP2_MAC} False 279 280 Check Veth1 ARP After Delete 281 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 282 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 283 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 284 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 285 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth1 286 ... ${ARP1_IP} ${ARP2_MAC} False 287 288 Check Veth2 ARP After Delete 289 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 290 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth2 291 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 292 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 293 ... linux: Check IPv6 Neighbor agent_vpp_1 vpp1_veth2 294 ... ${ARP1_IP} ${ARP2_MAC} False 295 296 Check VXLan ARP After Delete 297 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 298 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_vxlan1 299 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 300 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 301 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_vxlan1 302 ... ${ARP2_IP} ${ARP2_MAC} False 303 304 Check Loopback ARP After Delete 305 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 306 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_loop1 307 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 308 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 309 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_loop1 310 ... ${ARP2_IP} ${ARP2_MAC} False 311 312 Check TAP ARP After Delete 313 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 314 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_tap1 315 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 316 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 317 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_tap1 318 ... ${ARP2_IP} ${ARP2_MAC} False 319 320 Check Afpacket ARP After Delete 321 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 322 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_afpacket1 323 ... ${ARP1_IP} ${ARP1_MAC_MODIFIED} True 324 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 325 ... vpp_term: Check IPv6 Neighbor agent_vpp_1 vpp1_afpacket1 326 ... ${ARP2_IP} ${ARP2_MAC} False 327 328 329 *** Keywords *** 330 Show Interfaces And Other Objects 331 vpp_term: Show Interfaces agent_vpp_1 332 Write To Machine agent_vpp_1_term show int addr 333 Write To Machine agent_vpp_1_term show h 334 Write To Machine agent_vpp_1_term show br 335 Write To Machine agent_vpp_1_term show err 336 vpp_api: Interfaces Dump agent_vpp_1 337 Execute In Container agent_vpp_1 ip a 338 Make Datastore Snapshots before_check stuff 339 340 341 TestSetup 342 Make Datastore Snapshots ${TEST_NAME}_test_setup 343 344 TestTeardown 345 Make Datastore Snapshots ${TEST_NAME}_test_teardown