Prevent termination on OCC open/read/write errors

Instead of creating an elog and terminating, the code will now retry on
a Open/Read/Write failure and if it continues to fail, it will return a
CommFailure to the caller. Then the caller of can determine how to
handle (reset PM complex or ignore).
Normally all communication errors with the OCC should trigger an OCC
reset.

Change-Id: Ibf272270156edae565231ca429f15e8fca2f15bc
Signed-off-by: Chris Cain <cjcain@us.ibm.com>
diff --git a/powermode.cpp b/powermode.cpp
index 7db3565..ed17096 100644
--- a/powermode.cpp
+++ b/powermode.cpp
@@ -328,15 +328,11 @@
         }
         else
         {
-            if (status == CmdStatus::OPEN_FAILURE)
-            {
-                // OCC not active yet
-                status = CmdStatus::SUCCESS;
-            }
-            else
-            {
-                log<level::ERR>("PowerMode::sendModeChange: SET_MODE FAILED!");
-            }
+            log<level::ERR>(
+                fmt::format(
+                    "PowerMode::sendModeChange: SET_MODE FAILED with status={}",
+                    status)
+                    .c_str());
         }
     }
     else
@@ -573,16 +569,11 @@
     }
     else
     {
-        if (status == CmdStatus::OPEN_FAILURE)
-        {
-            // OCC not active yet
-            status = CmdStatus::SUCCESS;
-        }
-        else
-        {
-            log<level::ERR>(
-                "PowerMode::sendIpsData: SET_CFG_DATA[IPS] FAILED!");
-        }
+        log<level::ERR>(
+            fmt::format(
+                "PowerMode::sendIpsData: SET_CFG_DATA[IPS] with status={}",
+                status)
+                .c_str());
     }
 
     return status;