Move repeated Keywords from BGP suites 37/56937/10
authorAndrej Kilvady <akilvady@cisco.com>
Fri, 12 May 2017 11:09:55 +0000 (13:09 +0200)
committerVratko Polák <vrpolak@cisco.com>
Mon, 15 May 2017 09:42:23 +0000 (09:42 +0000)
Change-Id: Ic72fcd017e62b46a5501ba31de8ed4307af6baa7
Signed-off-by: Andrej Kilvady <akilvady@cisco.com>
csit/libraries/BgpOperations.robot
csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot
csit/suites/bgpcep/bgpuser/ibgp_peer_lsp.robot
csit/suites/bgpcep/bgpuser/ibgp_peer_lsp_Be.robot
csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot

index bc51c8cd0dbb3f8e7a8ccd88890fdd753daadf25..cc632137b81875b26e9219920405bbd9dcb1cd7a 100644 (file)
@@ -183,3 +183,42 @@ Get External Tunnel Endpoint Configuration
     ${resp} =    RequestsLibrary.Get Request    session    ${CONFIG_API}/itm:dc-gateway-ip-list/dc-gateway-ip/${ip}/
     Log    ${resp.content}
     [Return]    ${resp.content}
+
+Teardown_Everything
+    [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
+    ...    Tear down imported Resources.
+    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
+    RequestsLibrary.Delete_All_Sessions
+    SSHLibrary.Close_All_Connections
+
+Check_Example_Bgp_Rib_Content
+    [Arguments]    ${substr}    ${error_message}=${JSONKEYSTR} not found, but expected.
+    [Documentation]    Check the example-bgp-rib content for string
+    ${response}=    RequestsLibrary.Get Request    operational    bgp-rib:bgp-rib/rib/example-bgp-rib
+    BuiltIn.Log    ${response.status_code}
+    BuiltIn.Log    ${response.text}
+    BuiltIn.Should_Contain    ${response.text}    ${substr}    ${error_message}    values=False
+
+Check_Example_Bgp_Rib_Does_Not_Contain
+    [Arguments]    ${substr}    ${error_message}=${JSONKEYSTR} found, but not expected.
+    [Documentation]    Check the example-bgp-rib does not contain the string
+    ${response}=    RequestsLibrary.Get Request    operational    bgp-rib:bgp-rib/rib/example-bgp-rib
+    BuiltIn.Log    ${response.status_code}
+    BuiltIn.Log    ${response.text}
+    BuiltIn.Should_Not_Contain    ${response.text}    ${substr}    ${error_message}    values=False
+
+Check_Example_IPv4_Topology_Content
+    [Arguments]    ${string_to_check}=${EMPTY}
+    [Documentation]    Check the example-ipv4-topology content for string
+    ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
+    BuiltIn.Log    ${response.status_code}
+    BuiltIn.Log    ${response.text}
+    BuiltIn.Should_Contain    ${response.text}    ${string_to_check}
+
+Check_Example_IPv4_Topology_Does_Not_Contain
+    [Arguments]    ${string_to_check}
+    [Documentation]    Check the example-ipv4-topology does not contain the string
+    ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
+    BuiltIn.Log    ${response.status_code}
+    BuiltIn.Log    ${response.text}
+    BuiltIn.Should_Not_Contain    ${response.text}    ${string_to_check}
index a6ecacc15e6712c4d1867e4d613e27cdcc1b7306..bca748e859bdbd3cfece870deb178ec6090c5d33 100644 (file)
@@ -17,7 +17,7 @@ Documentation     Basic tests for eBGP application peers.
 ...               TODO: Extend testsuite by tests dedicated to path selection algorithm
 ...               TODO: Choose keywords used by more than one test suite to be placed in a common place.
 Suite Setup       Setup_Everything
-Suite Teardown    Teardown_Everything
+Suite Teardown    BgpOperations.Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Test Teardown     FailFast.Start_Failing_Fast_If_This_Failed
 Library           Collections
@@ -26,6 +26,7 @@ Library           RequestsLibrary
 Variables         ${CURDIR}/../../../variables/Variables.py
 Variables         ${CURDIR}/../../../variables/bgpuser/variables.py    ${TOOLS_SYSTEM_IP}    ${ODL_STREAM}
 Resource          ${CURDIR}/../../../libraries/BGPcliKeywords.robot
+Resource          ${CURDIR}/../../../libraries/BgpOperations.robot
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
@@ -101,7 +102,7 @@ Connect_iBGP_Peer1
     SSHLibrary.Switch Connection    ibgp_peer1_console
     Start_Console_Tool    ${iBGP_PEER1_COMMAND}    ${iBGP_PEER1_OPTIONS}
     Read_And_Fail_If_Prompt_Is_Seen
-    Check_Example_IPv4_Topology_Does_Not_Contain    prefix
+    BgpOperations.Check_Example_IPv4_Topology_Does_Not_Contain    prefix
 
 Connect_eBGP_Peer1
     [Documentation]    Connect BGP peer
@@ -112,8 +113,8 @@ Connect_eBGP_Peer1
 
 Check_IPv4_Topology_For_First_Path
     [Documentation]    The IPv4 topology shall contain the route announced by the first eBGP
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    "node-id":"${eBGP_PEER1_NEXT_HOP}"
-    Check_Example_IPv4_Topology_Content    "prefix":"${eBGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Content    "node-id":"${eBGP_PEER1_NEXT_HOP}"
+    BgpOperations.Check_Example_IPv4_Topology_Content    "prefix":"${eBGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"
 
 iBGP_Check_Log_For_Introduced_Prefixes
     [Documentation]    Check incomming updates for introduced routes
@@ -142,8 +143,8 @@ Disconnect_eBGP_Peer1
 
 Check_IPv4_Topology_For_Second_Path
     [Documentation]    The IPv4 topology shall contain the route announced by the second eBGP now
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    "node-id":"${eBGP_PEER2_NEXT_HOP}"
-    Check_Example_IPv4_Topology_Content    "prefix":"${eBGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Content    "node-id":"${eBGP_PEER2_NEXT_HOP}"
+    BgpOperations.Check_Example_IPv4_Topology_Content    "prefix":"${eBGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"
 
 iBGP_Check_Log_For_Updated_Prefixes
     [Documentation]    Check incomming updates for updated routes
@@ -166,7 +167,7 @@ Disconnect_eBGP_Peer2
 
 Check_For_Empty_IPv4_Topology
     [Documentation]    The IPv4 topology shall be empty
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Does_Not_Contain    prefix
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Does_Not_Contain    prefix
     [Teardown]    Report_Failure_Due_To_Bug    4835
 
 iBGP_Check_Log_For_Withdrawn_Prefixes
@@ -215,35 +216,12 @@ Setup_Everything
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.bgpcep
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol
 
-Teardown_Everything
-    [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
-    ...    Tear down imported Resources.
-    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    RequestsLibrary.Delete_All_Sessions
-    SSHLibrary.Close_All_Connections
-
 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}
 
-Check_Example_IPv4_Topology_Content
-    [Arguments]    ${string_to_check}=${EMPTY}
-    [Documentation]    Check the example-ipv4-topology content for string
-    ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
-    BuiltIn.Log    ${response.status_code}
-    BuiltIn.Log    ${response.text}
-    BuiltIn.Should_Contain    ${response.text}    ${string_to_check}
-
-Check_Example_IPv4_Topology_Does_Not_Contain
-    [Arguments]    ${string_to_check}
-    [Documentation]    Check the example-ipv4-topology does not contain the string
-    ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
-    BuiltIn.Log    ${response.status_code}
-    BuiltIn.Log    ${response.text}
-    BuiltIn.Should_Not_Contain    ${response.text}    ${string_to_check}
-
 Store_File_To_Workspace
     [Arguments]    ${source_file_name}    ${target_file_name}
     [Documentation]    Store the ${source_file_name} to the workspace as ${target_file_name}.
index 62e9db79e044fe4091c83e8d95ee0e91d98ece59..b1bef4e7c9f08e968fa710a7615669e517fa868d 100644 (file)
@@ -11,7 +11,7 @@ Documentation     Basic tests for iBGP peers.
 ...               carrying LSP State Information in BGP as described in
 ...               http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03
 Suite Setup       Setup_Everything
-Suite Teardown    Teardown_Everything
+Suite Teardown    BgpOperations.Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
 Library           OperatingSystem
@@ -20,6 +20,7 @@ Library           DateTime
 Variables         ${CURDIR}/../../../variables/Variables.py
 Variables         ${CURDIR}/../../../variables/bgpuser/variables.py    ${TOOLS_SYSTEM_IP}    ${ODL_STREAM}
 Resource          ${CURDIR}/../../../libraries/BGPcliKeywords.robot
+Resource          ${CURDIR}/../../../libraries/BgpOperations.robot
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
@@ -61,7 +62,7 @@ TC1_Check_Example_Bgp_Rib_Is_Empty
     [Documentation]    Check RIB for none linkstate-routes
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer_console
-    Check_Example_Bgp_Rib_Does_Not_Contain    ${JSONKEYSTR}
+    BgpOperations.Check_Example_Bgp_Rib_Does_Not_Contain    ${JSONKEYSTR}
 
 TC1_Connect_BGP_Peer
     [Documentation]    Connect BGP peer with advertising the routes without mandatory params like LOC_PREF.
@@ -74,7 +75,7 @@ TC1_Check_Example_Bgp_Rib
     [Documentation]    Check RIB for not containig linkstate-route(s), because update messages were not good.
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer_console
-    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${DEFAULT_RIB_CHECK_TIMEOUT}    ${DEFAULT_RIB_CHECK_PERIOD}    Check_Example_Bgp_Rib_Does_Not_Contain    ${JSONKEYSTR}
+    WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout    ${DEFAULT_RIB_CHECK_TIMEOUT}    ${DEFAULT_RIB_CHECK_PERIOD}    BgpOperations.Check_Example_Bgp_Rib_Does_Not_Contain    ${JSONKEYSTR}
 
 TC1_Disconnect_BGP_Peer
     [Documentation]    Stop BGP peer & store logs
@@ -98,7 +99,7 @@ TC2_Check_Example_Bgp_Rib_Is_Empty
     [Documentation]    Check RIB for none linkstate-routes
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer_console
-    Check_Example_Bgp_Rib_Does_Not_Contain    ${JSONKEYSTR}
+    BgpOperations.Check_Example_Bgp_Rib_Does_Not_Contain    ${JSONKEYSTR}
 
 TC2_Connect_BGP_Peer
     [Documentation]    Connect BGP peer
@@ -111,7 +112,7 @@ TC2_Check_Example_Bgp_Rib
     [Documentation]    Check RIB for linkstate-route(s)
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer_console
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_RIB_CHECK_TIMEOUT}    ${DEFAULT_RIB_CHECK_PERIOD}    Check_Example_Bgp_Rib_Content    ${JSONKEYSTR}
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_RIB_CHECK_TIMEOUT}    ${DEFAULT_RIB_CHECK_PERIOD}    BgpOperations.Check_Example_Bgp_Rib_Content    ${JSONKEYSTR}
 
 TC2_Disconnect_BGP_Peer
     [Documentation]    Stop BGP peer & store logs
@@ -141,26 +142,3 @@ Setup_Everything
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_LOG_LEVEL}
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.bgpcep
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol
-
-Teardown_Everything
-    [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
-    ...    Tear down imported Resources.
-    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    RequestsLibrary.Delete_All_Sessions
-    SSHLibrary.Close_All_Connections
-
-Check_Example_Bgp_Rib_Content
-    [Arguments]    ${substr}    ${error_message}=${JSONKEYSTR} not found, but expected.
-    [Documentation]    Check the example-bgp-rib content for string
-    ${response}=    RequestsLibrary.Get Request    operational    bgp-rib:bgp-rib/rib/example-bgp-rib
-    BuiltIn.Log    ${response.status_code}
-    BuiltIn.Log    ${response.text}
-    BuiltIn.Should_Contain    ${response.text}    ${substr}    ${error_message}    values=False
-
-Check_Example_Bgp_Rib_Does_Not_Contain
-    [Arguments]    ${substr}    ${error_message}=${JSONKEYSTR} found, but not expected.
-    [Documentation]    Check the example-bgp-rib does not contain the string
-    ${response}=    RequestsLibrary.Get Request    operational    bgp-rib:bgp-rib/rib/example-bgp-rib
-    BuiltIn.Log    ${response.status_code}
-    BuiltIn.Log    ${response.text}
-    BuiltIn.Should_Not_Contain    ${response.text}    ${substr}    ${error_message}    values=False
index 20ab33b040ccce4460a79346f7fef030c5cb1502..40366de4731308d236d648424db19dbbb8c958ab 100644 (file)
@@ -11,7 +11,7 @@ Documentation     Basic tests for iBGP peers.
 ...               carrying LSP State Information in BGP as described in
 ...               http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03
 Suite Setup       Setup_Everything
-Suite Teardown    Teardown_Everything
+Suite Teardown    BgpOperations.Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
 Library           OperatingSystem
@@ -20,6 +20,7 @@ Library           DateTime
 Variables         ${CURDIR}/../../../variables/Variables.py
 Variables         ${CURDIR}/../../../variables/bgpuser/variables.py    ${TOOLS_SYSTEM_IP}    ${ODL_STREAM}
 Resource          ${CURDIR}/../../../libraries/BGPcliKeywords.robot
+Resource          ${CURDIR}/../../../libraries/BgpOperations.robot
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KarafKeywords.robot
@@ -60,7 +61,7 @@ TC1_Check_Example_Bgp_Rib_Is_Empty
     [Documentation]    Check RIB for none linkstate-routes
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer_console
-    Check_Example_Bgp_Rib_Does_Not_Contain    ${JSONKEYSTR}
+    BgpOperations.Check_Example_Bgp_Rib_Does_Not_Contain    ${JSONKEYSTR}
 
 TC1_Connect_BGP_Peer
     [Documentation]    Connect BGP peer with advertising the routes without mandatory params like LOC_PREF.
@@ -74,7 +75,7 @@ TC1_Check_Example_Bgp_Rib
     [Tags]    critical
     KarafKeywords.Log_Testcase_Start_To_Controller_Karaf
     SSHLibrary.Switch Connection    bgp_peer_console
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_RIB_CHECK_TIMEOUT}    ${DEFAULT_RIB_CHECK_PERIOD}    Check_Example_Bgp_Rib_Content    ${JSONKEYSTR}
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_RIB_CHECK_TIMEOUT}    ${DEFAULT_RIB_CHECK_PERIOD}    BgpOperations.Check_Example_Bgp_Rib_Content    ${JSONKEYSTR}
 
 TC1_Disconnect_BGP_Peer
     [Documentation]    Stop BGP peer & store logs
@@ -105,26 +106,3 @@ Setup_Everything
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_LOG_LEVEL}
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.bgpcep
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol
-
-Teardown_Everything
-    [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
-    ...    Tear down imported Resources.
-    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    RequestsLibrary.Delete_All_Sessions
-    SSHLibrary.Close_All_Connections
-
-Check_Example_Bgp_Rib_Content
-    [Arguments]    ${substr}    ${error_message}=${JSONKEYSTR} not found, but expected.
-    [Documentation]    Check the example-bgp-rib content for string
-    ${response}=    RequestsLibrary.Get Request    operational    bgp-rib:bgp-rib/rib/example-bgp-rib
-    BuiltIn.Log    ${response.status_code}
-    BuiltIn.Log    ${response.text}
-    BuiltIn.Should_Contain    ${response.text}    ${substr}    ${error_message}    values=False
-
-Check_Example_Bgp_Rib_Does_Not_Contain
-    [Arguments]    ${substr}    ${error_message}=${JSONKEYSTR} found, but not expected.
-    [Documentation]    Check the example-bgp-rib does not contain the string
-    ${response}=    RequestsLibrary.Get Request    operational    bgp-rib:bgp-rib/rib/example-bgp-rib
-    BuiltIn.Log    ${response.status_code}
-    BuiltIn.Log    ${response.text}
-    BuiltIn.Should_Not_Contain    ${response.text}    ${substr}    ${error_message}    values=False
index 631eba207770abbe0a3f098030de49455b1a3ecf..3cf7b7047573ccca566ac0c81865fa7dda1ef1e0 100644 (file)
@@ -25,7 +25,7 @@ Documentation     Basic tests for iBGP peers.
 ...               Bug 4791 - BGPSessionImpl: Failed to send message Update logged even all UPDATE mesages received by iBGP peer
 ...               Bug 4819 - No routes advertised to one of newly configured iBGP RR-client peer
 Suite Setup       Setup_Everything
-Suite Teardown    Teardown_Everything
+Suite Teardown    BgpOperations.Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
 Test Teardown     FailFast.Start_Failing_Fast_If_This_Failed
 Library           OperatingSystem
@@ -34,6 +34,7 @@ Library           DateTime
 Variables         ${CURDIR}/../../../variables/Variables.py
 Variables         ${CURDIR}/../../../variables/bgpuser/variables.py    ${TOOLS_SYSTEM_IP}    ${ODL_STREAM}
 Resource          ${CURDIR}/../../../libraries/BGPcliKeywords.robot
+Resource          ${CURDIR}/../../../libraries/BgpOperations.robot
 Resource          ${CURDIR}/../../../libraries/BGPSpeaker.robot
 Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KillPythonTool.robot
@@ -93,14 +94,14 @@ TC1_Connect_BGP_Peer1
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer1_console
     Start_Console_Tool    ${BGP_PEER1_COMMAND}    ${BGP_PEER1_OPTIONS}
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
 
 TC1_Connect_BGP_Peer2
     [Documentation]    Connect BGP peer
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer2_console
     Start_Console_Tool    ${BGP_PEER2_COMMAND}    ${BGP_PEER2_OPTIONS}
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
 
 TC1_BGP_Peer1_Check_Log_For_Introduced_Prefixes
     [Documentation]    Check incomming updates for new routes
@@ -143,7 +144,7 @@ TC1_Disconnect_BGP_Peer2
     Store_File_To_Workspace    ${BGP_PEER2_LOG_FILE}    tc1_${BGP_PEER2_LOG_FILE}
 
 TC_1_Check_for_Empty_IPv4_Topology
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Does_Not_Contain    prefix
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Does_Not_Contain    prefix
 
 TC1_Delete_BGP_Peers_Configuration
     [Documentation]    Delete all previously configured BGP peers.
@@ -170,14 +171,14 @@ TC2_Connect_BGP_Peer1
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer1_console
     Start_Console_Tool    ${BGP_PEER1_COMMAND}    ${BGP_PEER1_OPTIONS}
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
 
 TC2_Connect_BGP_Peer2
     [Documentation]    Connect BGP peer
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer2_console
     Start_Console_Tool    ${BGP_PEER2_COMMAND}    ${BGP_PEER2_OPTIONS}
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
 
 TC2_BGP_Peer1_Check_Log_For_Introduced_Prefixes
     [Documentation]    Check incomming updates for new routes
@@ -218,7 +219,7 @@ TC2_Disconnect_BGP_Peer2
     Store_File_To_Workspace    ${BGP_PEER2_LOG_FILE}    tc2_${BGP_PEER2_LOG_FILE}
 
 TC_2_Check_for_Empty_IPv4_Topology
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Does_Not_Contain    prefix
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Does_Not_Contain    prefix
 
 TC2_Delete_BGP_Peers_Configuration
     [Documentation]    Delete all previously configured BGP peers.
@@ -245,14 +246,14 @@ TC3_Connect_BGP_Peer1
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer1_console
     Start_Console_Tool    ${BGP_PEER1_COMMAND}    ${BGP_PEER1_OPTIONS}
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER1_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
 
 TC3_Connect_BGP_Peer2
     [Documentation]    Connect BGP peer
     [Tags]    critical
     SSHLibrary.Switch Connection    bgp_peer2_console
     Start_Console_Tool    ${BGP_PEER2_COMMAND}    ${BGP_PEER2_OPTIONS}
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Content    {"prefix":"${BGP_PEER2_FIRST_PREFIX_IP}/${PREFIX_LEN}"}
 
 TC3_BGP_Peer1_Check_Log_For_No_Updates
     [Documentation]    Check for no updates received by iBGP peer No. 1
@@ -282,7 +283,7 @@ TC3_Disconnect_BGP_Peer2
     Store_File_To_Workspace    ${BGP_PEER2_LOG_FILE}    tc3_${BGP_PEER2_LOG_FILE}
 
 TC_3_Check_for_Empty_IPv4_Topology
-    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    Check_Example_IPv4_Topology_Does_Not_Contain    prefix
+    BuiltIn.Wait_Until_Keyword_Succeeds    ${DEFAULT_TOPOLOGY_CHECK_TIMEOUT}    ${DEFAULT_TOPOLOGY_CHECK_PERIOD}    BgpOperations.Check_Example_IPv4_Topology_Does_Not_Contain    prefix
 
 TC3_Delete_BGP_Peers_Configuration
     [Documentation]    Delete all previously configured BGP peers.
@@ -311,26 +312,3 @@ Setup_Everything
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_LOG_LEVEL}
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.bgpcep
     KarafKeywords.Execute_Controller_Karaf_Command_On_Background    log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol
-
-Teardown_Everything
-    [Documentation]    Create and Log the diff between expected and actual responses, make sure Python tool was killed.
-    ...    Tear down imported Resources.
-    KillPythonTool.Search_And_Kill_Remote_Python    'play\.py'
-    RequestsLibrary.Delete_All_Sessions
-    SSHLibrary.Close_All_Connections
-
-Check_Example_IPv4_Topology_Content
-    [Arguments]    ${string_to_check}=${EMPTY}
-    [Documentation]    Check the example-ipv4-topology content for string
-    ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
-    BuiltIn.Log    ${response.status_code}
-    BuiltIn.Log    ${response.text}
-    BuiltIn.Should_Contain    ${response.text}    ${string_to_check}
-
-Check_Example_IPv4_Topology_Does_Not_Contain
-    [Arguments]    ${string_to_check}
-    [Documentation]    Check the example-ipv4-topology does not contain the string
-    ${response}=    RequestsLibrary.Get Request    operational    topology/example-ipv4-topology
-    BuiltIn.Log    ${response.status_code}
-    BuiltIn.Log    ${response.text}
-    BuiltIn.Should_Not_Contain    ${response.text}    ${string_to_check}