Moved "Verify IPMI Username And Password" keyword in library

Also simplified the logic to verify username and password.

Change-Id: I83551087b08331acb7c2b200db88b494d9384172
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/lib/ipmi_client.robot b/lib/ipmi_client.robot
index cfdb6fe..24ef24c 100755
--- a/lib/ipmi_client.robot
+++ b/lib/ipmi_client.robot
@@ -359,3 +359,17 @@
 
     Run Inband IPMI Standard Command
     ...  lan set 1 defgw ipaddr ${nw_info['Default Gateway IP']}
+
+
+Verify IPMI Username And Password
+    [Documentation]  Verify that user is able to run IPMI command
+    ...  with given username and password.
+    [Arguments]  ${username}  ${password}
+
+    # Description of argument(s):
+    # username    The user name (e.g. "root", "robert", etc.).
+    # password    The user password (e.g. "0penBmc", "0penBmc1", etc.).
+
+    ${output}=  Run External IPMI Standard Command
+    ...  sel info  U=${username}  P=${password}
+    Should Contain  ${output}  SEL Information  msg=SEL information not present