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