PEL: Add API to get PEL data from BMC.

Changes:
       Add new function get_pel_data_from_bmc()

Tested:
      Created a unit testcase to verify the function.

Change-Id: Id767e6ce627fc9c3be9305c884b085d98e5cfd5c
Signed-off-by: Sridevi Ramesh <sridevra@in.ibm.com>
diff --git a/lib/pel_utils.py b/lib/pel_utils.py
index 69039b8..7c62074 100644
--- a/lib/pel_utils.py
+++ b/lib/pel_utils.py
@@ -65,6 +65,19 @@
     return out_buf
 
 
+def get_pel_data_from_bmc():
+    r"""
+    Returns PEL data from BMC else throws exception.
+    """
+    try:
+        pel_data = peltool(" -l")
+        if not pel_data:
+            print("No PEL data present in BMC ...")
+    except Exception as e:
+        raise peltool_exception("Failed to get PEL data from BMC : " + str(e))
+    return pel_data
+
+
 def fetch_all_pel_ids_for_src(src_id, severity):
     r"""
     Fetch all PEL IDs for the input SRC ID based on the severity type