X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FGenius.robot;h=7e499e6c33673a58cce1b948d3b7cb135a219db8;hb=70e7e92db781b5840a68491d497ddbb345d26403;hp=ccb3fc2db19ea3eba824cb7987cca8ee454c5e25;hpb=c08b0daa07b26e37c6981c0f1f61c241d7ed8bf3;p=integration%2Ftest.git diff --git a/csit/libraries/Genius.robot b/csit/libraries/Genius.robot index ccb3fc2db1..7e499e6c33 100644 --- a/csit/libraries/Genius.robot +++ b/csit/libraries/Genius.robot @@ -63,7 +63,7 @@ Start Suite Stop Suite [Documentation] stops all connections and deletes all the bridges available on OVS FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM} - SSHLibrary.Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] + SSHLibrary.Switch Connection ${TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] SSHLibrary.Execute Command sudo ovs-vsctl del-br ${Bridge} SSHLibrary.Execute Command sudo ovs-vsctl del-manager SSHLibrary.Write exit @@ -99,7 +99,7 @@ Set Json ... ELSE BuiltIn.Set Variable ${body} FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM} ${body} String.Replace String ${body} "dpn-id": 10${tool_system_index} "dpn-id": ${DPN_ID_LIST[${tool_system_index}]} - ${body} String.Replace String ${body} "ip-address": "${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}" "ip-address": "@{tools_ips}[${tool_system_index}]" + ${body} String.Replace String ${body} "ip-address": "${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}.${tool_system_index+2}" "ip-address": "${tools_ips}[${tool_system_index}]" END BuiltIn.Log ${body} [Return] ${body} # returns complete json that has been updated @@ -132,7 +132,7 @@ Genius Test Setup Genius Test Teardown [Arguments] ${data_models} ${test_name}=${SUITE_NAME}.${TEST_NAME} ${fail}=${FAIL_ON_EXCEPTIONS} FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM} - OVSDB.Get DumpFlows And Ovsconfig @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] ${Bridge} + OVSDB.Get DumpFlows And Ovsconfig ${TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] ${Bridge} END BuiltIn.Run Keyword And Ignore Error DataModels.Get Model Dump ${ODL_SYSTEM_IP} ${data_models} KarafKeywords.Fail If Exceptions Found During Test ${test_name} fail=${fail} @@ -185,7 +185,7 @@ Check Table0 Entry In a Dpn ${check} = Utils.Run Command On Remote System And Log ${tools_ip} sudo ovs-ofctl -OOpenFlow13 dump-flows ${bridgename} ${num_ports} = BuiltIn.Get Length ${port_numbers} FOR ${port_index} IN RANGE ${num_ports} - BuiltIn.Should Contain ${check} in_port=@{port_numbers}[${port_index}] + BuiltIn.Should Contain ${check} in_port=${port_numbers}[${port_index}] END Verify Tunnel Status As Up @@ -230,13 +230,13 @@ Get Tunnel ${resp} = BuiltIn.Run Keyword If '${config_api_type}' == '${EMPTY}' RequestsLibrary.Get Request session ${CONFIG_API}/itm-state:tunnel-list/internal-tunnel/${src}/${dst}/${type}/ ... ELSE RequestsLibrary.Get Request session ${CONFIG_API}/itm-state:dpn-teps-state/dpns-teps/${src}/remote-dpns/${dst}/ BuiltIn.Should Be Equal As Strings ${resp.status_code} ${RESP_CODE} - BuiltIn.Log ${resp.content} - ${respjson} = RequestsLibrary.To Json ${resp.content} pretty_print=True - ${json} = Utils.Json Parse From String ${resp.content} + BuiltIn.Log ${resp.text} + ${respjson} = RequestsLibrary.To Json ${resp.text} pretty_print=True + ${json} = Utils.Json Parse From String ${resp.text} 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} @@ -273,7 +273,7 @@ Verify Tunnel Monitoring Status Set Switch Configuration [Documentation] This keyword will set manager,controller,tap port,bridge on each OVS FOR ${tool_system_index} IN RANGE ${NUM_TOOLS_SYSTEM} - SSHLibrary.Switch Connection @{TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] + SSHLibrary.Switch Connection ${TOOLS_SYSTEM_ALL_CONN_IDS}[${tool_system_index}] SSHLibrary.Login With Public Key ${TOOLS_SYSTEM_USER} ${USER_HOME}/.ssh/${SSH_KEY} any SSHLibrary.Execute Command sudo ovs-vsctl add-br ${Bridge} SSHLibrary.Execute Command sudo ovs-vsctl set bridge ${Bridge} protocols=OpenFlow13