Modified Hardcoded channel Number as 1 to dynamic.
While Getting user info using "Get User Info" keyword by default
it will return channel numebr 1 user. we have to mention the channel
number to get the particular channel user info. So for Get User Info
keyword added ${CHANNEL_NUMBER} variable as argument.
And also while getting channel access we are hardcoding the channel
number as 1, there are removed 1 and added ${CHANNEL_NUMBER}.
Tested: Run robot ipmi/test_ipmi_user.robot
Run robot ipmi/test_ipmi_payload.robot
Run robot redfish/account_service/test_ipmi_redfish_user.robot
Change-Id: Id81b59e7880045b74e65195089e38d8653f66d7a
Signed-off-by: Nagarjun B <nagarjunb@ami.com>
diff --git a/lib/ipmi_client.robot b/lib/ipmi_client.robot
index 136aa3d..285c330 100755
--- a/lib/ipmi_client.robot
+++ b/lib/ipmi_client.robot
@@ -410,7 +410,7 @@
${ipmi_cmd}= Catenate user set name ${userid} ${username}
${resp}= Run IPMI Standard Command ${ipmi_cmd}
- ${user_info}= Get User Info ${userid}
+ ${user_info}= Get User Info ${userid} ${CHANNEL_NUMBER}
Should Be Equal ${user_info['user_name']} ${username}
@@ -422,7 +422,7 @@
# userid A numeric userid (e.g. "4").
Run IPMI Standard Command user enable ${userid}
- ${user_info}= Get User Info ${userid}
+ ${user_info}= Get User Info ${userid} ${CHANNEL_NUMBER}
Valid Value user_info['enable_status'] ['enabled']
@@ -466,7 +466,7 @@
[Documentation] Delete all non-root IPMI user.
# Get complete list of user info records.
- ${user_info}= Get User Info ${EMPTY}
+ ${user_info}= Get User Info ${EMPTY} ${CHANNEL_NUMBER}
# Remove header record.
${user_info}= Filter Struct ${user_info} [('user_name', None)] invert=1
${non_empty_user_info}= Filter Struct ${user_info} [('user_name', '')] invert=1
@@ -641,4 +641,4 @@
# ${hex1} will contains the data to write for fru in list.
# ${hex2} will contains the data to verify fru after write operation completed.
- [Return] ${hex1} ${hex2}
\ No newline at end of file
+ [Return] ${hex1} ${hex2}