obmcutil: Add bootprogress option

Change-Id: I6deccd1210a528a92f429935b8a043b922cfbcf2
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
diff --git a/obmcutil b/obmcutil
index 9856c48..35a1752 100644
--- a/obmcutil
+++ b/obmcutil
@@ -3,7 +3,7 @@
 set -euo pipefail
 
 USAGE="Usage: obmcutil [-h]
-        {bmcstate,chassisstate,hoststate,state,status}"
+                {bmcstate,bootprogress,chassisstate,hoststate,state,status}"
 
 INTERFACE_ROOT=xyz.openbmc_project
 STATE_INTERFACE=$INTERFACE_ROOT.State
@@ -16,7 +16,7 @@
     echo "$USAGE"
     echo ""
     echo "positional arguments:"
-    echo "  {bmcstate,chassisstate,hoststate,state,status}"
+    echo "  {bmcstate,bootprogress,chassisstate,hoststate,state,status}"
     echo ""
     echo "optional arguments:"
     echo "  -h, --help          show this help message and exit"
@@ -64,6 +64,13 @@
                 handle_cmd $query
             done
             ;;
+        bootprogress)
+            OBJECT=$STATE_OBJECT/host0
+            SERVICE=$(mapper get-service $OBJECT)
+            INTERFACE=$STATE_INTERFACE.Boot.Progress
+            PROPERTY=BootProgress
+            state_query $SERVICE $OBJECT $INTERFACE $PROPERTY
+            ;;
         -h|--help)
             print_help
             ;;