Added test case unable to set client origin ip
Changes:
- Added test case "Fail To Set Client Origin IP"
- Added keyword "Set Client Origin IP"
- Added keyword "Create Session And Fail To Set Client Origin IP"
Change-Id: Iddfb119dd48a620d8c8455395ef1c8a14bfc4109
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 0bfea48..97d9cff 100644
--- a/openpower/ext_interfaces/test_client_identifier.robot
+++ b/openpower/ext_interfaces/test_client_identifier.robot
@@ -59,6 +59,15 @@
EXTERNAL-CLIENT-01,EXTERNAL-CLIENT-02 True
+Fail To Set Client Origin IP
+ [Documentation] Fail to set the client origin IP.
+ [Tags] Fail_To_Set_Client_Origin_IP
+ [Template] Create Session And Fail To Set Client Origin IP
+
+ # client_id
+ 12345
+ EXTERNAL-CLIENT-01
+
*** Keywords ***
Create A Session With ClientID
@@ -144,3 +153,31 @@
Run Keyword If '${reboot_flag}' == 'True'
... Run Keywords Redfish OBMC Reboot (off) AND
... Verify A Session Created With ClientID ${client_ids} ${session_info}
+
+
+Set Client Origin IP
+ [Documentation] Set client origin IP.
+ [Arguments] ${client_id} ${client_ip} ${status}
+
+ # Description of argument(s):
+ # client_id This client id contain string value
+ # (e.g. 12345, "EXTERNAL-CLIENT").
+ # client_ip Valid IP address
+ # status HTTP status code
+
+ ${session}= Run Keyword And Return Status
+ ... Redfish Login
+ ... kwargs= "Oem":{"OpenBMC": {"ClientID":"${client_id}", "ClientOriginIP":"${client_ip}"}}
+ Valid Value session [${status}]
+
+
+Create Session And Fail To Set Client Origin IP
+ [Documentation] Create redifish session with client id and fail to set client origin IP.
+ [Arguments] ${client_id}
+
+ # Description of argument(s):
+ # client_id This client id contain string value
+ # (e.g. 12345, "EXTERNAL-CLIENT").
+
+ Set Test Variable ${client_ip} 10.6.7.8
+ ${resp}= Set Client Origin IP ${client_id} ${client_ip} status=False