Move IPMI disable persistence test in new suite.

Resolves  openbmc/openbmc-test-automation#1479

Change-Id: I1081b976b260dc43b1800356a83082a983b72b40
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/extended/code_update/bmc_code_update.robot b/extended/code_update/bmc_code_update.robot
index f747cd4..c4fe9e1 100644
--- a/extended/code_update/bmc_code_update.robot
+++ b/extended/code_update/bmc_code_update.robot
@@ -13,7 +13,6 @@
 Resource          ../../lib/code_update_utils.robot
 Resource          ../../lib/openbmc_ffdc.robot
 Resource          ../../lib/dump_utils.robot
-Resource          ../../lib/ipmi_client.robot
 Resource          ../../lib/certificate_utils.robot
 
 Suite Setup       Suite Setup Execution
@@ -179,25 +178,6 @@
     Should Not Contain  ${software_ids}  ${version_id}
 
 
-Verify IPMI Disable Policy Post BMC Code Update
-    [Documentation]  Disable IPMI, update BMC and verify post-update.
-    [Tags]  Verify_IPMI_Disable_Policy_Post_BMC_Code_Update
-
-    REST Power On
-
-    Run Inband IPMI Standard Command  lan set 1 access off
-    Run Keyword and Expect Error  *Unable to establish IPMI*
-    ...  Run External IPMI Standard Command  lan print
-
-    Upload And Activate Image  ${IMAGE_FILE_PATH}
-    ...  skip_if_active=${SKIP_UPDATE_IF_ACTIVE}
-    OBMC Reboot (off)
-    Verify Running BMC Image  ${IMAGE_FILE_PATH}
-
-    Run Keyword and Expect Error  *Unable to establish IPMI*
-    ...  Run External IPMI Standard Command  lan print
-
-
 Test Certificate Persistency After BMC Code Update
     [Documentation]  Test certificate persistency after BMC update.
     [Tags]  Test_Certificate_Persistency_After_BMC_Code_Update
diff --git a/extended/code_update/ipmi_bmc_code_update.robot b/extended/code_update/ipmi_bmc_code_update.robot
new file mode 100644
index 0000000..7fe7c9f
--- /dev/null
+++ b/extended/code_update/ipmi_bmc_code_update.robot
@@ -0,0 +1,51 @@
+*** Settings ***
+Documentation     Test BMC code update on a target BMC.
+...               Execution Command:
+...               python -m robot -v OPENBMC_HOST:<hostname>
+...               -v IMAGE_FILE_PATH:<path/*.tar>  bmc_code_update.robot
+
+Resource          ../../lib/code_update_utils.robot
+Resource          ../../lib/ipmi_client.robot
+
+Suite Setup       Suite Setup Execution
+
+
+*** Variables ***
+
+${IMAGE_FILE_PATH}                ${EMPTY}
+${SKIP_UPDATE_IF_ACTIVE}          false
+
+
+*** Test Cases ***
+
+Verify IPMI Disable Policy Post BMC Code Update
+    [Documentation]  Disable IPMI, update BMC and verify post-update.
+    [Tags]  Verify_IPMI_Disable_Policy_Post_BMC_Code_Update
+    [Teardown]  Run Keywords  FFDC On Test Case Fail
+    ...  AND  Run Inband IPMI Standard Command  lan set 1 access on
+
+    Run Inband IPMI Standard Command  lan set 1 access off
+    Run Keyword and Expect Error  *Unable to establish IPMI*
+    ...  Run External IPMI Standard Command  lan print
+
+    Upload And Activate Image  ${IMAGE_FILE_PATH}
+    ...  skip_if_active=${SKIP_UPDATE_IF_ACTIVE}
+    OBMC Reboot (off)
+    Verify Running BMC Image  ${IMAGE_FILE_PATH}
+
+    Run Keyword and Expect Error  *Unable to establish IPMI*
+    ...  Run External IPMI Standard Command  lan print
+
+
+*** Keywords ***
+
+Suite Setup Execution
+    [Documentation]  Do code update test case setup.
+
+    # Check if image file is provided.
+    OperatingSystem.File Should Exist  ${IMAGE_FILE_PATH}
+
+    # - Clean up all existing BMC dumps.
+    Run Key  Delete All Dumps  ignore=1
+    Run Keyword And Ignore Error  Smart Power Off
+