Fix duplicate keywords 20/111120/5
authorSangwook Ha <sangwook.ha@verizon.com>
Wed, 27 Mar 2024 20:48:20 +0000 (13:48 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Thu, 28 Mar 2024 00:04:19 +0000 (17:04 -0700)
The 'Read_Text_Before_Prompt' keyword in ebgp_peers_basic.robot is
unnecessary since it's already defined in BGPcliKeywords.robot.
Remove the duplicate keyword.

Also, use explicit resource name for the keywords imported from
BGPcliKeywords.robot to make it more consistent and add a missing
resource imported by BGPcliKeywords.robot.

Change-Id: I817a58b04e4adc9e9c2c86b6f14065aa44e88d52
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
csit/libraries/BGPcliKeywords.robot
csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot

index 8739d3426198e10d815a1c7ca262d7d28038f678..536b6bc06fc5683bf8ca884defc5a52fe5ce3e0c 100644 (file)
@@ -15,6 +15,7 @@ Documentation       Robot keyword library (Resource) for handling the BGP speake
 Library             SSHLibrary    timeout=10s
 Library             RequestsLibrary
 Resource            ../variables/Variables.robot
+Resource            BGPSpeaker.robot
 Resource            RemoteBash.robot
 Resource            NexusKeywords.robot
 
index 81a33bf23488a27c00d9d86073556369fa3c3061..64613570dba1a8d9a5dd48b1eb5bb7de5b7353b8 100644 (file)
@@ -145,16 +145,16 @@ Connect_iBGP_Peer1
     [Documentation]    Connect BGP peer
     [Tags]    critical
     SSHLibrary.Switch Connection    ibgp_peer1_console
-    Start_Console_Tool    ${iBGP_PEER1_COMMAND}    ${iBGP_PEER1_OPTIONS}
-    Read_And_Fail_If_Prompt_Is_Seen
+    BGPcliKeywords.Start_Console_Tool    ${iBGP_PEER1_COMMAND}    ${iBGP_PEER1_OPTIONS}
+    BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen
     BgpOperations.Check_Example_IPv4_Topology_Does_Not_Contain    ${CONFIG_SESSION}    prefix
 
 Connect_eBGP_Peer1
     [Documentation]    Connect BGP peer
     [Tags]    critical
     SSHLibrary.Switch Connection    ebgp_peer1_console
-    Start_Console_Tool    ${eBGP_PEER1_COMMAND}    ${eBGP_PEER1_OPTIONS}
-    Read_And_Fail_If_Prompt_Is_Seen
+    BGPcliKeywords.Start_Console_Tool    ${eBGP_PEER1_COMMAND}    ${eBGP_PEER1_OPTIONS}
+    BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen
 
 Check_IPv4_Topology_For_First_Path
     [Documentation]    The IPv4 topology shall contain the route announced by the first eBGP
@@ -195,8 +195,8 @@ Connect_eBGP_Peer2
     [Documentation]    Connect BGP peer and check empty topology
     [Tags]    critical
     SSHLibrary.Switch Connection    ebgp_peer2_console
-    Start_Console_Tool    ${eBGP_PEER2_COMMAND}    ${eBGP_PEER2_OPTIONS}
-    Read_And_Fail_If_Prompt_Is_Seen
+    BGPcliKeywords.Start_Console_Tool    ${eBGP_PEER2_COMMAND}    ${eBGP_PEER2_OPTIONS}
+    BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen
 
 Disconnect_eBGP_Peer1
     [Documentation]    Stop BGP peer, log topology and store logs
@@ -429,12 +429,6 @@ Setup_Everything
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background
     ...    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol
 
-Read_Text_Before_Prompt
-    [Documentation]    Log text gathered by SSHLibrary.Read_Until_Prompt.
-    ...    This needs to be a separate keyword just because how Read_And_Fail_If_Prompt_Is_Seen is implemented.
-    ${text}    SSHLibrary.Read_Until_Prompt
-    BuiltIn.Log    ${text}
-
 Store_File_To_Workspace
     [Documentation]    Store the ${source_file_name} to the workspace as ${target_file_name}.
     [Arguments]    ${source_file_name}    ${target_file_name}