go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/libraries/interface/loopback.robot (about) 1 [Documentation] Keywords for working with loopback interfaces using VPP API 2 3 *** Settings *** 4 Resource ../vpp_api.robot 5 Resource ./interface_generic.robot 6 7 *** Variables *** 8 ${terminal_timeout}= 30s 9 ${bd_timeout}= 15s 10 11 *** Keywords *** 12 13 vpp_api: Check Loopback Interface State 14 [Arguments] ${node} ${name} @{desired_state} 15 ${internal_name}= Get Interface Internal Name ${node} ${name} 16 ${int_state}= vpp_api: Get Interface State By Name ${node} ${internal_name} 17 ${ipv4_list}= vpp_term: Get Interface IPs ${node} ${internal_name} 18 ${ipv6_list}= vpp_term: Get Interface IP6 IPs ${node} ${internal_name} 19 ${enabled}= Set Variable ${int_state["admin_up_down"]} 20 ${mtu}= Set Variable ${int_state["mtu"][0]} 21 ${str_mac}= Set Variable ${int_state["l2_address"]} 22 ${mac}= Convert str To MAC Address ${str_mac} 23 ${actual_state}= Create List enabled=${enabled} mtu=${mtu} mac=${mac} 24 :FOR ${ip} IN @{ipv4_list} 25 \ Append To List ${actual_state} ipv4=${ip} 26 :FOR ${ip} IN @{ipv6_list} 27 \ Append To List ${actual_state} ipv6=${ip} 28 List Should Contain Sub List ${actual_state} ${desired_state} 29 [Return] ${actual_state}