Replace deprecated variables in csit/libraries (2).
[integration/test.git] / csit / libraries / SwitchUtils.robot
index e863f4c457988ea3799f0b9faaafba706c81cef3..902c07bd5374c18278f842286b1d8f4776657234 100644 (file)
@@ -22,14 +22,14 @@ Get Switch Datapath ID
 Verify Switch In Operational Data Store
     [Arguments]    ${switch}
     [Documentation]    Verifies the existence of the switch.datapath_id in the operational datastore.
-    ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
+    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
     Log    ${resp.content}
     Should Match Regexp    ${resp.content}    openflow:${switch.datapath_id}
 
 Verify Switch Not In Operational Data Store
     [Arguments]    ${switch}
     [Documentation]    Verifies that the given switch.datapath_id is not in the operational datastore.
-    ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
+    ${resp}    RequestsLibrary.Get Request    session    ${REST_CONTEXT}
     Log    ${resp.content}
     Should Not Match Regexp    ${resp.content}    openflow:${switch.datapath_id}
 
@@ -89,11 +89,11 @@ Open Connection Wrapper
     ...    switch.mgmt_protocol, the connection open will be handled by the right robot
     ...    library (Telnet or SSHLibrary). \ The connection_index is returned.
     Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    Call Method    ${switch}    set_ssh_key    ${USER_HOME}/.ssh/${SSH_KEY}
-    Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    Call Method    ${switch}    set_mgmt_user    ${MININET_USER}
+    Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    Call Method    ${switch}    set_mgmt_user    ${TOOLS_SYSTEM_USER}
     ${connection_index}=    Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    SSHLibrary.Open Connection    ${switch.mgmt_ip}    prompt=${switch.mgmt_prompt}    timeout=30s
     Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    Login With Public Key    ${switch.mgmt_user}    ${switch.ssh_key}    any
-    ${connection_index}=    Run Keyword If    "${switch.mgmt_protocol}" == "telnet"    Telnet.Open Connection    ${switch.mgmt_ip}    ELSE    Set Variable
-    ...    ${connection_index}
+    ${connection_index}=    Run Keyword If    "${switch.mgmt_protocol}" == "telnet"    Telnet.Open Connection    ${switch.mgmt_ip}
+    ...    ELSE    Set Variable    ${connection_index}
     [Return]    ${connection_index}
 
 Configure Connection Index And Prompt Wrapper
@@ -124,8 +124,8 @@ Execute Command Wrapper
     [Documentation]    Wraps the Execute Command keyword so that depending on the switch.mgmt_protocol the right
     ...    library (Telnet or SSHLibrary) is used.
     ${output}=    Run Keyword If    "${switch.mgmt_protocol}" == "ssh"    SSHLibrary.Execute Command    ${cmd}
-    ${output}=    Run Keyword If    "${switch.mgmt_protocol}" == "telnet"    Telnet.Execute Command    ${cmd}    ELSE    Set Variable
-    ...    ${output}
+    ${output}=    Run Keyword If    "${switch.mgmt_protocol}" == "telnet"    Telnet.Execute Command    ${cmd}
+    ...    ELSE    Set Variable    ${output}
     [Return]    ${output}
 
 Connect To Switch