Keywords and test for redfish
Changes:
- Added new test suite for CI test_redfish_basic_poweron.robot.
- Added new resource file lib/redfish_utility.robot.
- Added new variables and fix POST request args.
Change-Id: Ia4c230ec464973b9b8cf3260401a8854ca711229
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/redfish_client.robot b/lib/redfish_client.robot
index 513d121..e548b22 100644
--- a/lib/redfish_client.robot
+++ b/lib/redfish_client.robot
@@ -94,8 +94,8 @@
Redfish Post Request
[Documentation] Do redfish POST request.
[Arguments] ${uri_suffix}
- ... &{kwargs}
... ${timeout}=30
+ ... &{kwargs}
# Description of argument(s):
# uri_suffix The URI to establish connection with
diff --git a/lib/redfish_utility.robot b/lib/redfish_utility.robot
new file mode 100644
index 0000000..feb0560
--- /dev/null
+++ b/lib/redfish_utility.robot
@@ -0,0 +1,18 @@
+*** Settings ***
+
+Documentation Utilities keywords for BMC redfish.
+
+Resource resource.txt
+Resource redfish_client.robot
+
+*** Keywords ***
+
+Boot Action
+ [Documentation] Host boot to power on, off or reboot.
+ [Arguments] ${boot_option}
+
+ # Description of argument(s):
+ # boot_option On/GracefulShutdown/ForceOff
+
+ ${args}= Create Dictionary ResetType=${boot_option}
+ ${resp}= Redfish Post Request ${REDFISH_POWER_URI} data=${args}