EOS information in teardowns 78/73978/4
authorVishal Thapar <vthapar@redhat.com>
Thu, 12 Jul 2018 12:15:30 +0000 (17:45 +0530)
committerVishal Thapar <vthapar@redhat.com>
Thu, 12 Jul 2018 14:46:30 +0000 (20:16 +0530)
Capture EOS information of different
entities in teardown logs

Change-Id: I0c3c5d3b419454156ca7c23c23a145cde89df870
Signed-off-by: Vishal Thapar <vthapar@redhat.com>
csit/libraries/ODLTools.robot
csit/libraries/OpenStackOperations.robot

index dc07700accbdf278848e4c4a2b67ba146d10434d..860fd30d134a59d1698e204d369af00d5e980353 100644 (file)
@@ -1,5 +1,6 @@
 *** Settings ***
 Documentation     Robot wrapper around ODLTools.
+Resource          ../variables/Variables.robot
 
 *** Keywords ***
 Version
@@ -9,3 +10,12 @@ Version
     BuiltIn.Log    rc: ${rc}, output: ${output}
     BuiltIn.Should Be True    '${rc}' == '0'
     [Return]    ${output}
+
+Get EOS
+    [Arguments]    ${node_ip}=${TOOLS_SYSTEM_IP}    ${port}=${RESTCONFPORT}
+    [Documentation]    Get the odltools version
+    ${cmd} =    BuiltIn.Set Variable    odltools show eos -i ${node_ip} -t ${port} -u ${ODL_RESTCONF_USER} -w ${ODL_RESTCONF_PASSWORD}
+    ${rc}    ${output} =    OperatingSystem.Run And Return Rc And Output    ${cmd}
+    BuiltIn.Log    rc: ${rc}, output: ${output}
+    BuiltIn.Should Be True    '${rc}' == '0'
+    [Return]    ${output}
index 00ae90f8fc1ffd80b14782dafcf76d547cddf821..1e482b40dccbac92b0c6ec24c1cd373caac79d75 100644 (file)
@@ -9,6 +9,7 @@ Resource          DataModels.robot
 Resource          DevstackUtils.robot
 Resource          KarafKeywords.robot
 Resource          L2GatewayOperations.robot
+Resource          ODLTools.robot
 Resource          OVSDB.robot
 Resource          SetupUtils.robot
 Resource          SSHKeywords.robot
@@ -551,6 +552,7 @@ Get Test Teardown Debugs
     [Arguments]    ${test_name}=${SUITE_NAME}.${TEST_NAME}
     OpenStackOperations.Get OvsDebugInfo
     BuiltIn.Run Keyword And Ignore Error    DataModels.Get Model Dump    ${HA_PROXY_IP}    ${netvirt_data_models}
+    BuiltIn.run Keyword And Ignore Error    ODLTools.Get EOS    ${HA_PROXY_IP}
     Run Keyword If    "${FAIL_ON_EXCEPTIONS}"=="True"    KarafKeywords.Fail If Exceptions Found During Test    ${test_name}
 
 Get Test Teardown Debugs For SFC