Switch PrefixCounting to RFC8040
[integration/test.git] / csit / libraries / ODLTools.robot
index ebd26d1512637903c3bb35c60893c9df932c2d3c..de9c8d2436629f5a0265d324616f881527043869 100644 (file)
@@ -1,5 +1,6 @@
 *** Settings ***
 Documentation     Robot wrapper around ODLTools.
+Library           OperatingSystem
 Resource          ../variables/Variables.robot
 
 *** Keywords ***
@@ -15,7 +16,7 @@ Get EOS
     [Arguments]    ${node_ip}=${ODL_SYSTEM_IP}    ${port}=${RESTCONFPORT}    ${test_name}=${SUITE_NAME}.${TEST_NAME}
     [Documentation]    Get the various ODL entity ownership information
     ${dstdir} =    Get Path    ${test_name}
-    ${cmd} =    BuiltIn.Set Variable    odltools show eos -i ${node_ip} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD} --path ${dstdir}
+    ${cmd} =    BuiltIn.Set Variable    odltools netvirt show eos -i ${node_ip} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD} --path ${dstdir}
     ${rc}    ${output} =    OperatingSystem.Run And Return Rc And Output    ${cmd}
     BuiltIn.Log    rc: ${rc}, output: ${output}
     BuiltIn.Should Be True    '${rc}' == '0'
@@ -24,16 +25,17 @@ Get EOS
 Get Cluster Info
     [Arguments]    ${port}=${RESTCONFPORT}
     [Documentation]    Get ODL Cluster related information like transaction counts, commit rates, etc.
-    : FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
-    \    ${cmd} =    BuiltIn.Set Variable    odltools show cluster-info -i ${ODL_SYSTEM_${i+1}_IP} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD}
-    \    ${output} =    OperatingSystem.Run    ${cmd}
-    \    BuiltIn.Log    output: ${output}
+    FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
+        ${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}
+        ${output} =    OperatingSystem.Run    ${cmd}
+        BuiltIn.Log    output: ${output}
+    END
 
 Analyze Tunnels
     [Arguments]    ${node_ip}=${ODL_SYSTEM_IP}    ${port}=${RESTCONFPORT}    ${test_name}=${SUITE_NAME}.${TEST_NAME}
     [Documentation]    Analyze Tunnel Mesh creation for any errors and log results
     ${dstdir} =    Get Path    ${test_name}
-    ${cmd} =    BuiltIn.Set Variable    odltools analyze tunnels -i ${node_ip} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD} --path ${dstdir}
+    ${cmd} =    BuiltIn.Set Variable    odltools netvirt analyze tunnels -i ${node_ip} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD} --path ${dstdir}
     ${rc}    ${output} =    OperatingSystem.Run And Return Rc And Output    ${cmd}
     BuiltIn.Log    rc: ${rc}, output: ${output}
     BuiltIn.Should Be True    '${rc}' == '0'