Network Diagnostic report

This is a network traffic report from mtr host to a BMC host.
Eventually we could mould this into a test. This tool requires
root access to execute.

Resolves openbmc/openbmc-test-automation#295

Change-Id: I47a35435116816a4dbe0b5b9755e8af1c2853222
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/network_diagnostic_report.robot b/extended/network_diagnostic_report.robot
new file mode 100644
index 0000000..0c8014a
--- /dev/null
+++ b/extended/network_diagnostic_report.robot
@@ -0,0 +1,31 @@
+*** Settings ***
+Documentation  Network diagnostic tool report and logs to console
+...            for information. For more information 'man mtr'.
+
+Library       OperatingSystem
+Library       ../lib/utilities.py
+Resource      ../lib/utils.robot
+Test Setup    Check If Tool Exist
+
+*** Test Cases ***
+
+Check Network Latency
+    [Documentation]  Check network connection between host MTR and BMC host.
+    [Tags]  Check_Network_Latency
+
+    Ping Host  ${OPENBMC_HOST}
+    Repeat Keyword  3 times  Log Network Loss
+
+*** Keywords ***
+
+Log Network Loss
+    [Documentation]  Log Network packets loss percentage from MTR report.
+    ${report}=  Get MTR Row  ${OPENBMC_HOST}
+    Log To Console  \n Network packets loss: ${report['loss']} percent
+    Sleep  3s
+
+Check If Tool Exist
+    [Documentation]  Check if mtr tool exists.
+
+    ${bin_path}=  Run  which mtr
+    Should Contain  ${bin_path}  mtr  msg=mtr tool is not installed.