adding voltha/onos status checks during test teardown.

depends on GERRIT #13113

Change-Id: If4cdeb61ddf60d1641a5f2ce3ff488d35eb8556f
diff --git a/src/test/cord-api/Framework/OLT.robot b/src/test/cord-api/Framework/OLT.robot
index bb397bc..bf7e169 100644
--- a/src/test/cord-api/Framework/OLT.robot
+++ b/src/test/cord-api/Framework/OLT.robot
@@ -44,3 +44,39 @@
     ${operational_status}    ${admin_status}    OLT Status Check    ${olt_device}
     Should Be Equal    ${operational_status}    ${expected_op_status}
     Should Be Equal    ${admin_status}    ${expected_admin_status}
+
+Get VOLTHA Status
+    ${resp}=    CORD Get    ${VOLT_DEVICE}
+    ${jsondata}=    To Json    ${resp.content}
+    Log    ${jsondata}
+    ${length}=    Get Length    ${jsondata['items']}
+    : FOR    ${INDEX}    IN RANGE    0    ${length}
+    \    ${value}=    Get From List    ${jsondata['items']}    ${INDEX}
+    \    ${olt_device_id}=    Get From Dictionary    ${value}    device_id
+    \    ${logical_device_id}=    Get From Dictionary    ${value}    of_id
+    Set Suite Variable    ${olt_device_id}
+    Set Suite Variable    ${logical_device_id}
+    testCaseUtils.send_command_to_voltha_cli    /tmp    logical_devices.log    logical_device ${logical_device_id}    voltha_logical_ports.log    ports    voltha_logical_flows.log    flow    host=${server_ip}
+    testCaseUtils.send_command_to_voltha_cli    /tmp    devices.log    device ${olt_device_id}    voltha_olt_ports.log    ports    voltha_olt_flows.log    flows    host=${server_ip}
+    ${devices}=    Get Binary File    /tmp/voltha_olt_flows.log
+    ${device_ports}=    Get Binary File    /tmp/voltha_olt_ports.log
+    ${logical_devices}=    Get Binary File    /tmp/voltha_logical_flows.log
+    ${l_device_ports}=    Get Binary File    /tmp/voltha_logical_ports.log
+    Log    ${devices}
+    Log    ${device_ports}
+    Log    ${logical_devices}
+    Log    ${l_device_ports}
+
+Get ONOS Status
+    testCaseUtils.send_command_to_onos_cli    /tmp    onos_apps.log    apps -a -s    host=${server_ip}
+    ${onos_apps}    Get Binary File    /tmp/onos_apps.log
+    testCaseUtils.send_command_to_onos_cli    /tmp    onos_devices.log    devices    host=${server_ip}
+    ${onos_devices}    Get Binary File    /tmp/onos_devices.log
+    testCaseUtils.send_command_to_onos_cli    /tmp    onos_ports.log    ports -e    host=${server_ip}
+    ${onos_ports}    Get Binary File    /tmp/onos_ports.log
+    testCaseUtils.send_command_to_onos_cli    /tmp    onos_flows.log    flows -s    host=${server_ip}
+    ${onos_flows}    Get Binary File    /tmp/onos_flows.log
+    Log    ${onos_apps}
+    Log    ${onos_devices}
+    Log    ${onos_ports}
+    Log    ${onos_flows}
diff --git a/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.robot b/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.robot
index 78d33a7..d167962 100644
--- a/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.robot
+++ b/src/test/cord-api/Tests/WorkflowValidations/ATT_Test001.robot
@@ -23,6 +23,7 @@
 Library           OperatingSystem
 Library           XML
 Library           RequestsLibrary
+#Library           ~/voltha/tests/atests/common/testCaseUtils.py
 Library           ../../Framework/utils/utils.py
 Resource          ../../Framework/utils/utils.robot
 Library           ../../Framework/restApi.py
@@ -376,6 +377,8 @@
 
 Teardown Test
     [Documentation]    Delete xos objects, kills processes and cleans up interfaces on src+dst servers
+    #Get VOLTHA Status
+    #Get ONOS Status
     Clean Up Linux
     Clean Up XOS
     Log Kubernetes Containers Logs Since Time    ${datetime}    ${container_list}