Fix conflict 'SSHLibrary.Execute Command' or 'Telnet.Execute Command'

Code update utils imports oem serial connection causing conflict.
Fix is to split into different resource keywords file to stop
further dependencies.

Resolves  openbmc/openbmc-test-automation#1088

Change-Id: Id28adc9c1cfb7821d20b427467683404ad0f8741
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/bmc_recoverable_error_test.robot b/extended/code_update/bmc_recoverable_error_test.robot
index 3803c26..f6bc980 100644
--- a/extended/code_update/bmc_recoverable_error_test.robot
+++ b/extended/code_update/bmc_recoverable_error_test.robot
@@ -2,7 +2,7 @@
 Documentation   Test errors and changes in the environment that BMC code
 ...             update should recover from or not be effected by.
 
-Resource        ../../lib/code_update_utils.robot
+Resource        ../../lib/code_update_utils_serial.robot
 Resource        ../../lib/openbmc_ffdc.robot
 
 Suite Setup     Suite Setup Execution
diff --git a/extended/code_update/host_recoverable_error_test.robot b/extended/code_update/host_recoverable_error_test.robot
index 029e5ad..cdb2990 100644
--- a/extended/code_update/host_recoverable_error_test.robot
+++ b/extended/code_update/host_recoverable_error_test.robot
@@ -2,7 +2,7 @@
 Documentation   Test errors and changes in the environment that BMC code
 ...             update should recover from or not be effected by.
 
-Resource        ../../lib/code_update_utils.robot
+Resource        ../../lib/code_update_utils_serial.robot
 Resource        ../../lib/openbmc_ffdc.robot
 
 Suite Setup     Suite Setup Execution
@@ -52,4 +52,4 @@
 Test Setup Execution
     [Documentation]  Do setup tasks for every test case.
 
-    Delete All PNOR Images
\ No newline at end of file
+    Delete All PNOR Images
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index cc4d9e3..4f863d1 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -9,7 +9,6 @@
 Resource    boot_utils.robot
 Resource    rest_client.robot
 Resource    openbmc_ffdc.robot
-Resource    oem/ibm/serial_console_client.robot
 
 *** Keywords ***
 
@@ -366,38 +365,6 @@
     ${pnor_version}=  Get PNOR Version
     Should Be Equal  ${tar_version}  ${pnor_version}
 
-Reset Network Interface During Code Update
-    [Documentation]  Disable and re-enable the network while doing code update.
-    [Arguments]  ${image_file_path}  ${reboot}
-
-    # Resetting the network will be done via the serial console.
-    #
-    # Description of argument(s):
-    # image_file_path   Path to the image file to update to.
-    # reboot            If set to true, will reboot the BMC after the code
-    #                   update is finished.
-
-    ${version_id}=  Upload And Activate Image  ${image_file_path}  wait=${0}
-    Reset Network Interface
-
-    # Verify code update was successful and 'Activation' state is 'Active'.
-    Wait For Activation State Change  ${version_id}  ${ACTIVATING}
-    ${software_state}=  Read Properties  ${SOFTWARE_VERSION_URI}${version_id}
-    Should Be Equal As Strings  &{software_state}[Activation]  ${ACTIVE}
-
-    Run Keyword If  '${reboot}'  OBMC Reboot (off)  stack_mode=normal
-
-
-Reset Network Interface
-    [Documentation]  Turn the ethernet network interface off and then on again
-    ...              through the serial console.
-
-    Import Resource  ${CURDIR}/oem/ibm/serial_console_client.robot
-    Set Library Search Order  SSHLibrary  Telnet
-    Execute Command On Serial Console  ifconfig eth0 down
-    Sleep  30s
-    Execute Command On Serial Console  ifconfig eth0 up
-
 
 Get Least Value Priority Image
     [Documentation]  Find the least value in "Priority" attribute and return.
diff --git a/lib/code_update_utils_serial.robot b/lib/code_update_utils_serial.robot
new file mode 100644
index 0000000..1b24f38
--- /dev/null
+++ b/lib/code_update_utils_serial.robot
@@ -0,0 +1,39 @@
+*** Settings ***
+Documentation  BMC OEM serial update utilities keywords.
+
+Resource    code_update_utils.robot
+Resource    oem/ibm/serial_console_client.robot
+
+*** Keywords ***
+
+Reset Network Interface During Code Update
+    [Documentation]  Disable and re-enable the network while doing code update.
+    [Arguments]  ${image_file_path}  ${reboot}
+
+    # Resetting the network will be done via the serial console.
+    #
+    # Description of argument(s):
+    # image_file_path   Path to the image file to update to.
+    # reboot            If set to true, will reboot the BMC after the code
+    #                   update is finished.
+
+    ${version_id}=  Upload And Activate Image  ${image_file_path}  wait=${0}
+    Reset Network Interface
+
+    # Verify code update was successful and 'Activation' state is 'Active'.
+    Wait For Activation State Change  ${version_id}  ${ACTIVATING}
+    ${software_state}=  Read Properties  ${SOFTWARE_VERSION_URI}${version_id}
+    Should Be Equal As Strings  &{software_state}[Activation]  ${ACTIVE}
+
+    Run Keyword If  '${reboot}'  OBMC Reboot (off)  stack_mode=normal
+
+
+Reset Network Interface
+    [Documentation]  Turn the ethernet network interface off and then on again
+    ...              through the serial console.
+
+    Import Resource  ${CURDIR}/oem/ibm/serial_console_client.robot
+    Set Library Search Order  SSHLibrary  Telnet
+    Execute Command On Serial Console  ifconfig eth0 down
+    Sleep  30s
+    Execute Command On Serial Console  ifconfig eth0 up