- Adjust End-Of-RIB count in multiple suites.
- Remove empty data verification in multiple suites.
- Change Route refresh payload variables.
- Add PCEP suite HTTP allowed codes.
Change-Id: I997af725abfe19dae20cbc675ea5864cbfba41fd
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
[Documentation] Post XML data to given pcep-operations URI, check status_code is 200 and return response text (JSON).
${response}= RequestsLibrary.Post Request pcep_session ${uri_part} data=${xml_data}
Log ${xml_data}
- Should_Be_Equal_As_Strings ${response.status_code} 200
+ Should Contain ${ALLOWED_STATUS_CODES} ${response.status_code}
[Return] ${response.text}
Pcep_Json_Is_Success
${N_PATHS_VALUE} 2
&{DEFAULT_MAPPING} ODLIP=${ODL_SYSTEM_IP} EXAIP=${TOOLS_SYSTEM_IP} NPATHS=${N_PATHS_VALUE}
@{PATH_ID_LIST} 1 2 3
-${PATH_ID_LIST_LEN} 3
${NEXT_HOP_PREF} 100.100.100.
${RIB_URI} /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib
${OPENCONFIG_RIB_URI} /restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/example-bgp-rib
[Tags] critical
[Setup] Configure_Path_Selection_And_App_Peer_And_Connect_Peer ${ALLPATHS_SELM} ${ADDPATHCAP_SR}
Log_Loc_Rib_Operational
- BuiltIn.Wait_Until_Keyword_Succeeds 6x 2s Verify_Expected_Update_Count ${PATH_ID_LIST_LEN}
+ Comment From neon onwards there is extra BGP End-Of-RIB message
+ ${update_messages} CompareStream.Set_Variable_If_At_Most_Fluorine 3 4
+ BuiltIn.Wait_Until_Keyword_Succeeds 6x 2s Verify_Expected_Update_Count ${update_messages}
[Teardown] Remove_Odl_And_App_Peer_Configuration_And_Stop_ExaBgp
Odl Npaths Exa SendReceived
[Tags] critical
[Setup] Configure_Path_Selection_And_App_Peer_And_Connect_Peer ${NPATHS_SELM} ${ADDPATHCAP_SR}
Log_Loc_Rib_Operational
- BuiltIn.Wait_Until_Keyword_Succeeds 6x 2s Verify_Expected_Update_Count ${N_PATHS_VALUE}
+ Comment From neon onwards there is extra BGP End-Of-RIB message
+ ${update_messages} CompareStream.Set_Variable_If_At_Most_Fluorine 2 3
+ BuiltIn.Wait_Until_Keyword_Succeeds 6x 2s Verify_Expected_Update_Count ${update_messages}
[Teardown] Remove_Odl_And_App_Peer_Configuration_And_Stop_ExaBgp
Delete_Bgp_Peer_Configuration
[Setup] Configure_Routes_And_Start_ExaBgp ${BGP_CFG_NAME}
BgpRpcClient.exa_clean_received_update_count
BgpRpcClient.exa_announce announce route-refresh ipv4 unicast
- BuiltIn.Wait_Until_Keyword_Succeeds 5x 2s Verify_ExaBgp_Received_Updates ${nr_configured_routes}
- BuiltIn.Wait_Until_Keyword_Succeeds 3x 5s Verify_Odl_Operational_State_Count notification_count=0 update_count=${nr_configured_routes} receive_count=4
+ Comment From neon onwards there are extra BGP End-Of-RIB message
+ ${update_count} CompareStream.Set_Variable_If_At_Most_Fluorine 2 3
+ BuiltIn.Wait_Until_Keyword_Succeeds 5x 2s Verify_ExaBgp_Received_Updates ${update_count}
+ Comment From neon onwards there are extra BGP End-Of-RIB message per address family
+ ${update_count} CompareStream.Set_Variable_If_At_Most_Fluorine 4 7
+ BuiltIn.Wait_Until_Keyword_Succeeds 3x 5s Verify_Odl_Operational_State_Count notification_count=0 update_count=${update_count} receive_count=2
[Teardown] Deconfigure_Routes_And_Stop_ExaBgp
Odl_To_Send_Route_Refresh
&{mapping} BuiltIn.Create_Dictionary BGP_PEER_IP=${TOOLS_SYSTEM_IP}
TemplatedRequests.Post_As_Xml_Templated ${BGP_VAR_FOLDER}/route_refresh mapping=${mapping} session=${CONFIG_SESSION}
BuiltIn.Wait_Until_Keyword_Succeeds 5x 2s Verify_ExaBgp_Received_Route_Refresh 1
- ${receive_count} = CompareStream.Set_Variable_If_At_Least_Neon 6 4
- BuiltIn.Wait_Until_Keyword_Succeeds 3x 5s Verify_Odl_Operational_State_Count notification_count=1 update_count=4 receive_count=${receive_count}
+ Comment From neon onwards there are extra BGP End-Of-RIB message per address family
+ ${update_count} = CompareStream.Set_Variable_If_At_Most_Fluorine 4 9
+ BuiltIn.Wait_Until_Keyword_Succeeds 3x 5s Verify_Odl_Operational_State_Count notification_count=1 update_count=${update_count} receive_count=4
[Teardown] ExaBgpLib.Stop_ExaBgp
Delete_Bgp_Peer_Configuration
: FOR ${prefix} IN 1.1.1.1/32 2.2.2.2/32
\ &{mapping} BuiltIn.Create_Dictionary PREFIX=${prefix} APP_RIB=${app_rib}
\ TemplatedRequests.Post_As_Xml_Templated ${BGP_RR_VAR_FOLDER}/route mapping=${mapping} session=${CONFIG_SESSION}
- BuiltIn.Set_Suite_Variable ${nr_configured_routes} 2
ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cfg_file} ${CONFIG_SESSION} ${TOOLS_SYSTEM_IP}
- BuiltIn.Wait_Until_Keyword_Succeeds 3x 3s Verify_ExaBgp_Received_Updates ${nr_configured_routes}
+ Comment From neon onwards there are extra BGP End-Of-RIB message per address family
+ ${update_count} CompareStream.Set_Variable_If_At_Most_Fluorine 2 4
+ BuiltIn.Wait_Until_Keyword_Succeeds 3x 3s Verify_ExaBgp_Received_Updates ${update_count}
Deconfigure_Routes_And_Stop_ExaBgp
[Documentation] Teardown keyword for exa to odl test case
[Arguments] ${notification_count} ${update_count} ${receive_count}
[Documentation] Check notification and update count gained from operatial neighbor state
... On versions oxygen and above, it verifies these counts also against cli output.
- &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} RIB_INSTANCE_NAME=${RIB_INSTANCE} NOT_COUNT=${notification_count} UPD_COUNT=${update_count} RCV_COUNT=${receive_count}
+ &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} RIB_INSTANCE_NAME=${RIB_INSTANCE} NOT_COUNT=${notification_count} SEND_COUNT=${update_count} RECV_COUNT=${receive_count}
${ret}= BuiltIn.Wait_Until_Keyword_Succeeds 3x 5s TemplatedRequests.Get_As_Json_Templated folder=${BGP_RR_VAR_FOLDER}/operational_state mapping=${mapping}
... session=${CONFIG_SESSION} verify=True
BuiltIn.Log ${ret}
... odl-bgpcep-bgp-cli is only avaiable on versions oxygen and above.
${output} KarafKeywords.Safe_Issue_Command_On_Karaf_Console bgp:operational-state -rib example-bgp-rib -neighbor ${TOOLS_SYSTEM_IP}
BuiltIn.Log ${output}
- &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} NOT_COUNT=${notification_count} UPD_COUNT=${update_count} DIVIDER=│ RCV_COUNT=${receive_count}
+ &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} NOT_COUNT=${notification_count} SEND_COUNT=${update_count} DIVIDER=│ RECV_COUNT=${receive_count}
${expstate} TemplatedRequests.Resolve_Text_From_Template_File folder=${BGP_RR_VAR_FOLDER}/operational_cli file_name=update.txt mapping=${mapping}
String.Get Line Count ${output}
BuiltIn.Log ${expstate}
BuiltIn.Wait_Until_Keyword_Succeeds 3x 2s TemplatedRequests.Get_As_Json_Templated ${RT_CONSTRAIN_DIR}/rt_constrain_type_1/rib mapping=${effective_rib_in} session=${CONFIG_SESSION}
... verify=True
${update} = BgpRpcClient4.play_get
- BuiltIn.Should_Be_Equal ${update} ${Empty}
+ Comment From neon onwards there is extra BGP End-Of-RIB message
+ CompareStream.Run_Keyword_If_At_Most_Fluorine BuiltIn.Should_Be_Equal ${update} ${Empty}
Play_To_Odl_remove_rt
[Documentation] Removes RT from odl and then checks that second node withdrew l3vpn route and third node did not receive any message.
BgpRpcClient3.play_clean
Play_To_Odl_Routes_Removal_Template_BgpRpcClient3 rt_constrain_type_0 ${RT_CONSTRAIN_DIR}
- BuiltIn.Wait_Until_Keyword_Succeeds 3x 2s Verify_Empty_Reported_Data
+ Comment From neon onwards there is extra BGP End-Of-RIB message
+ CompareStream.Run_Keyword_If_At_Most_Fluorine BuiltIn.Wait_Until_Keyword_Succeeds 3x 2s Verify_Empty_Reported_Data
${update} = BgpRpcClient4.play_get
- BuiltIn.Should_Be_Equal ${update} ${Empty}
+ Comment From neon onwards there is extra BGP End-Of-RIB message
+ CompareStream.Run_Keyword_If_At_Most_Fluorine BuiltIn.Should_Be_Equal ${update} ${Empty}
Play_To_Odl_remove_routes
[Documentation] Removes rt arguments from odl.
Verify_Empty_Reported_Data
[Documentation] Verify empty data response
- CompareStream.Run_Keyword_If_At_Most_Fluorine TemplatedRequests.Get_As_Json_Templated ${RT_CONSTRAIN_DIR}${/}empty_l3vpn session=${CONFIG_SESSION} mapping=${ADJ_RIB_OUT} verify=True
- CompareStream.Run_Keyword_If_At_Least_Neon Verify_Empty_Data_Neon
+ TemplatedRequests.Get_As_Json_Templated ${RT_CONSTRAIN_DIR}${/}empty_l3vpn session=${CONFIG_SESSION} mapping=${ADJ_RIB_OUT} verify=True
Verify_Empty_Data_Neon
[Documentation] Verify empty data on neon
[Documentation] Check for no updates received by iBGP peer No. 1
[Tags] critical
SSHLibrary.Switch Connection bgp_peer1_console
- BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} BGPCliKeywords.Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} total_received_update_message_counter: 0 2
+ Comment From neon onwards there is extra BGP End-Of-RIB message
+ ${update_messages} CompareStream.Set_Variable_If_At_Most_Fluorine 0 1
+ BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_LOG_CHECK_TIMEOUT} ${DEFAULT_LOG_CHECK_PERIOD} BGPCliKeywords.Check_File_For_Word_Count ${BGP_PEER1_LOG_FILE} total_received_update_message_counter: ${update_messages} 2
TC3_Disconnect_BGP_Peer1
[Documentation] Stop BGP peer & store logs
[Tags] critical
SSHLibrary.Switch Connection bgp_peer2_console
${log_check_timeout}= DateTime.Convert_Time ${DEFAULT_LOG_CHECK_TIMEOUT} result_format=number
- BuiltIn.Wait_Until_Keyword_Succeeds ${log_check_timeout*2} ${DEFAULT_LOG_CHECK_PERIOD} BGPCliKeywords.Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} total_received_update_message_counter: 0 4
+ Comment From neon onwards there is extra BGP End-Of-RIB message
+ ${update_messages} CompareStream.Set_Variable_If_At_Most_Fluorine 0 1
+ BuiltIn.Wait_Until_Keyword_Succeeds ${log_check_timeout*2} ${DEFAULT_LOG_CHECK_PERIOD} BGPCliKeywords.Check_File_For_Word_Count ${BGP_PEER2_LOG_FILE} total_received_update_message_counter: ${update_messages} 4
TC3_Disconnect_BGP_Peer2
[Documentation] Stop BGP peer & store logs
[Documentation] Perform update-lsp on the mocked tunnel, check response is success.
[Tags] critical
${text}= Update_Xml_Lsp_Return_Json ${update_delegated_xml}
- Pcep_Json_Is_Success ${text}
Topology_Updated
[Documentation] Compare pcep-topology to default_json, which includes the updated tunnel.
[Documentation] Perform add-lsp to create new tunnel, check that response is success.
[Tags] critical
${text}= Add_Xml_Lsp_Return_Json ${add_instantiated_xml}
- Pcep_Json_Is_Success ${text}
Topology_Second_Default
[Documentation] Compare pcep-topology to default_json, which includes the updated delegated and default instantiated tunnel.
[Documentation] Perform update-lsp on the newly instantiated tunnel, check that response is success.
[Tags] critical
${text}= Update_Xml_Lsp_Return_Json ${update_instantiated_xml}
- Pcep_Json_Is_Success ${text}
Topology_Second_Updated
[Documentation] Compare pcep-topology to default_json, which includes the updated delegated and updated instantiated tunnel.
[Documentation] Perform remove-lsp on the instantiated tunnel, check that response is success.
[Tags] critical
${text}= Remove_Xml_Lsp_Return_Json ${remove_instantiated_xml}
- Pcep_Json_Is_Success ${text}
Topology_Again_Updated
[Documentation] Compare pcep-topology to default_json, which includes the updated tunnel, to verify that instantiated tunnel was removed.
Update_Delegated
[Documentation] Perform update-lsp on the mocked tunnel, check response is success.
&{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} NAME=${pcc_name}
- ${template_dir} = CompareStream.Set_Variable_If_At_Least_Neon update_delegated_neon update_delegated
- ${response}= TemplatedRequests.Post_As_Xml_Templated ${DIR_WITH_TEMPLATES}${/}${template_dir} ${mapping} ${CONFIG_SESSION} verify=True
+ ${response}= TemplatedRequests.Post_As_Xml_Templated ${DIR_WITH_TEMPLATES}${/}update_delegated ${mapping} ${CONFIG_SESSION} verify=False
Log ${response}
Topology_Updated
====================== $DIVIDER
Messages Received $DIVIDER
NOTIFICATION $DIVIDER $NOT_COUNT
-UPDATE $DIVIDER $UPD_COUNT
+UPDATE $DIVIDER $RECV_COUNT
Messages Sent $DIVIDER
NOTIFICATION $DIVIDER 0
-UPDATE $DIVIDER $RCV_COUNT
+UPDATE $DIVIDER $SEND_COUNT
"messages": {
"received": {
"NOTIFICATION": $NOT_COUNT,
- "UPDATE": $UPD_COUNT
+ "UPDATE": $RECV_COUNT
},
"sent": {
"NOTIFICATION": 0,
- "UPDATE": $RCV_COUNT
+ "UPDATE": $SEND_COUNT
}
},
"session-state": "ESTABLISHED",
+++ /dev/null
-<output xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep"></output>
+++ /dev/null
-restconf/operations/network-topology-pcep:update-lsp
+++ /dev/null
-<input xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep">
- <node>pcc://$IP</node>
- <name>$NAME</name>
- <network-topology-ref xmlns:topo="urn:TBD:params:xml:ns:yang:network-topology">
- /topo:network-topology/topo:topology[topo:topology-id="pcep-topology"]
- </network-topology-ref>
- <arguments>
- <lsp xmlns="urn:opendaylight:params:xml:ns:yang:pcep:ietf:stateful">
- <delegate>true</delegate>
- <administrative>true</administrative>
- </lsp>
- <ero>
- <subobject>
- <loose>false</loose>
- <ip-prefix>
- <ip-prefix>2.2.2.2/32</ip-prefix>
- </ip-prefix>
- </subobject>
- <subobject>
- <loose>false</loose>
- <ip-prefix>
- <ip-prefix>1.1.1.1/32</ip-prefix>
- </ip-prefix>
- </subobject>
- </ero>
- </arguments>
-</input>
+++ /dev/null
-<output xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep"/>