${DEFAULT_TRANSPORT_ZONE} default-transport-zone
${SET_LOCAL_IP} sudo ovs-vsctl set O . other_config:local_ip=
${REMOVE_LOCAL_IP} sudo ovs-vsctl remove O . other_config local_ip
-${odl_stream_check } &{Stream_dict}[${ODL_STREAM}] <= &{Stream_dict}[neon]
+${odl_stream_check } ${Stream_dict}[${ODL_STREAM}] <= ${Stream_dict}[neon]
*** Keywords ***
Genius Suite Setup
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
... 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
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}
${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
${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.Should Contain ${resp.content} ${dst}
- BuiltIn.Run Keyword If '${config_api_type}' == '${EMPTY}' BuiltIn.Should Contain ${resp.content} ${src}
+ 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.content} "tunnel-name":"(tun[\\w\\d]+)"
+ ${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} = BuiltIn.Set Variable If '${config_api_type}' == '${EMPTY}' ${tunnel_interface_name} ${tunnel_name}
[Return] ${tunnel}
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