Moving code Configure Hostname

Change-Id: I962a19673946b43086b669edfd9cb4ce2a491229
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index 5b29e1e..b044612 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -245,3 +245,15 @@
     # Run pingum to check if the "build_net" was run correctly done.
     ${output}  ${stderr}  ${rc}=  OS Execute Command  pingum
     Should Contain  ${output}  All networks ping Ok
+
+
+Configure Hostname
+    [Documentation]  Configure hostname on BMC via Redfish.
+    [Arguments]  ${hostname}
+
+    # Description of argument(s):
+    # hostname  A hostname value which is to be configured on BMC.
+
+    ${data}=  Create Dictionary  HostName=${hostname}
+    Redfish.patch  ${REDFISH_NW_PROTOCOL_URI}  body=&{data}
+