Added test cases to verify IPMI user via Redfish
Test cases added:
- Create IPMI user and verify login via Redfish.
- Update user password via IPMI and verify using Redfish.
- Update user privilege via IPMI and verify using Redfish.
- Delete user via IPMI And verify using Redfish.
Change-Id: I29202ee4b66071f0eab0d6bd093fc7e3f38b73de
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
Change-Id: Ie0c222cbdaf093070d307258bc1c5d7f5856a16f
diff --git a/lib/ipmi_client.robot b/lib/ipmi_client.robot
index 24ef24c..1033a04 100755
--- a/lib/ipmi_client.robot
+++ b/lib/ipmi_client.robot
@@ -373,3 +373,34 @@
${output}= Run External IPMI Standard Command
... sel info U=${username} P=${password}
Should Contain ${output} SEL Information msg=SEL information not present
+
+
+IPMI Create User
+ [Documentation] Create IPMI user with given userid and username.
+ [Arguments] ${userid} ${username}
+
+ # Description of argument(s):
+ # userid The user ID (e.g. "1", "2", etc.).
+ # username The user name (e.g. "root", "robert", etc.).
+
+ ${ipmi_cmd}= Catenate user set name ${userid} ${username}
+ ${resp}= Run IPMI Standard Command ${ipmi_cmd}
+ ${user_info}= Get User Info ${userid}
+ Should Be Equal ${user_info['user_name']} ${username}
+
+
+Set Channel Access
+ [Documentation] Verify that user is able to run IPMI command
+ ... with given username and password.
+ [Arguments] ${userid} ${options} ${channel}=1
+
+ # Description of argument(s):
+ # userid The user ID (e.g. "1", "2", etc.).
+ # options Set channel command options (e.g.
+ # "link=on", "ipmi=on", etc.).
+ # channel_number The user's channel number (e.g. "1").
+
+ ${ipmi_cmd}= Catenate SEPARATOR=
+ ... channel setaccess${SPACE}${channel}${SPACE}${userid}
+ ... ${SPACE}${options}
+ Run IPMI Standard Command ${ipmi_cmd}