BMC file mirror from REST to Redfish

Change-Id: I5088389125cdb1d820be7c5e9f34dc3e01961afc
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/tests/test_bmc_file_mirroring.robot b/redfish/extended/test_bmc_file_mirroring.robot
similarity index 69%
rename from tests/test_bmc_file_mirroring.robot
rename to redfish/extended/test_bmc_file_mirroring.robot
index 237902b..8bc4999 100755
--- a/tests/test_bmc_file_mirroring.robot
+++ b/redfish/extended/test_bmc_file_mirroring.robot
@@ -2,8 +2,10 @@
 Documentation  Test BMC file mirroring sync from primary flash chip to
 ...  alternate flash chip side.
 
-Resource       ../lib/openbmc_ffdc.robot
-Library        ../lib/bmc_ssh_utils.py
+Resource       ../../lib/openbmc_ffdc.robot
+Resource       ../../lib/bmc_network_utils.robot
+Resource       ../../lib/bmc_redfish_resource.robot
+Library        ../../lib/bmc_ssh_utils.py
 
 Test Teardown  Test Teardown Execution
 
@@ -33,14 +35,12 @@
     Set Suite Variable  ${hostname}  ${orig_hostname}
     ${mirror_filename}=  Set Variable  mirror-filename
 
-    ${host_name_dict}=  Create Dictionary  data=${mirror_filename}
-    Write Attribute  ${NETWORK_MANAGER}config  HostName  data=${host_name_dict}
-    ...  verify=${TRUE}  expected_value=${mirror_filename}
+    Redfish.Login
+    Configure Hostname  ${mirror_filename}
+    ${curr_hostname}  ${stderr}  ${rc}=  BMC Execute Command  hostname
 
-    ${hostname}  ${stderr}  ${rc}=  BMC Execute Command  hostname
-
-    Should Be Equal As Strings  ${hostname}  ${mirror_filename}
-    ...  msg=The hostname interface ${mirror_filename} and command value ${hostname} do not match.
+    Should Be Equal As Strings  ${curr_hostname}  ${mirror_filename}
+    ...  msg=The hostname interface ${mirror_filename} and command value ${curr_hostname} do not match.
 
     # File "hostname" should have synced to alt media space.
     # Example output from "ls /media/alt/var/persist/etc/":
@@ -59,7 +59,6 @@
 
     FFDC On Test Case Fail
 
-    ${host_name_dict}=  Create Dictionary  data=${hostname}
-    Write Attribute  ${NETWORK_MANAGER}config  HostName  data=${host_name_dict}
-    ...  verify=${TRUE}  expected_value=${hostname}
+    Redfish.Login
+    Configure Hostname  ${hostname}