Reconfigure_ODL_To_Accept_Connections
[Documentation] Configure BGP peer modules with initiate-connection set to false.
... In Versions Fluorine and above, it sets peer-group as template, and than sets all neighbors using it.
- CompareStream.Run_Keyword_If_At_Least_Fluorine Configure_Peer_Group
+ Configure_Peer_Group
FOR ${index} IN RANGE 1 ${MULTIPLICITY_CHANGE_COUNT_MANY}+1
${peer_name} = BuiltIn.Set_Variable example-bgp-peer-${index}
${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
&{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} HOLDTIME=${HOLDTIME_CHANGE_COUNT_MANY}
... PEER_PORT=${BGP_TOOL_PORT} INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
... RIB_INSTANCE_NAME=${RIB_INSTANCE} PEER_GROUP_NAME=${PEER_GROUP} RR_CLIENT=false
- CompareStream.Run_Keyword_If_At_Least_Fluorine TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer_group mapping=${mapping}
- CompareStream.Run_Keyword_If_Less_Than_Fluorine TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
+ TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer_group mapping=${mapping}
# FIXME: Add testcase to change bgpcep and protocol log levels, when a Keyword that does it without messing with current connection is ready.
END
${peer_ip} = BuiltIn.Evaluate str(ipaddr.IPAddress('${FIRST_PEER_IP}') + ${index} - 1) modules=ipaddr
&{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${peer_name} IP=${peer_ip} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
... PEER_GROUP_NAME=${PEER_GROUP} RR_CLIENT=false
- CompareStream.Run_Keyword_If_At_Least_Fluorine TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer_group mapping=${mapping}
- CompareStream.Run_Keyword_If_Less_Than_Fluorine TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping}
+ TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer_group mapping=${mapping}
END
- CompareStream.Run_Keyword_If_At_Least_Fluorine Deconfigure_Peer_Group
+ Deconfigure_Peer_Group
*** Keywords ***
Setup_Everything
... peer-groups. This test case is specific to versions Fluorine and above.
&{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} HOLDTIME=${HOLDTIME_CHANGE_COUNT_MANY} PEER_PORT=${BGP_TOOL_PORT} INITIATE=false BGP_RIB=${RIB_INSTANCE}
... PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} RIB_INSTANCE_NAME=${RIB_INSTANCE} PEER_GROUP_NAME=${PEER_GROUP} RR_CLIENT=false
+ ${verify_peer_group_folder} CompareStream.Run_Keyword_If_At_Least_Else sulfur BuiltIn.Set Variable verify_peer_group.sulfur
+ ... ELSE BuiltIn.Set Variable verify_peer_group
TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}peer_group mapping=${mapping}
- TemplatedRequests.Get_As_Json_Templated ${BGP_VARIABLES_FOLDER}${/}verify_peer_group mapping=${mapping} verify=True
+ TemplatedRequests.Get_As_Json_Templated ${BGP_VARIABLES_FOLDER}${/}${verify_peer_group_folder} mapping=${mapping} verify=True
Deconfigure_Peer_Group
[Documentation] Deconfigures peer group which is template for all the neighbors.
... peer-groups. This case is specific to versions Fluorine and above.
&{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} INITIATE=false BGP_RIB=${RIB_NAME}
... PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_NAME} PEER_GROUP_NAME=${PEER_GROUP} RR_CLIENT=false
+ ${verify_peer_group_folder} CompareStream.Run_Keyword_If_At_Least_Else sulfur BuiltIn.Set Variable verify_${peer_group_folder}.sulfur
+ ... ELSE BuiltIn.Set Variable verify_${peer_group_folder}
TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}${peer_group_folder} mapping=${mapping} session=${CONFIG_SESSION}
- TemplatedRequests.Get_As_Json_Templated ${BGP_VARIABLES_FOLDER}${/}verify_${peer_group_folder} mapping=${mapping} session=${CONFIG_SESSION} verify=True
+ TemplatedRequests.Get_As_Json_Templated ${BGP_VARIABLES_FOLDER}${/}${verify_peer_group_folder} mapping=${mapping} session=${CONFIG_SESSION} verify=True
Deconfigure_Peer_Group
[Documentation] Deconfigures peer group which is template for all the neighbors
--- /dev/null
+{
+ "bgp-openconfig-extensions:peer-group": [
+ {
+ "peer-group-name": "internal-neighbors",
+ "transport": {
+ "config": {
+ "passive-mode": true
+ }
+ },
+ "config": {
+ "peer-type": "INTERNAL"
+ },
+ "afi-safis": {
+ "afi-safi": [
+ {
+ "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST"
+ },
+ {
+ "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST"
+ },
+ {
+ "afi-safi-name": "bgp-openconfig-extensions:LINKSTATE"
+ }
+ ]
+ },
+ "timers": {
+ "config": {
+ "hold-time": "180.0",
+ "connect-retry": "5.0"
+ }
+ },
+ "route-reflector": {
+ "config": {
+ "route-reflector-client": false
+ }
+ }
+ }
+ ]
+}