Add new keyword 'Get OS Distro Release Info'.
Added:
Get OS Distro Release Info.
Tested:
Created a sample test and tested on BMC with OS.
Change-Id: I2d3a59d495ddd8075fc7801d9c47a0efd8debddf
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/lib/openbmc_ffdc_methods.robot b/lib/openbmc_ffdc_methods.robot
index 339bc8e..06b1a7e 100755
--- a/lib/openbmc_ffdc_methods.robot
+++ b/lib/openbmc_ffdc_methods.robot
@@ -736,3 +736,16 @@
${stdout} ${stderr} ${rc}= OS Execute Command uname ignore_err=${0}
[Return] ${stdout}
+
+
+Get OS Distro Release Info
+ [Documentation] Get the host partition release info.
+ ${stdout} ${stderr} ${rc}= OS Execute Command
+ ... cat /etc/os-release ignore_err=${1}
+
+ Return From Keyword If ${rc} == ${0} ${stdout}
+
+ # If linux distro doesn't have os-release, check for uname.
+ ${stdout} ${stderr} ${rc}= OS Execute Command uname ignore_err=${0}
+
+ [Return] ${stdout}