go.ligato.io/vpp-agent/v3@v3.5.0/tests/robot/libraries/pretty_keywords.robot (about) 1 *** Keywords *** 2 Ping From ${node} To ${ip} 3 vpp_term: Check Ping ${node} ${ip} 4 5 Ping6 From ${node} To ${ip} 6 vpp_term: Check Ping6 ${node} ${ip} 7 8 9 Ping On ${node} With IP ${ip}, Source ${source} 10 vpp_term: Check Ping Within Interface ${node} ${ip} ${source} 11 12 Create Loopback Interface ${name} On ${node} With Ip ${ip}/${prefix} And Mac ${mac} 13 Put Loopback Interface With IP ${node} ${name} ${mac} ${ip} ${prefix} 14 15 Create Loopback Interface ${name} On ${node} With Mac ${mac} 16 Put Loopback Interface ${node} ${name} ${mac} 17 18 Create Loopback Interface ${name} On ${node} With VRF ${vrf}, Ip ${ip}/${prefix} And Mac ${mac} 19 Put Loopback Interface With IP ${node} ${name} ${mac} ${ip} ${prefix} vrf=${vrf} 20 21 Create ${type} ${name} On ${node} With MAC ${mac}, Key ${key} And ${sock} Socket 22 ${type}= Set Variable if "${type}"=="Master" true false 23 put memif interface ${node} ${name} ${mac} ${type} ${key} ${sock} 24 25 Create ${type} ${name} On ${node} With IP ${ip}, MAC ${mac}, Key ${key} And ${socket} Socket 26 ${type}= Set Variable if "${type}"=="Master" true false 27 ${out}= Put Memif Interface With IP ${node} ${name} ${mac} ${type} ${key} ${ip} socket=${socket} 28 29 Create ${type} ${name} On ${node} With Prefixed IP ${ip}/${prefix}, MAC ${mac}, Key ${key} And ${socket} Socket 30 ${type}= Set Variable if "${type}"=="Master" true false 31 ${out}= Put Memif Interface With IP ${node} ${name} ${mac} ${type} ${key} ${ip} prefix=${prefix} socket=${socket} 32 33 Create ${type} ${name} On ${node} With Vrf ${vrf}, IP ${ip}, MAC ${mac}, Key ${key} And ${socket} Socket 34 ${type}= Set Variable if "${type}"=="Master" true false 35 ${out}= Put Memif Interface With IP ${node} ${name} ${mac} ${type} ${key} ${ip} socket=${socket} vrf=${vrf} 36 37 Create Tapv2 Interface ${name} On ${node} With Vrf ${vrf}, IP ${ip}, MAC ${mac} And HostIfName ${host_if_name} 38 ${out}= Put TAPv2 Interface With IP ${node} ${name} ${mac} ${ip} ${host_if_name} vrf=${vrf} 39 40 Create Bridge Domain ${name} with Autolearn On ${node} With Interfaces ${interfaces} 41 @{ints}= Split String ${interfaces} separator=,${space} 42 put bridge domain ${node} ${name} ${ints} 43 44 Create Bridge Domain ${name} Without Autolearn On ${node} With Interfaces ${interfaces} 45 @{ints}= Split String ${interfaces} separator=,${space} 46 put bridge domain ${node} ${name} ${ints} unicast=false learn=false 47 48 Create Route On ${node} With IP ${ip}/${prefix} With Next Hop ${next_hop} And Vrf Id ${id} 49 ${data}= OperatingSystem.Get File ${CURDIR}/../../robot/resources/static_route.json 50 ${data}= replace variables ${data} 51 ${uri}= Set Variable /vnf-agent/${node}/config/vpp/${AGENT_VER}/route/vrf/${id}/dst/${ip}/${prefix}/gw/${next_hop} 52 ${out}= Put Json ${uri} ${data} 53 54 Create Route On ${node} With IP ${ip}/${prefix} With Next Hop VRF ${next_hop_vrf} From Vrf Id ${id} And Type ${type} 55 ${data}= OperatingSystem.Get File ${CURDIR}/../../robot/resources/route_to_other_vrf.json 56 ${data}= replace variables ${data} 57 ${uri}= Set Variable /vnf-agent/${node}/config/vpp/${AGENT_VER}/route/vrf/${id}/dst/${ip}/${prefix} 58 ${out}= Put Json ${uri} ${data} 59 60 Create Route On ${node} With IP ${ip}/${prefix} With Vrf Id ${id} With Interface ${interface} And Next Hop ${next_hop} 61 ${data}= OperatingSystem.Get File ${CURDIR}/../../robot/resources/static_route_with_interface.json 62 ${data}= replace variables ${data} 63 ${uri}= Set Variable /vnf-agent/${node}/config/vpp/${AGENT_VER}/route/vrf/${id}/dst/${ip}/${prefix}/gw/${next_hop} 64 ${out}= Put Json ${uri} ${data} 65 66 Create DNat On ${node} With Name ${name} Local IP ${local_ip} Local Port ${local_port} External IP ${ext_ip} External Interface ${ext_int} External Port ${ext_port} Vrf Id ${id} 67 ${data}= OperatingSystem.Get File ${CURDIR}/../../robot/resources/nat-dnat.json 68 ${data}= replace variables ${data} 69 ${uri}= Set Variable /vnf-agent/${node}/config/vpp/nat/${AGENT_VER}/dnat44/${name} 70 ${out}= Put Json ${uri} ${data} 71 72 Create Interface GlobalNat On ${node} With First IP ${int_ip_1} On Inteface ${interface_1} And Second IP ${int_ip_2} On Interface ${interface_2} Vrf Id ${id} Config File ${nat_global_conf} 73 ${data}= OperatingSystem.Get File ${CURDIR}/../../robot/resources/${nat_global_conf} 74 ${data}= replace variables ${data} 75 ${uri}= Set Variable /vnf-agent/${node}/config/vpp/nat/${AGENT_VER}/nat44-global 76 ${out}= Put Json ${uri} ${data} 77 78 Remove DNat On ${node} With Name ${name} 79 Delete Dnat ${node} ${name} 80 81 Remove Global Nat On ${node} 82 Delete Nat Global ${node} 83 84 Delete IPsec On ${node} With Prefix ${prefix} And Index ${index} 85 Delete IPsec ${node} ${prefix} ${index} 86 87 Create VXLan ${name} From ${src_ip} To ${dst_ip} With Vni ${vni} On ${node} 88 Put VXLan Interface ${node} ${name} ${src_ip} ${dst_ip} ${vni} 89 90 Delete Routes On ${node} And Vrf Id ${id} 91 Delete routes ${node} ${id} 92 93 Remove Interface ${name} On ${node} 94 Delete VPP Interface ${node} ${name} 95 96 Remove Bridge Domain ${name} On ${node} 97 Delete Bridge Domain ${node} ${name} 98 99 Add fib entry for ${mac} in ${name} over ${outgoing} on ${node} 100 Put Static Fib Entry ${node} ${name} ${mac} ${outgoing} 101 102 Command: ${cmd} should ${expected} 103 ${out}= Run Keyword And Ignore Error ${cmd} 104 Should Be Equal @{out}[0] ${expected} ignore_case=True 105 [Return] ${out} 106 107 IP Fib Table ${id} On ${node} Should Be Empty 108 ${out}= vpp_term: Show IP Fib Table ${node} ${id} 109 Should Be Equal ${out} vpp#${SPACE} 110 111 IP6 Fib Table ${id} On ${node} Should Be Empty 112 ${out}= vpp_term: Show IP6 Fib Table ${node} ${id} 113 Should Be Equal ${out} vpp#${SPACE} 114 115 IP Fib Table ${id} On ${node} Should Not Be Empty 116 ${out}= vpp_term: Show IP Fib Table ${node} ${id} 117 Should Not Be Equal ${out} vpp#${SPACE} 118 119 IP Fib Table ${id} On ${node} Should Contain Route With IP ${ip}/${prefix} 120 ${out}= vpp_term: Show IP Fib Table ${node} ${id} 121 Should Match Regexp ${out} ${ip}\/${prefix}\r\r\n\ \ \unicast\-ip4-chain\r\r\n\ \ \ 122 #Should Match Regexp ${out} ${ip}\\/${prefix}\\s*unicast\\-ip4-chain\\s*\\[\\@0\\]:\\ dpo-load-balance:\\ \\[proto:ip4\\ index:\\d+\\ buckets:\\d+\\ uRPF:\\d+\\ to:\\[0:0\\]\\] 123 124 IP Fib Table ${id} On ${node} Should Not Contain Route With IP ${ip}/${prefix} 125 ${out}= vpp_term: Show IP Fib Table ${node} ${id} 126 Should Not Match Regexp ${out} ${ip}\/${prefix}\r\r\n\ \ \unicast\-ip4-chain\r\r\n\ \ \ 127 #Should Not Match Regexp ${out} ${ip}\\/${prefix}\\s*unicast\\-ip4-chain\\s*\\[\\@0\\]:\\ dpo-load-balance:\\ \\[proto:ip4\\ index:\\d+\\ buckets:\\d+\\ uRPF:\\d+\\ to:\\[0:0\\]\\] 128 129 IP6 Fib Table ${id} On ${node} Should Contain Route With IP ${ip}/${prefix} 130 ${out}= vpp_term: Show IP6 Fib Table ${node} ${id} 131 Should Match Regexp ${out} ${ip}\\/${prefix}\\s*unicast\\-ip6-chain\\s*\\[\\@0\\]:\\ dpo-load-balance:\\ \\[proto:ip6\\ index:\\d+\\ buckets:\\d+\\ uRPF:\\d+\\ to:\\[0:0\\]\\] 132 133 IP6 Fib Table ${id} On ${node} Should Not Contain Route With IP ${ip}/${prefix} 134 ${out}= vpp_term: Show IP6 Fib Table ${node} ${id} 135 Should Not Match Regexp ${out} ${ip}\\/${prefix}\\s*unicast\\-ip6-chain\\s*\\[\\@0\\]:\\ dpo-load-balance:\\ \\[proto:ip6\\ index:\\d+\\ buckets:\\d+\\ uRPF:\\d+\\ to:\\[0:0\\]\\] 136 137 138 Show IP Fib On ${node} 139 ${out}= vpp_term: Show IP Fib ${node} 140 141 Show IP6 Fib On ${node} 142 ${out}= vpp_term: Show IP6 Fib ${node} 143 144 Show Interfaces On ${node} 145 ${out}= vpp_term: Show Interfaces ${node} 146 147 Show Interfaces Address On ${node} 148 ${out}= vpp_term: Show Interfaces Address ${node}