go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/suites/crud/tap_unnumbered_crud.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 9 Resource ../../libraries/vpp_api.robot 10 Resource ../../libraries/vpp_term.robot 11 Resource ../../libraries/docker.robot 12 Resource ../../libraries/setup-teardown.robot 13 Resource ../../libraries/configurations.robot 14 Resource ../../libraries/etcdctl.robot 15 Resource ../../libraries/linux.robot 16 17 Resource ../../libraries/interface/interface_generic.robot 18 19 Force Tags crud IPv4 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 ${NAME_TAP1}= vpp1_tap1 29 ${NAME_TAP2}= vpp1_tap2 30 ${NAME_TAP3}= vpp1_tap3 31 ${MAC_TAP1}= 12:21:21:11:11:11 32 ${MAC_TAP1_2}= 22:21:21:11:11:11 33 ${MAC_TAP2}= 22:21:21:22:22:22 34 ${MAC_TAP3}= 33:21:21:33:33:33 35 ${IP_TAP1}= 20.20.1.1 36 ${IP_TAP1_2}= 21.20.1.1 37 ${IP_TAP2}= 20.20.1.2 38 ${IP_TAP3}= 33.20.1.1 39 ${PREFIX}= 24 40 ${MTU}= 4800 41 ${UP_STATE}= up 42 ${WAIT_TIMEOUT}= 20s 43 ${SYNC_SLEEP}= 3s 44 45 *** Test Cases *** 46 Configure Environment 47 [Tags] setup 48 Configure Environment 1 49 50 Show Interfaces Before Setup 51 ${interfaces}= vpp_term: Show Interfaces agent_vpp_1 52 53 Add TAP1 Interface 54 vpp_term: Interface Not Exists node=agent_vpp_1 mac=${MAC_TAP1} 55 Put TAPv2 Interface With IP node=agent_vpp_1 name=${NAME_TAP1} 56 ... mac=${MAC_TAP1} ip=${IP_TAP1} prefix=${PREFIX} host_if_name=linux_${NAME_TAP1} 57 58 Check TAP1 Interface Is Created 59 ${interfaces}= vpp_api: Interfaces Dump node=agent_vpp_1 60 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 61 ... vpp_term: Interface Is Created node=agent_vpp_1 mac=${MAC_TAP1} 62 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP1} 63 ... mac=${MAC_TAP1} ipv4=${IP_TAP1}/${PREFIX} state=${UP_STATE} 64 65 Add TAP2 Unnumbered Interface 66 vpp_term: Interface Not Exists node=agent_vpp_1 mac=${MAC_TAP2} 67 Put TAP Unnumbered Interface node=agent_vpp_1 name=${NAME_TAP2} 68 ... mac=${MAC_TAP2} unnumbered=true interface_with_ip_name=${NAME_TAP1} 69 ... host_if_name=linux_${NAME_TAP2} 70 71 Check TAP2 Unnumbered Interface Is Created 72 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 73 ... vpp_term: Interface Is Created node=agent_vpp_1 mac=${MAC_TAP2} 74 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP2} 75 ... mac=${MAC_TAP2} ipv4=${IP_TAP1}/${PREFIX} state=${UP_STATE} 76 77 Check TAP1 Interface Is Still Configured 78 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP1} 79 ... mac=${MAC_TAP1} ipv4=${IP_TAP1}/${PREFIX} state=${UP_STATE} 80 81 Update TAP1 Interface 82 Put TAPv2 Interface With IP node=agent_vpp_1 name=${NAME_TAP1} mac=${MAC_TAP1_2} 83 ... ip=${IP_TAP1_2} prefix=${PREFIX} host_if_name=linux_${NAME_TAP1} 84 85 Check TAP1_2 Interface Is Created 86 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 87 ... vpp_term: Interface Is Created node=agent_vpp_1 mac=${MAC_TAP1_2} 88 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP1} 89 ... mac=${MAC_TAP1_2} ipv4=${IP_TAP1_2}/${PREFIX} state=${UP_STATE} 90 91 Check TAP2 Unnumbered Interface Is Changed 92 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP2} 93 ... mac=${MAC_TAP2} ipv4=${IP_TAP1_2}/${PREFIX} state=${UP_STATE} 94 95 Add TAP3 Interface 96 vpp_term: Interface Not Exists node=agent_vpp_1 mac=${MAC_TAP3} 97 Put TAPv2 Interface With IP node=agent_vpp_1 name=${NAME_TAP3} mac=${MAC_TAP3} 98 ... ip=${IP_TAP3} prefix=${PREFIX} host_if_name=linux_${NAME_TAP3} 99 100 Check TAP3 Interface Is Created 101 ${interfaces}= vpp_api: Interfaces Dump node=agent_vpp_1 102 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 103 ... vpp_term: Interface Is Created node=agent_vpp_1 mac=${MAC_TAP3} 104 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP3} 105 ... mac=${MAC_TAP3} ipv4=${IP_TAP3}/${PREFIX} state=${UP_STATE} 106 107 Check TAP2 Unnumbered Interface IS Still Configuredl 108 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP2} 109 ... mac=${MAC_TAP2} ipv4=${IP_TAP1_2}/${PREFIX} state=${UP_STATE} 110 111 Update TAP2 Unnumbered Interface 112 Put TAP Unnumbered Interface node=agent_vpp_1 name=${NAME_TAP2} mac=${MAC_TAP2} 113 ... unnumbered=true interface_with_ip_name=${NAME_TAP3} host_if_name=linux_${NAME_TAP2} 114 115 Check TAP2_2 Unnumbered Interface Is Created 116 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 117 ... vpp_term: Interface Is Created node=agent_vpp_1 mac=${MAC_TAP2} 118 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP2} 119 ... mac=${MAC_TAP2} ipv4=${IP_TAP3}/${PREFIX} state=${UP_STATE} 120 121 Check TAP1_2 Interface Is Still Configured 122 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP1} 123 ... mac=${MAC_TAP1_2} ipv4=${IP_TAP1_2}/${PREFIX} state=${UP_STATE} 124 125 Check TAP3 Interface Is Still Configured 126 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP3} 127 ... mac=${MAC_TAP3} ipv4=${IP_TAP3}/${PREFIX} state=${UP_STATE} 128 129 Delete TAP1_2 Interface 130 Delete VPP Interface agent_vpp_1 ${NAME_TAP1} 131 132 Check TAP1_2 Interface Has Been Deleted 133 Wait Until Keyword Succeeds ${WAIT_TIMEOUT} ${SYNC_SLEEP} 134 ... vpp_term: Interface Not Exists node=agent_vpp_1 mac=${MAC_TAP1_2} 135 136 Check TAP2_2 Unnumbered Interface IS Still Configured 137 ${actual_state}= vpp_term: Check TAP interface State agent_vpp_1 ${NAME_TAP2} 138 ... mac=${MAC_TAP2} ipv4=${IP_TAP3}/${PREFIX} state=${UP_STATE} 139 140 Show Interfaces And Other Objects After Setup 141 vpp_term: Show Interfaces agent_vpp_1 142 Write To Machine agent_vpp_1_term show int addr 143 Write To Machine agent_vpp_1_term show h 144 Write To Machine agent_vpp_1_term show br 145 Write To Machine agent_vpp_1_term show br 1 detail 146 Write To Machine agent_vpp_1_term show err 147 vpp_api: Interfaces Dump agent_vpp_1 148 Execute In Container agent_vpp_1 ip a 149 150 *** Keywords *** 151 TestSetup 152 Make Datastore Snapshots ${TEST_NAME}_test_setup 153 154 TestTeardown 155 Make Datastore Snapshots ${TEST_NAME}_test_teardown