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