Open power variable and keywords utility.
Added:
- Open power base URI.
- Open power utils keywords.
Resolves openbmc/openbmc-test-automation#962
Change-Id: I1731dff9529a010ceb286650d3bf66972b16f1d3
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/lib/open_power_utils.robot b/lib/open_power_utils.robot
new file mode 100644
index 0000000..262486c
--- /dev/null
+++ b/lib/open_power_utils.robot
@@ -0,0 +1,35 @@
+*** Settings ***
+Documentation Open power domain keywords.
+
+Library ../data/variables.py
+Resource ../lib/utils.robot
+
+*** Keywords ***
+
+Get OCC Objects
+ [Documentation] Get the OCC objects and return as a list.
+
+ # Example:
+ # {
+ # "/org/open_power/control/occ0": {
+ # "OccActive": 0
+ # },
+ # "/org/open_power/control/occ1": {
+ # "OccActive": 1
+ # }
+
+ ${occ_list}= Get Endpoint Paths ${OPENBMC_POWER} occ*
+
+ [Return] ${occ_list}
+
+
+Get OCC Active State
+ [Documentation] Get the OCC "OccActive" and return the attribute value.
+ [Arguments] ${occ_object}
+
+ # Description of argument(s):
+ # occ_object OCC object path.
+ # (e.g. "/org/open_power/control/occ0").
+
+ ${occ_attribute}= Read Attribute ${occ_object} OccActive
+ [Return] ${occ_attribute}