Update turbo setting utilities
BMC moved TurboiAllowed setting to
"/xyz/openbmc_project/control/host0/turbo_allowed".
Resolves openbmc/openbmc-test-automation#1336
Change-Id: I71b63b4e8dfd21d718950f80dbd15781d72c94ca
Signed-off-by: Steven Sombar <ssombar@us.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index e550491..885afa2 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -1388,11 +1388,12 @@
Read Turbo Setting Via REST
[Documentation] Return turbo setting via REST.
+ # Returns 1 if TurboAllowed, 0 if not.
- ${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"]}
+ ${turbo_setting}= Read Attribute
+ ... ${CONTROL_HOST_URI}turbo_allowed TurboAllowed
+ [Return] ${turbo_setting}
+
Set Turbo Setting Via REST
@@ -1402,8 +1403,10 @@
# 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}
+ ${data}= Create Dictionary data=${${setting}}
+ Write Attribute ${CONTROL_HOST_URI}turbo_allowed TurboAllowed
+ ... data=${data}
+
Set Control Boot Mode