Hostname verification fix.
Resolves openbmc/openbmc-test-automation#1690
Signed-off-by: Prashanth Katti <prkatti1@in.ibm.com>
Change-Id: I540d4808f61f40d30b60391fa485e2701b7c9d73
diff --git a/lib/bmc_network_utils.robot b/lib/bmc_network_utils.robot
index c37763c..5b29e1e 100644
--- a/lib/bmc_network_utils.robot
+++ b/lib/bmc_network_utils.robot
@@ -132,17 +132,10 @@
Get BMC Hostname
[Documentation] Get BMC hostname.
- # Sample output of "hostnamectl":
- # Static hostname: xxyyxxyyxx
- # Icon name: computer
- # Machine ID: 6939927dc0db409ea09289d5b56eef08
- # Boot ID: bb806955fd904d47b6aa4bc7c34df482
- # Operating System: Phosphor OpenBMC (xxx xx xx) v1.xx.x-xx
- # Kernel: Linux 4.10.17-d6ae40dc4c4dff3265cc254d404ed6b03fcc2206
- # Architecture: arm
+ # Sample output of "hostname":
+ # test_hostname
- ${output} ${stderr} ${rc}= BMC Execute Command
- ... hostnamectl | grep hostname | cut -f 2 -d : | sed -re 's/ //g'
+ ${output} ${stderr} ${rc}= BMC Execute Command hostname
[Return] ${output}