Automation fix for ifconfig command
Changes:
- ifconfig error message:
Command 'ifconfig' returned non-zero exit status 127.
- New implementaion uses socket module to get the hostname.
Change-Id: I3b60efe5b88fb44676b729cb8b28ebb9cf735638
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/openpower/ext_interfaces/test_client_identifier.robot b/openpower/ext_interfaces/test_client_identifier.robot
index 97d9cff..92124d1 100644
--- a/openpower/ext_interfaces/test_client_identifier.robot
+++ b/openpower/ext_interfaces/test_client_identifier.robot
@@ -129,11 +129,13 @@
${sessions}= Redfish.Get Properties /redfish/v1/SessionService/Sessions/${session_id}
Rprint Vars sessions
@{words} = Split String ${sessions["Oem"]["OpenBMC"]["ClientOriginIP"]} :
- ${ipaddr}= Get Running System IP
+ ${host_name}= Get Hostname
+ ${host_name} ${ip_address}= Get Host Name IP host=${host_name}
+ Set Suite Variable ${ip_address}
Set Test Variable ${temp_ipaddr} ${words}[-1]
Valid Value client ['${sessions["Oem"]["OpenBMC"]["ClientID"]}']
Valid Value sessions["Id"] ['${session_id}']
- Valid Value temp_ipaddr ${ipaddr}
+ Valid Value temp_ipaddr ['${ip_address}']
END