2 Documentation Robot wrapper around ODLTools.
3 Resource ../variables/Variables.robot
7 [Documentation] Get the odltools version
8 ${cmd} = BuiltIn.Set Variable odltools -V
9 ${rc} ${output} = OperatingSystem.Run And Return Rc And Output ${cmd}
10 BuiltIn.Log rc: ${rc}, output: ${output}
11 BuiltIn.Should Be True '${rc}' == '0'
15 [Arguments] ${node_ip}=${ODL_SYSTEM_IP} ${port}=${RESTCONFPORT} ${test_name}=${SUITE_NAME}.${TEST_NAME}
16 [Documentation] Get the various ODL entity ownership information
17 ${dstdir} = Get Path ${test_name}
18 ${cmd} = BuiltIn.Set Variable odltools show eos -i ${node_ip} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD} --path ${dstdir}
19 ${rc} ${output} = OperatingSystem.Run And Return Rc And Output ${cmd}
20 BuiltIn.Log rc: ${rc}, output: ${output}
21 BuiltIn.Should Be True '${rc}' == '0'
25 [Arguments] ${port}=${RESTCONFPORT}
26 [Documentation] Get ODL Cluster related information like transaction counts, commit rates, etc.
27 : FOR ${i} IN RANGE ${NUM_ODL_SYSTEM}
28 \ ${cmd} = BuiltIn.Set Variable odltools show cluster-info -i ${ODL_SYSTEM_${i+1}_IP} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD}
29 \ ${output} = OperatingSystem.Run ${cmd}
30 \ BuiltIn.Log output: ${output}
33 [Arguments] ${node_ip}=${ODL_SYSTEM_IP} ${port}=${RESTCONFPORT} ${test_name}=${SUITE_NAME}.${TEST_NAME}
34 [Documentation] Analyze Tunnel Mesh creation for any errors and log results
35 ${dstdir} = Get Path ${test_name}
36 ${cmd} = BuiltIn.Set Variable odltools analyze tunnels -i ${node_ip} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD} --path ${dstdir}
37 ${rc} ${output} = OperatingSystem.Run And Return Rc And Output ${cmd}
38 BuiltIn.Log rc: ${rc}, output: ${output}
39 BuiltIn.Should Be True '${rc}' == '0'
43 [Arguments] ${node_ip}=${ODL_SYSTEM_IP} ${port}=${RESTCONFPORT} ${test_name}=${SUITE_NAME}.${TEST_NAME}
44 [Documentation] Get all results provided by ODLTools
45 ODLTools.Get Cluster Info
46 BuiltIn.run Keyword And Ignore Error ODLTools.Get EOS ${node_ip} test_name=${test_name}
47 BuiltIn.run Keyword And Ignore Error ODLTools.Analyze Tunnels ${node_ip} test_name=${test_name}
50 [Arguments] ${test_name}=${SUITE_NAME}.${TEST_NAME}
51 [Documentation] Get odltools path for a given test case
52 ${tmpdir} = BuiltIn.Evaluate """${test_name}""".replace(" ","_").replace("/","_").replace(".","_")
53 [Return] /tmp/${tmpdir}