Added test cases for testing SOL privilege level.

Resolves openbmc/openbmc-test-automation#595

Change-Id: I3c5c206f07b498b26b703adafa9456d8e0ac600f
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/tests/ipmi/test_sol.robot b/tests/ipmi/test_sol.robot
index 6c0d047..aa605b6 100644
--- a/tests/ipmi/test_sol.robot
+++ b/tests/ipmi/test_sol.robot
@@ -73,6 +73,27 @@
     [Template]  Verify SOL Setting
 
 
+Set Valid SOL Privilege Level
+    [Documentation]  Verify valid SOL's privilege level via IPMI.
+    [Tags]  Set_Valid_SOL_Privilege_Level
+
+    ${privilege_level_list}=  Create List  user  operator  admin  oem
+    : FOR  ${item}  IN  @{privilege_level_list}
+    \  Set SOL Setting Value  privilege-level  ${item}
+    \  ${output}=  Get SOL Setting Value  privilege level
+    \  Should Contain  ${output}  ${item}  ignore_case=True
+
+
+Set Invalid SOL Privilege Level
+    [Documentation]  Verify invalid SOL's retry count via IPMI.
+    [Tags]  Set_Invalid_SOL_Privilege_Level
+
+    ${value}=  Generate Random String  ${8}
+    ${msg}=  Run Keyword And Expect Error  *  Run IPMI Standard Command
+    ...  sol set privilege-level ${value}
+    Should Contain  ${msg}  Invalid value  ignore_case=True
+
+
 *** Keywords ***
 
 Check IPMI SOL Output Content
@@ -148,6 +169,7 @@
     Set SOL Setting  retry-interval  10
     Set SOL Setting  character-accumulate-level  20
     Set SOL Setting  character-send-threshold  1
+    Set SOL Setting  privilege-level  user
 
     Close All Connections