Processor frequency check turbo and non-turbo.
Moved Set Turbo Setting Via Rest to lib/utils.robot from
tests/test_sensors.robot.
Added new module proc_freq_check.robot.
Resolves openbmc/openbmc-test-automation#916
Change-Id: I9f064a6af49481aaa493a674c80e5ac293f1351e
Signed-off-by: Steven Sombar <ssombar@us.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index 1f74ae2..e29e2de 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -1155,3 +1155,21 @@
###############################################################################
+Read Turbo Setting Via REST
+ [Documentation] Return turbo setting via REST.
+
+ ${resp}= OpenBMC Get Request ${SENSORS_URI}host/TurboAllowed
+ ${jsondata}= To JSON ${resp.content}
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
+ [Return] ${jsondata["data"]["value"]}
+
+
+###############################################################################
+Set Turbo Setting Via REST
+ [Documentation] Set turbo setting via REST.
+ [Arguments] ${setting}
+ # Description of argument(s):
+ # setting Value which needs to be set.(i.e. False or True)
+
+ ${valueDict}= Create Dictionary data=${setting}
+ Write Attribute ${SENSORS_URI}host/TurboAllowed value data=${valueDict}