Changes to support Redfish boot progress

Signed-off-by: Michael Shepos <shepos@us.ibm.com>
Change-Id: Icfe34896b5801f13a344b6a3983696796dc476cb
diff --git a/lib/boot_data.py b/lib/boot_data.py
index e644166..42af3f7 100755
--- a/lib/boot_data.py
+++ b/lib/boot_data.py
@@ -26,6 +26,9 @@
 # The code base directory will be one level up from the directory containing this module.
 code_base_dir_path = os.path.dirname(os.path.dirname(__file__)) + os.sep
 
+redfish_support_trans_state = int(os.environ.get('REDFISH_SUPPORT_TRANS_STATE', 0)) or \
+    int(BuiltIn().get_variable_value("${REDFISH_SUPPORT_TRANS_STATE}", default=0))
+
 
 def create_boot_table(file_path=None,
                       os_host=""):
@@ -47,7 +50,10 @@
                                     boot entries.
     """
     if file_path is None:
-        file_path = os.environ.get('BOOT_TABLE_PATH', 'data/boot_table.json')
+        if redfish_support_trans_state:
+            file_path = os.environ.get('BOOT_TABLE_PATH', 'data/boot_table_redfish.json')
+        else:
+            file_path = os.environ.get('BOOT_TABLE_PATH', 'data/boot_table.json')
 
     if not file_path.startswith("/"):
         file_path = code_base_dir_path + file_path