From bc1683e14e7480a04a3276d4da9e79c99f9ded84 Mon Sep 17 00:00:00 2001 From: Luis Gomez Date: Thu, 23 May 2019 23:30:31 -0700 Subject: [PATCH] Fix BGPCEP userfeatures - 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 --- csit/libraries/PcepOperations.robot | 2 +- .../020_bgp_functional_multipath.robot | 9 ++++--- .../040_bgp_functional_route_ref.robot | 22 +++++++++------ ...p_functional_rt_constrain_validation.robot | 12 +++++---- .../bgpcep/bgpuser/ibgp_peers_basic.robot | 8 ++++-- csit/suites/bgpcep/pcepuser/pcepuser.robot | 4 --- .../suites/bgpcep/tcpmd5user/tcpmd5user.robot | 3 +-- .../route_refresh/operational_cli/update.txt | 4 +-- .../route_refresh/operational_state/data.json | 4 +-- .../tcpmd5user/update_delegated/response.xml | 1 - .../update_delegated_neon/location.uri | 1 - .../update_delegated_neon/post_data.xml | 27 ------------------- .../update_delegated_neon/response.xml | 1 - 13 files changed, 39 insertions(+), 59 deletions(-) delete mode 100644 csit/variables/tcpmd5user/update_delegated/response.xml delete mode 100644 csit/variables/tcpmd5user/update_delegated_neon/location.uri delete mode 100644 csit/variables/tcpmd5user/update_delegated_neon/post_data.xml delete mode 100644 csit/variables/tcpmd5user/update_delegated_neon/response.xml diff --git a/csit/libraries/PcepOperations.robot b/csit/libraries/PcepOperations.robot index 23b8c628af..6455a6a771 100644 --- a/csit/libraries/PcepOperations.robot +++ b/csit/libraries/PcepOperations.robot @@ -54,7 +54,7 @@ Operate_Xml_Lsp_Return_Json [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 diff --git a/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot b/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot index 114fecc9fd..518439387b 100644 --- a/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot +++ b/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot @@ -40,7 +40,6 @@ ${EXARPCSCRIPT} ${CURDIR}/../../../../tools/exabgp_files/exarpc.py ${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 @@ -62,7 +61,9 @@ Odl Allpaths Exa SendReceived [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 @@ -70,7 +71,9 @@ 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 diff --git a/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot b/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot index 02d096b70f..25138525a9 100644 --- a/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot +++ b/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot @@ -62,8 +62,12 @@ Exa_To_Send_Route_Refresh [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 @@ -74,8 +78,9 @@ 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 @@ -126,9 +131,10 @@ Configure_Routes_And_Start_ExaBgp : 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 @@ -153,7 +159,7 @@ Verify_Odl_Operational_State_Count [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} @@ -165,7 +171,7 @@ Verify_Cli_Output_Count ... 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} diff --git a/csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot b/csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot index c18254ad6b..6d77b0463e 100644 --- a/csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot +++ b/csit/suites/bgpcep/bgpfunct/090_bgp_functional_rt_constrain_validation.robot @@ -103,15 +103,18 @@ Play_To_Odl_rt_constrain_type_1 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. @@ -238,8 +241,7 @@ Verify_Reported_Data 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 diff --git a/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot b/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot index 641c1dae92..d9f91c06b3 100644 --- a/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot +++ b/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot @@ -253,7 +253,9 @@ TC3_BGP_Peer1_Check_Log_For_No_Updates [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 @@ -267,7 +269,9 @@ TC3_BGP_Peer2_Check_Log_For_No_Updates [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 diff --git a/csit/suites/bgpcep/pcepuser/pcepuser.robot b/csit/suites/bgpcep/pcepuser/pcepuser.robot index b7733a8205..fc78760f41 100644 --- a/csit/suites/bgpcep/pcepuser/pcepuser.robot +++ b/csit/suites/bgpcep/pcepuser/pcepuser.robot @@ -57,7 +57,6 @@ Update_Delegated [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. @@ -79,7 +78,6 @@ Add_Instantiated [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. @@ -90,7 +88,6 @@ Update_Instantiated [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. @@ -101,7 +98,6 @@ Remove_Instantiated [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. diff --git a/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot b/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot index 9f63ce94b8..8bb76d70ca 100644 --- a/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot +++ b/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot @@ -115,8 +115,7 @@ Topology_Intercondition_2 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 diff --git a/csit/variables/bgpfunctional/route_refresh/operational_cli/update.txt b/csit/variables/bgpfunctional/route_refresh/operational_cli/update.txt index c4153b81f1..b43d7402c6 100644 --- a/csit/variables/bgpfunctional/route_refresh/operational_cli/update.txt +++ b/csit/variables/bgpfunctional/route_refresh/operational_cli/update.txt @@ -2,7 +2,7 @@ Messages state $DIVIDER ====================== $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 diff --git a/csit/variables/bgpfunctional/route_refresh/operational_state/data.json b/csit/variables/bgpfunctional/route_refresh/operational_state/data.json index 45d9d4d5db..b392cb7ccd 100644 --- a/csit/variables/bgpfunctional/route_refresh/operational_state/data.json +++ b/csit/variables/bgpfunctional/route_refresh/operational_state/data.json @@ -3,11 +3,11 @@ "messages": { "received": { "NOTIFICATION": $NOT_COUNT, - "UPDATE": $UPD_COUNT + "UPDATE": $RECV_COUNT }, "sent": { "NOTIFICATION": 0, - "UPDATE": $RCV_COUNT + "UPDATE": $SEND_COUNT } }, "session-state": "ESTABLISHED", diff --git a/csit/variables/tcpmd5user/update_delegated/response.xml b/csit/variables/tcpmd5user/update_delegated/response.xml deleted file mode 100644 index 220ef12e03..0000000000 --- a/csit/variables/tcpmd5user/update_delegated/response.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/csit/variables/tcpmd5user/update_delegated_neon/location.uri b/csit/variables/tcpmd5user/update_delegated_neon/location.uri deleted file mode 100644 index 7193120a42..0000000000 --- a/csit/variables/tcpmd5user/update_delegated_neon/location.uri +++ /dev/null @@ -1 +0,0 @@ -restconf/operations/network-topology-pcep:update-lsp diff --git a/csit/variables/tcpmd5user/update_delegated_neon/post_data.xml b/csit/variables/tcpmd5user/update_delegated_neon/post_data.xml deleted file mode 100644 index ab64fca4ec..0000000000 --- a/csit/variables/tcpmd5user/update_delegated_neon/post_data.xml +++ /dev/null @@ -1,27 +0,0 @@ - - pcc://$IP - $NAME - - /topo:network-topology/topo:topology[topo:topology-id="pcep-topology"] - - - - true - true - - - - false - - 2.2.2.2/32 - - - - false - - 1.1.1.1/32 - - - - - diff --git a/csit/variables/tcpmd5user/update_delegated_neon/response.xml b/csit/variables/tcpmd5user/update_delegated_neon/response.xml deleted file mode 100644 index 241afaa0c2..0000000000 --- a/csit/variables/tcpmd5user/update_delegated_neon/response.xml +++ /dev/null @@ -1 +0,0 @@ - -- 2.36.6