${OLD_AS_PATH} \n"as-path": {},
${NEW_AS_PATH} ${EMPTY}
&{APP_PEER} IP=${ODL_SYSTEM_IP} BGP_RIB=${RIB_NAME}
+${NEW_IPV4_ROUTES_LINE} ${EMPTY}
+${OLD_IPV4_ROUTES_LINE} \n"bgp-inet:ipv4-routes": {},
+${BGP_CONFIG_SERVER_CMD} bgp-connect -h ${ODL_SYSTEM_IP} -p 7644 add
+${VPNV4_ADDR_FAMILY} vpnv4
+${DISPLAY_VPN4_ALL} show-bgp --cmd "ip bgp ${VPNV4_ADDR_FAMILY} all"
*** Keywords ***
Start Quagga Processes On ODL
Restart BGP Processes On DCGW
[Arguments] ${dcgw_ip}
- [Documentation] To Restart the zrpcd, bgpd,and zebra processes on DCGW
+ [Documentation] To Restart the zrpcd, bgpd and zebra processes on DCGW
${dcgw_conn_id} = Open_Connection_To_Tools_System ip_address=${dcgw_ip}
Switch Connection ${dcgw_conn_id}
Write Commands Until Expected Prompt sudo pkill -f bgpd ${DEFAULT_LINUX_PROMPT_STRICT}
Start Quagga Processes On DCGW ${dcgw_ip}
+Stop BGP Processes On Node
+ [Arguments] ${node_ip}
+ [Documentation] To stop the bgpd , qthriftd processes on specific node given by user.
+ Utils.Run Command On Remote System ${node_ip} sudo pkill -f bgpd
+ Utils.Run Command On Remote System ${node_ip} sudo pkill -f zrpcd
+
Show Quagga Configuration On ODL
[Arguments] ${odl_ip} ${rd}
[Documentation] Show quagga config from ODL
Log ${output}
Should Contain ${output} BGP state = Established
+Setup BGP Peering On ODL
+ [Arguments] ${odl_ip} ${as_id} ${nbr_ip}
+ [Documentation] Setup BGP peering between ODL and given neighbor IP.
+ ... Configuring and starting BGP on ODL node with given AS number
+ ... Adding and verifying BGP neighbor
+ KarafKeywords.Issue Command On Karaf Console ${BGP_CONFIG_SERVER_CMD}
+ BgpOperations.Create BGP Configuration On ODL localas=${as_id} routerid=${odl_ip}
+ BgpOperations.AddNeighbor To BGP Configuration On ODL remoteas=${as_id} neighborAddr=${nbr_ip}
+ ${output} = BgpOperations.Get BGP Configuration On ODL session
+ BuiltIn.Should Contain ${output} ${nbr_ip}
+
+Setup BGP Peering On DCGW
+ [Arguments] ${dcgw_ip} ${as_id} ${nbr_ip} ${vrf_name} ${rd} ${loopback_ip}
+ [Documentation] Setup BGP peering between DCGW and given neighbor IP.
+ ... Configuring,adding neighbor on DCGW node and verifying BGP neighbor.
+ BgpOperations.Configure BGP And Add Neighbor On DCGW ${dcgw_ip} ${as_id} ${dcgw_ip} ${nbr_ip} ${vrf_name} ${rd}
+ ... ${loopback_ip}
+ ${output} = BgpOperations.Execute Show Command On Quagga ${dcgw_ip} ${RUN_CONFIG}
+ BuiltIn.Should Contain ${output} ${nbr_ip}
+
Verify Routes On Quagga
[Arguments] ${dcgw_ip} ${rd} ${ip_list}
[Documentation] Verify routes on quagga
Bmp_Monitor_Postcondition
[Arguments] ${session}
[Documentation] Verifies if example-bmp-monitor data contains one peer.
- &{mapping} BuiltIn.Create_Dictionary TOOL_IP=${TOOLS_SYSTEM_IP}
+ ${routes_line} = CompareStream.Set_Variable_If_At_Least_Neon ${NEW_IPV4_ROUTES_LINE} ${OLD_IPV4_ROUTES_LINE}
+ &{mapping} BuiltIn.Create_Dictionary TOOL_IP=${TOOLS_SYSTEM_IP} ROUTES_LINE=${routes_line}
${output} BuiltIn.Wait_Until_Keyword_Succeeds 10x 5s TemplatedRequests.Get_As_Json_Templated folder=${BGP_BMP_DIR} mapping=${mapping}
... session=${session} verify=True
BuiltIn.Log ${output}
[Documentation] Converts hex message arguments to integers and sums them up and returns the sum.
${final_sum} = BuiltIn.Evaluate sum(map(lambda x: int(x, 16), re.compile('[a-f\d]{2}').findall('${hex_string}'[32:]))) modules=re
[Return] ${final_sum}
+
+Check BGP VPNv4 Nbr On ODL
+ [Arguments] ${dcgw_count} ${flag}=True ${start}=${START_VALUE}
+ [Documentation] Check all BGP VPNv4 neighbor on ODL
+ ${output} = KarafKeywords.Issue Command On Karaf Console ${DISPLAY_VPN4_ALL}
+ : FOR ${index} IN RANGE ${start} ${dcgw_count}
+ \ BuiltIn.Run Keyword If ${flag}==True BuiltIn.Should Contain ${output} ${DCGW_IP_LIST[${index}]}
+ \ ... ELSE BuiltIn.Should Not Contain ${output} ${DCGW_IP_LIST[${index}]}