Resource TemplatedRequests.robot
Resource KarafKeywords.robot
Resource ../variables/Variables.robot
+Resource ../variables/netvirt/Variables.robot
Library Collections
Library String
Library OperatingSystem
Log ${resp}
[Return] ${resp}
+VPN Get L3VPN ID
+ [Arguments] ${vrf_id}
+ [Documentation] Check that sub interface ip has been learnt after ARP request
+ ${resp} = RequestsLibrary.Get Request session ${VPN_REST}
+ BuiltIn.Log ${resp.content}
+ @{list_any_matches} = String.Get_Regexp_Matches ${resp.content} \"vpn-instance-name\":\"${VPN_INSTANCE_ID}\",.*"vrf-id":"${vrf_id}",\"vpn-id\":(\\d+) 1
+ ${result} = Evaluate ${list_any_matches[0]} * 2
+ ${vpn_id_hex} = BuiltIn.Convert To Hex ${result}
+ [Return] ${vpn_id_hex.lower()}
+
Associate L3VPN To Network
[Arguments] &{Kwargs}
[Documentation] Associate the created L3VPN to a network-id received as dictionary argument
Verify Flows Are Present For L3VPN
[Arguments] ${ip} ${vm_ips}
[Documentation] Verify Flows Are Present For L3VPN
- ${flow_output}= Run Command On Remote System And Log ${ip} sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
+ ${flow_output}= Run Command On Remote System And Log ${ip} sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
Should Contain ${flow_output} table=${ODL_FLOWTABLE_L3VPN}
${l3vpn_table} = Get Lines Containing String ${flow_output} table=${ODL_FLOWTABLE_L3VPN},
Log ${l3vpn_table}
Verify GWMAC Flow Entry Removed From Flow Table
[Arguments] ${cnIp}
[Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table.
- ${flow_output}= Run Command On Remote System And Log ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
+ ${flow_output}= Run Command On Remote System And Log ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
Should Contain ${flow_output} table=${GWMAC_TABLE}
${gwmac_table} = Get Lines Containing String ${flow_output} table=${GWMAC_TABLE}
Log ${gwmac_table}
Verify GWMAC Flow Entry On Flow Table
[Arguments] ${cnIp} ${ipv}=ipv4
[Documentation] Verify the GWMAC Table, ARP Response table and Dispatcher table.
- ${flow_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-flows br-int
- ${group_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-groups br-int
+ ${flow_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-flows ${INTEGRATION_BRIDGE}
+ ${group_output}= Run Command On Remote System ${cnIp} sudo ovs-ofctl -O OpenFlow13 dump-groups ${INTEGRATION_BRIDGE}
Should Contain ${flow_output} table=${DISPATCHER_TABLE}
${dispatcher_table} = Get Lines Containing String ${flow_output} table=${DISPATCHER_TABLE}
Should Contain ${dispatcher_table} goto_table:${GWMAC_TABLE}