Replace 'Run Keyword Unless' 68/100368/3
authorSangwook Ha <sangwook.ha@verizon.com>
Sat, 2 Apr 2022 23:01:22 +0000 (16:01 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Sun, 3 Apr 2022 19:02:20 +0000 (12:02 -0700)
Builtin keyword 'Run Keyword Unless' has been deprecated since v5.0:
https://github.com/robotframework/robotframework/issues/4174

Replace it with 'Run Keyword If'.

Change-Id: Id721d6ebd8e1304d23242d1700b04087ea86217d
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
26 files changed:
csit/libraries/ClusterManagement.robot
csit/libraries/ClusterOpenFlow.robot
csit/libraries/ExaBgpLib.robot
csit/libraries/FlowLib.robot
csit/libraries/GUIKeywords.robot
csit/libraries/Genius.robot
csit/libraries/GoBgpLib.robot
csit/libraries/KarafKeywords.robot
csit/libraries/TemplatedRequests.robot
csit/libraries/controller/CsCommon.robot
csit/suites/bgpcep/bgpclustering/PrefixcountKeywords.robot
csit/suites/controller/singleton_service/global_rpc_freeze.robot
csit/suites/controller/singleton_service/global_rpc_isolate.robot
csit/suites/controller/singleton_service/global_rpc_kill.robot
csit/suites/groupbasedpolicy/GBP/3-node/gbp1/002_wait_flows.robot
csit/suites/groupbasedpolicy/GBP/3-node/gbp2-multitenant/002_wait_flows.robot
csit/suites/groupbasedpolicy/GBPSXP/ep_provider_renderer_part.robot
csit/suites/netconf/CRUD-ACTION/CRUD-ACTION.robot
csit/suites/netconf/CRUD/CRUD-RPC.robot
csit/suites/netconf/CRUD/CRUD.robot
csit/suites/netconf/clustering/CRUD.robot
csit/suites/netconf/clustering/bug8086.robot
csit/suites/netconf/clustering/entity-isolation-rejoin.robot
csit/suites/netconf/clustering/entity.robot
csit/suites/netconf/clustering/outages.robot
csit/suites/netconf/ready/netconfready.robot

index c58fb4c80c08522b35aedf6f22d555cc4a0e7fc5..4982cbb4a65c7316ce2252ce0e1489e16db384b3 100644 (file)
@@ -183,7 +183,7 @@ Verify_Shard_Leader_Elected
     ...    new leader is elected or should remained the same as ${old_leader}
     ${leader}    ${followers}=    Get_Leader_And_Followers_For_Shard    shard_name=${shard_name}    shard_type=${shard_type}    member_index_list=${member_index_list}    verify_restconf=${verify_restconf}
     BuiltIn.Run_Keyword_If    ${new_elected}    BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_leader}    ${leader}
-    BuiltIn.Run_Keyword_Unless    ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_leader}    ${leader}
+    BuiltIn.Run_Keyword_If    not ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_leader}    ${leader}
     BuiltIn.Return_From_Keyword    ${leader}    ${followers}
 
 Verify_Owner_And_Successors_For_Device
index 5c1176c319dec769117e63453af951c33fc513ac..d1dea64f2a0d988e51b1939bb519ae0d8f1e5bb7 100644 (file)
@@ -169,9 +169,9 @@ Check Linear Topology On Member
         Should Contain    ${resp.text}    "source-tp":"openflow:${switch}:2"
         Should Contain    ${resp.text}    "dest-tp":"openflow:${switch}:2"
         ${edge}    Evaluate    ${switch}==1 or ${switch}==${switches}
-        Run Keyword Unless    ${edge}    Should Contain    ${resp.text}    "tp-id":"openflow:${switch}:3"
-        Run Keyword Unless    ${edge}    Should Contain    ${resp.text}    "source-tp":"openflow:${switch}:3"
-        Run Keyword Unless    ${edge}    Should Contain    ${resp.text}    "dest-tp":"openflow:${switch}:3
+        Run Keyword If    not ${edge}    Should Contain    ${resp.text}    "tp-id":"openflow:${switch}:3"
+        Run Keyword If    not ${edge}    Should Contain    ${resp.text}    "source-tp":"openflow:${switch}:3"
+        Run Keyword If    not ${edge}    Should Contain    ${resp.text}    "dest-tp":"openflow:${switch}:3
     END
 
 Check No Switches On Member
index ef110c9ee5c58d7bdd0cde97bf022689321427f7..15167ddde668d83aac83ad2b0a7ea15b9680ec4c 100644 (file)
@@ -57,7 +57,7 @@ Start_ExaBgp_And_Verify_Connected
         Start_ExaBgp    ${cfg_file}
         ${status}    ${value}=    BuiltIn.Run_Keyword_And_Ignore_Error    BuiltIn.Wait_Until_Keyword_Succeeds    3x    3s
         ...    Verify_ExaBgps_Connection    ${session}    ${exabgp_ip}    connected=${True}
-        BuiltIn.Run_Keyword_Unless    "${status}" == "PASS"    Stop_ExaBgp
+        BuiltIn.Run_Keyword_If    "${status}" != "PASS"    Stop_ExaBgp
         BuiltIn.Return_From_Keyword_If    "${status}" == "PASS"
     END
     BuiltIn.Fail    Unable to connect ExaBgp to ODL
index 8e5f7e5cd26d60b8dad35901906265b8cffb214a..70b6e0270123cdfd9b7c5fc793892d50791b0775 100644 (file)
@@ -76,9 +76,9 @@ Check Linear Topology
         Should Contain    ${resp.text}    "source-tp":"openflow:${switch}:2"
         Should Contain    ${resp.text}    "dest-tp":"openflow:${switch}:2"
         ${edge}    Evaluate    ${switch}==1 or ${switch}==${switches}
-        Run Keyword Unless    ${edge}    Should Contain    ${resp.text}    "tp-id":"openflow:${switch}:3"
-        Run Keyword Unless    ${edge}    Should Contain    ${resp.text}    "source-tp":"openflow:${switch}:3"
-        Run Keyword Unless    ${edge}    Should Contain    ${resp.text}    "dest-tp":"openflow:${switch}:3"
+        Run Keyword If    not ${edge}    Should Contain    ${resp.text}    "tp-id":"openflow:${switch}:3"
+        Run Keyword If    not ${edge}    Should Contain    ${resp.text}    "source-tp":"openflow:${switch}:3"
+        Run Keyword If    not ${edge}    Should Contain    ${resp.text}    "dest-tp":"openflow:${switch}:3"
     END
 
 Check Flows Operational Datastore
index 8b36382113cf64ea86068f2a599e0052fd558004..ab33e8346d6588b6dc0c828ee9335279ba741580 100644 (file)
@@ -93,7 +93,7 @@ Open Virtual Display
     Process.Start Process    Xvfb    :${XVFB_PORT}    -ac    -screen    0    1280x1024x16
     ...    alias=xvfb
     ${display}=    OperatingSystem.Get Environment Variable    DISPLAY    ${EMPTY}
-    BuiltIn.Run Keyword Unless    "${display}"==":${XVFB_PORT}"    Set Display Port
+    BuiltIn.Run Keyword If    "${display}"!=":${XVFB_PORT}"    Set Display Port
 
 Close DLUX And Terminate XVFB Process If Running
     [Documentation]    Closes all browser instances and terminates Xvfb if the process is running.
@@ -110,7 +110,7 @@ Launch DLUX
     ...    3. Go to DLUX login URL and wait until the HTML page contains a specific element.
     ${status}=    BuiltIn.Run Keyword And Return Status    Run Keywords    Open Virtual Display
     ...    AND    Selenium2Library.Open Browser    ${LOGIN_URL}    ${BROWSER}
-    BuiltIn.Run Keyword Unless    ${status}    Open Headless Browser    ${LOGIN_URL}
+    BuiltIn.Run Keyword If    not ${status}    Open Headless Browser    ${LOGIN_URL}
     Selenium2Library.Wait Until Page Contains Element    css=div.container
 
 Open DLUX Login Page
@@ -163,7 +163,7 @@ Navigate To URL
     [Arguments]    ${url}
     [Documentation]    Goes to the defined URL provided in an argument.
     ${status}=    BuiltIn.Run Keyword And Return Status    Selenium2Library.Location Should Be    ${url}
-    BuiltIn.Run Keyword Unless    ${status}    Selenium2Library.Go To    ${url}
+    BuiltIn.Run Keyword If    not ${status}    Selenium2Library.Go To    ${url}
 
 Focus And Click Element
     [Arguments]    ${element}
index 6cc208d06ae65a51273ac36cfc80fbf095570d2d..7e499e6c33673a58cce1b948d3b7cb135a219db8 100644 (file)
@@ -236,7 +236,7 @@ Get Tunnel
     BuiltIn.Should Contain    ${resp.text}    ${dst}
     BuiltIn.Run Keyword If    '${config_api_type}' == '${EMPTY}'    BuiltIn.Should Contain    ${resp.text}    ${src}
     ${tunnel_interface_name} =    BuiltIn.Run Keyword If    "tunnel-interface-names" in "${json}"    Genius.Get Tunnel Interface Name    ${json["internal-tunnel"][0]}    tunnel-interface-names
-    ${tunnel_name_output}    ${tunnel_name} =    BuiltIn.Run Keyword Unless    '${config_api_type}' == '${EMPTY}'    BuiltIn.Should Match Regexp    ${resp.text}    "tunnel-name":"(tun[\\w\\d]+)"
+    ${tunnel_name_output}    ${tunnel_name} =    BuiltIn.Run Keyword If    '${config_api_type}' != '${EMPTY}'    BuiltIn.Should Match Regexp    ${resp.text}    "tunnel-name":"(tun[\\w\\d]+)"
     ${tunnel} =    BuiltIn.Set Variable If    '${config_api_type}' == '${EMPTY}'    ${tunnel_interface_name}    ${tunnel_name}
     [Return]    ${tunnel}
 
index 0b871da7ed073e03ff50a7bf9d2f045658bb7667..402d078394e39f06a810961c22b1eb0cc73dba9e 100644 (file)
@@ -54,7 +54,7 @@ Start_GoBgp_And_Verify_Connected
     Start_GoBgp    ${cfg_file}
     ${status}    ${value}=    BuiltIn.Run_Keyword_And_Ignore_Error    BuiltIn.Wait_Until_Keyword_Succeeds    ${connection_retries}x    15s
     ...    Verify_GoBgps_Connection    ${session}    ${gobgp_ip}    connected=${True}
-    BuiltIn.Run_Keyword_Unless    "${status}" == "PASS"    Stop_GoBgp
+    BuiltIn.Run_Keyword_If    "${status}" != "PASS"    Stop_GoBgp
     BuiltIn.Return_From_Keyword_If    "${status}" == "PASS"
 
 Verify_GoBgps_Connection
index 2480149297d3ffa4ed0cff0487eff0ffb4d6be6b..6e935f5eb96b44d67b64c89c24d2bbc9b997705a 100644 (file)
@@ -222,7 +222,7 @@ Log_Message_To_Controller_Karaf
     ${index_list} =    ClusterManagement.List_Indices_Or_All    given_list=${member_index_list}
     FOR    ${index}    IN    @{index_list}    # usually: 1, 2, 3.
         ${status}    ${output} =    BuiltIn.Run_Keyword_And_Ignore_Error    Execute_Controller_Karaf_Command_With_Retry_On_Background    log:log "ROBOT MESSAGE: ${message}"    member_index=${index}
-        BuiltIn.Run_Keyword_Unless    ${tolerate_failure} or "${status}" == "PASS"    BuiltIn.Fail    ${output}
+        BuiltIn.Run_Keyword_If    not ${tolerate_failure} and "${status}" != "PASS"    BuiltIn.Fail    ${output}
     END
 
 Log_Test_Suite_Start_To_Controller_Karaf
index 99a19b2332057d4d798c3708c983142698bf9d67..158b57f66ce30f5a4f0fc169830fe30153b6a6f2 100644 (file)
@@ -386,7 +386,7 @@ Get_From_Uri
     ${response} =    BuiltIn.Run_Keyword_If    """${http_timeout}""" == """${EMPTY}"""    RequestsLibrary.Get_Request    alias=${session}    uri=${uri}    headers=${accept}
     ...    ELSE    RequestsLibrary.Get_Request    alias=${session}    uri=${uri}    headers=${accept}    timeout=${http_timeout}
     Check_Status_Code    ${response}    log_response=${log_response}
-    BuiltIn.Run_Keyword_Unless    ${normalize_json}    BuiltIn.Return_From_Keyword    ${response.text}
+    BuiltIn.Run_Keyword_If    not ${normalize_json}    BuiltIn.Return_From_Keyword    ${response.text}
     ${text_normalized} =    norm_json.normalize_json_text    ${response.text}    jmes_path=${jmes_path}    keys_with_volatiles=${keys_with_volatiles}
     [Return]    ${text_normalized}
 
@@ -406,7 +406,7 @@ Put_To_Uri
     ...    ELSE    RequestsLibrary.Put_Request    alias=${session}    uri=${uri}    data=${data}    headers=${headers}
     ...    timeout=${http_timeout}
     Check_Status_Code    ${response}
-    BuiltIn.Run_Keyword_Unless    ${normalize_json}    BuiltIn.Return_From_Keyword    ${response.text}
+    BuiltIn.Run_Keyword_If    not ${normalize_json}    BuiltIn.Return_From_Keyword    ${response.text}
     ${text_normalized} =    norm_json.normalize_json_text    ${response.text}    jmes_path=${jmes_path}
     [Return]    ${text_normalized}
 
@@ -426,7 +426,7 @@ Post_To_Uri
     ...    ELSE    RequestsLibrary.Post_Request    alias=${session}    uri=${uri}    data=${data}    headers=${headers}
     ...    timeout=${http_timeout}
     Check_Status_Code    ${response}    additional_allowed_status_codes=${additional_allowed_status_codes}    explicit_status_codes=${explicit_status_codes}
-    BuiltIn.Run_Keyword_Unless    ${normalize_json}    BuiltIn.Return_From_Keyword    ${response.text}
+    BuiltIn.Run_Keyword_If    not ${normalize_json}    BuiltIn.Return_From_Keyword    ${response.text}
     ${text_normalized} =    norm_json.normalize_json_text    ${response.text}    jmes_path=${jmes_path}
     [Return]    ${text_normalized}
 
index 7baed66c48a914626c636c0bc25a240fe0af5ba8..1b3fb3ccbf802526681a985215aeb94eccb900bd 100644 (file)
@@ -102,7 +102,7 @@ Verify_Singleton_Constant_During_Isolation
     [Documentation]    Iterate over all non-isolated cluster nodes. They should return the correct constant.
     FOR    ${index}    IN    @{cs_all_indices}
         BuiltIn.Run_Keyword_If    "${index}" == "${cs_isolated_index}"    BuiltIn.Log    Node not triggered, behavior not well described, see bugs 8207, 8214.
-        BuiltIn.Run_Keyword_Unless    "${index}" == "${cs_isolated_index}"    Verify_Singleton_Constant_On_Node    ${index}    ${CS_CONSTANT_PREFIX}${cs_owner}
+        BuiltIn.Run_Keyword_If    "${index}" != "${cs_isolated_index}"    Verify_Singleton_Constant_On_Node    ${index}    ${CS_CONSTANT_PREFIX}${cs_owner}
     END
 
 Isolate_Owner_And_Verify_Isolated
index 5833d0c76bbebc8d4878840f5efc13e3f6e4e853..c7486d9022986a40d453056edc92c26dc31fe891 100644 (file)
@@ -107,7 +107,7 @@ Start_Bgp_Peer_And_Verify_Connected
         Start_Bgp_Peer    peerip=${peerip}
         ${status}    ${value}=    BuiltIn.Run_Keyword_And_Ignore_Error    BuiltIn.Wait_Until_Keyword_Succeeds    3x    3s
         ...    Verify_Bgp_Peer_Connection    ${config_session}    ${TOOLS_SYSTEM_IP}    connected=${True}
-        BuiltIn.Run_Keyword_Unless    "${status}" == "PASS"    BGPSpeaker.Kill_BGP_Speaker
+        BuiltIn.Run_Keyword_If    "${status}" != "PASS"    BGPSpeaker.Kill_BGP_Speaker
         BuiltIn.Return_From_Keyword_If    "${status}" == "PASS"
     END
     BuiltIn.Fail    Unable to connect bgp peer to ODL
index fab66354d0765b9b9230d7e4e92a85f679df1dce..a093d01790381c4f7b96442a264bfc3f2754a225 100644 (file)
@@ -101,7 +101,7 @@ Verify_Owner_Elected
     [Documentation]    Verify new owner was elected or remained the same.
     ${owner}    ${successors}=    Get_Present_Brt_Owner_And_Successors    ${node_to_ask}
     BuiltIn.Run_Keyword_If    ${new_elected}    BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
-    BuiltIn.Run_Keyword_Unless    ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    BuiltIn.Run_Keyword_If    not ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
 
 Get_Present_Brt_Owner_And_Successors
     [Arguments]    ${node_to_ask}    ${store}=${False}
index 9cde9346095dccf90531f7042cf18aa5eaa888ef..83a5b8593661303acfe7aa0dc99dcbf70d58a28f 100644 (file)
@@ -109,7 +109,7 @@ Verify_Owner_Elected
     [Documentation]    Verify new owner was elected or remained the same.
     ${owner}    ${successors}=    Get_Present_Brt_Owner_And_Successors    ${node_to_ask}
     BuiltIn.Run_Keyword_If    ${new_elected}    BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
-    BuiltIn.Run_Keyword_Unless    ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    BuiltIn.Run_Keyword_If    not ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
 
 Get_Present_Brt_Owner_And_Successors
     [Arguments]    ${node_to_ask}    ${store}=${False}
index 764fb6c2a88ba855e90d583e04442c7bd49017ce..04f83b43cfa6901f8223fde87320b15dd9f105ea 100644 (file)
@@ -104,7 +104,7 @@ Verify_Owner_Elected
     [Documentation]    Verify new owner was elected or remained the same.
     ${owner}    ${successors}=    Get_Present_Brt_Owner_And_Successors    ${node_to_ask}
     BuiltIn.Run_Keyword_If    ${new_elected}    BuiltIn.Should_Not_Be_Equal_As_Numbers    ${old_owner}    ${owner}
-    BuiltIn.Run_Keyword_Unless    ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
+    BuiltIn.Run_Keyword_If    not ${new_elected}    BuiltIn.Should_Be_Equal_As_numbers    ${old_owner}    ${owner}
 
 Get_Present_Brt_Owner_And_Successors
     [Arguments]    ${node_to_ask}    ${store}=${False}
index 292b5393997a6c82ec797bd12406c1a4e727b13d..5a0d48a3aa9da22df2a35e76eabb51ec4f7d1383 100644 (file)
@@ -14,8 +14,8 @@ ${timeout}        10s
 Wait For Flows
     Sleep    30s
     ${passed} =    Run Keyword And Return Status    OpenFlowUtils.Wait For Flows On Switch    ${GBP1}    sw1
-    Run Keyword Unless    ${passed}    Fatal Error    Flows not created on sw1!
+    Run Keyword If    not ${passed}    Fatal Error    Flows not created on sw1!
     ${passed} =    Run Keyword And Return Status    OpenFlowUtils.Wait For Flows On Switch    ${GBP2}    sw2
-    Run Keyword Unless    ${passed}    Fatal Error    Flows not created on sw2!
+    Run Keyword If    not ${passed}    Fatal Error    Flows not created on sw2!
     ${passed} =    Run Keyword And Return Status    OpenFlowUtils.Wait For Flows On Switch    ${GBP3}    sw3
-    Run Keyword Unless    ${passed}    Fatal Error    Flows not created on sw3!
+    Run Keyword If    not ${passed}    Fatal Error    Flows not created on sw3!
index 37019c603f3043fed4d35f2fb34c4386caf10a1b..e715817c06975f62d5f3a6c5cace1d0966751a5e 100644 (file)
@@ -14,8 +14,8 @@ ${timeout}        10s
 Wait For Flows
     Sleep    30s
     ${passed} =    Run Keyword And Return Status    OpenFlowUtils.Wait For Flows On Switch    ${GBP1}    sw1
-    Run Keyword Unless    ${passed}    Fatal Error    Flows not created on sw1!
+    Run Keyword If    not ${passed}    Fatal Error    Flows not created on sw1!
     ${passed} =    Run Keyword And Return Status    OpenFlowUtils.Wait For Flows On Switch    ${GBP2}    sw2
-    Run Keyword Unless    ${passed}    Fatal Error    Flows not created on sw2!
+    Run Keyword If    not ${passed}    Fatal Error    Flows not created on sw2!
     ${passed} =    Run Keyword And Return Status    OpenFlowUtils.Wait For Flows On Switch    ${GBP3}    sw3
-    Run Keyword Unless    ${passed}    Fatal Error    Flows not created on sw3!
+    Run Keyword If    not ${passed}    Fatal Error    Flows not created on sw3!
index da8ef1c5144c939431894911109f1798178b475c..91bb35b6be61971773814fbac246a3ae9c1b3551 100644 (file)
@@ -70,7 +70,7 @@ Setup_Http_And_Netconf
     BuiltIn.Run_Keyword_If    ${run_netconf_testtool_manually}    BuiltIn.Set_Suite_Variable    ${testtool_log}    ${logfile}
     FOR    ${ssh_session}    IN    @{TOOLS_SESSIONS}
         SSHKeywords.Restore_Current_Ssh_Connection_From_Index    ${ssh_session}
-        BuiltIn.Run_Keyword_Unless    ${run_netconf_testtool_manually}    Install_And_Start_Testtool    device-count=1    debug=false    schemas=${IOS_XE_SCHEMAS_FOLDER}
+        BuiltIn.Run_Keyword_If    not ${run_netconf_testtool_manually}    Install_And_Start_Testtool    device-count=1    debug=false    schemas=${IOS_XE_SCHEMAS_FOLDER}
         ...    mdsal=true
     END
 
index 308e284e000887cb4b6d23ce8482f09608eae76d..7685e922b6cad3fb1aeee315893fc8efdad62056 100644 (file)
@@ -127,5 +127,5 @@ Get_Config_Data
 Check_Config_Data
     [Arguments]    ${expected}    ${contains}=False
     ${data} =    Get_Config_Data
-    BuiltIn.Run_Keyword_Unless    ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
+    BuiltIn.Run_Keyword_If    not ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
     BuiltIn.Run_Keyword_If    ${contains}    BuiltIn.Should_Contain    ${data}    ${expected}
index 1830a0a95de28a4fd75425a0ad0f5a3c3ae8c8ef..301488e43d8b7ea895b518bfb47c53c763bec767 100644 (file)
@@ -249,5 +249,5 @@ Get_Config_Data
 Check_Config_Data
     [Arguments]    ${expected}    ${contains}=False
     ${data}=    Get_Config_Data
-    BuiltIn.Run_Keyword_Unless    ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
+    BuiltIn.Run_Keyword_If    not ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
     BuiltIn.Run_Keyword_If    ${contains}    BuiltIn.Should_Contain    ${data}    ${expected}
index 4551ec10059d944fb4dbbdb84c9b250e0c98c8a5..cfce99977302a0bc13bf892ee8a5f8a67e99cfd5 100644 (file)
@@ -241,7 +241,7 @@ Get_Config_Data
 Check_Config_Data
     [Arguments]    ${expected}    ${contains}=False
     ${data}=    Get_Config_Data
-    BuiltIn.Run_Keyword_Unless    ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
+    BuiltIn.Run_Keyword_If    not ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
     BuiltIn.Run_Keyword_If    ${contains}    BuiltIn.Should_Contain    ${data}    ${expected}
 
 Count_Netconf_Connectors
index 5cf95e0d15ab9c6e2a0f6933cb333616c1f01d6c..3ba359058aaeffef932d7948b84e5f5454e3c6b1 100644 (file)
@@ -211,5 +211,5 @@ Check_Config_Data
     [Arguments]    ${node}    ${expected}    ${contains}=False
     ${url}=    Builtin.Set_Variable    ${REST_API}/network-topology:network-topology/topology=topology-netconf/node=${DEVICE_NAME}/yang-ext:mount?content=config
     ${data}=    TemplatedRequests.Get_As_Xml_From_Uri    ${url}    session=${node}
-    BuiltIn.Run_Keyword_Unless    ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
+    BuiltIn.Run_Keyword_If    not ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
     BuiltIn.Run_Keyword_If    ${contains}    BuiltIn.Should_Contain    ${data}    ${expected}
index 6f3ccc6af5347d2c18a15134dd8cd391556d5360..50285e84d8b230383253bea082c3ae094131289a 100644 (file)
@@ -202,7 +202,7 @@ Check_Config_Data
     [Documentation]    Get device data from ${node}. Match against ${expected}, strictness given by ${contains}.
     ${url}=    Builtin.Set_Variable    ${REST_API}/network-topology:network-topology/topology=topology-netconf/node=${DEVICE_NAME}/yang-ext:mount?content=config
     ${data}=    TemplatedRequests.Get_As_Xml_From_Uri    ${url}    session=${node}
-    BuiltIn.Run_Keyword_Unless    ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
+    BuiltIn.Run_Keyword_If    not ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
     BuiltIn.Run_Keyword_If    ${contains}    BuiltIn.Should_Contain    ${data}    ${expected}
 
 Populate_Schema_Directory_Over_Active_Connection
index 5f84bc7a9816cb1050a11adfaecc8225b8291591..db4265aeb54a88138e17c84a0e70c9074de5e226 100644 (file)
@@ -194,7 +194,7 @@ Check_Config_Data
     ...    CRUD).
     ${url}=    Builtin.Set_Variable    ${REST_API}/network-topology:network-topology/topology=topology-netconf/node=${DEVICE_NAME}/yang-ext:mount?content=config
     ${data}=    TemplatedRequests.Get_As_Xml_From_Uri    ${url}    session=${session}
-    BuiltIn.Run_Keyword_Unless    ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
+    BuiltIn.Run_Keyword_If    not ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
     BuiltIn.Run_Keyword_If    ${contains}    BuiltIn.Should_Contain    ${data}    ${expected}
 
 Check_Owner_Reconfigured
index e101345d7bd1ba86236ad13e363894a0a15c2cd9..71fdb0b4a79d54670ea2bbbbf37811c5b8271eb0 100644 (file)
@@ -198,7 +198,7 @@ Check_Config_Data
     ...    CRUD).
     ${url}=    Builtin.Set_Variable    ${REST_API}/network-topology:network-topology/topology=topology-netconf/node=${DEVICE_NAME}/yang-ext:mount?content=config
     ${data}=    TemplatedRequests.Get_As_Xml_From_Uri    ${url}    session=${session}
-    BuiltIn.Run_Keyword_Unless    ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
+    BuiltIn.Run_Keyword_If    not ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
     BuiltIn.Run_Keyword_If    ${contains}    BuiltIn.Should_Contain    ${data}    ${expected}
 
 Check_Owner_Reconfigured
index 9c6a000d425f6923eb4a518b4dfa27c1aa278252..21315dbd8ef867ae52cbefa38c97382c805b517e 100644 (file)
@@ -228,5 +228,5 @@ Check_Config_Data
     [Documentation]    Check that the specified session sees the specified data in the test tool device.
     ${url}=    Builtin.Set_Variable    ${REST_API}/network-topology:network-topology/topology=topology-netconf/node=${DEVICE_NAME}/yang-ext:mount?content=config
     ${data}=    TemplatedRequests.Get_As_Xml_From_Uri    ${url}    session=${node}
-    BuiltIn.Run_Keyword_Unless    ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
+    BuiltIn.Run_Keyword_If    not ${contains}    BuiltIn.Should_Be_Equal_As_Strings    ${data}    ${expected}
     BuiltIn.Run_Keyword_If    ${contains}    BuiltIn.Should_Contain    ${data}    ${expected}
index 15bdeebe11659fa6089bfe7af0e0d15b51a68ff1..89565b77f3a8f3a914d77273ea48d6a3c72e9979 100644 (file)
@@ -92,7 +92,7 @@ Check_Whether_Netconf_Connector_Is_Up_And_Running
 Wait_For_Netconf_Connector
     [Documentation]    Wait for the Netconf to go up for configurable time.
     [Tags]    critical
-    BuiltIn.Run_Keyword_Unless    ${netconf_is_ready}    BuiltIn.Wait_Until_Keyword_Succeeds    ${NETCONFREADY_WAIT}    1s    Check_Netconf_Up_And_Running
+    BuiltIn.Run_Keyword_If    not ${netconf_is_ready}    BuiltIn.Wait_Until_Keyword_Succeeds    ${NETCONFREADY_WAIT}    1s    Check_Netconf_Up_And_Running
     BuiltIn.Set_Suite_Variable    ${netconf_is_ready}    True
 
 Wait_Even_Longer
@@ -119,7 +119,7 @@ Check_For_Bug_5014
 Check_Whether_Netconf_Can_Pretty_Print
     [Documentation]    Make one request to netconf-connector and see if it works.
     [Tags]    critical
-    BuiltIn.Run_Keyword_Unless    ${netconf_is_ready}    Fail    Netconf is not ready so it can't pretty-print now.
+    BuiltIn.Run_Keyword_If    not ${netconf_is_ready}    Fail    Netconf is not ready so it can't pretty-print now.
     Check_Netconf_Up_And_Running    ?odl-pretty-print=true
 
 Wait_For_MDSAL