Field mode enable keyword

Changes:
   - Move existing test to code update library keyword.
   - Rename existing test name and call the new keyword.
   - Enable field mode in setup sequence__init__.robot for CT.

Resolves  openbmc/openbmc-test-automation#1133

Change-Id: Ida405818fb0c474247aa664bceab461d5b7b61ae
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/test_field_mode.robot b/extended/code_update/test_field_mode.robot
index e3efce4..044b124 100644
--- a/extended/code_update/test_field_mode.robot
+++ b/extended/code_update/test_field_mode.robot
@@ -5,6 +5,7 @@
 Resource            ../../lib/boot_utils.robot
 Resource            ../../lib/rest_client.robot
 Resource            ../../lib/openbmc_ffdc.robot
+Resource            ../../lib/code_update_utils.robot
 
 Suite Setup         Suite Setup Execution
 Suite Teardown      Suite Teardown Execution
@@ -13,9 +14,9 @@
 
 *** Test Cases ***
 
-Enable Field Mode And Verify Unmount
-    [Documentation]  Enable field mode and check that /usr/local is unmounted.
-    [Tags]  Enable_Field_Mode
+Verify Software Field Mode
+    [Documentation]  Verify software field mode is set.
+    [Tags]  Verify_Software_Field_Mode
 
     # After running, /xyz/openbmc_project/software should look like this:
     # /xyz/openbmc_project/software
@@ -35,10 +36,7 @@
     #     ]
     # }
 
-    ${args}=  Create Dictionary  data=${1}
-    Write Attribute  ${SOFTWARE_VERSION_URI}  FieldModeEnabled  data=${args}
-    Sleep  5s
-    BMC Execute Command  [ ! -d "/usr/local/share" ]
+    Enable Field Mode And Verify Unmount
 
 
 Attempt To Disable Field Mode Via REST And Veify
@@ -73,4 +71,4 @@
     BMC Execute Command  /sbin/fw_setenv fieldmode
     BMC Execute Command  /bin/systemctl unmask usr-local.mount
     OBMC Reboot (off)  quiet=${1}
-    BMC Execute Command  [ -d "/usr/local/share" ]
\ No newline at end of file
+    BMC Execute Command  [ -d "/usr/local/share" ]