Get Current Applytime And Verify
Scenario:
Added code to get current Applytime and verify
Change-Id: Id9737d41d6c5e2c8da6ba73f95e9317b1b54e319
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index bdabb90..0119bb9 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -585,6 +585,28 @@
[Return] ${version}
+Get ApplyTime
+ [Documentation] Get the firmware "ApplyTime" policy.
+ [Arguments] ${policy}
+
+ # Description of argument(s):
+ # policy ApplyTime allowed values (e.g. "OnReset", "Immediate").
+
+ ${system_applytime}= Redfish.Get Attribute ${REDFISH_BASE_URI}UpdateService HttpPushUriOptions
+ [Return] ${system_applytime["HttpPushUriApplyTime"]["ApplyTime"]}
+
+
+Verify Get ApplyTime
+ [Documentation] Get and verify the firmware "ApplyTime" policy.
+ [Arguments] ${policy}
+
+ # Description of argument(s):
+ # policy ApplyTime allowed values (e.g. "OnReset", "Immediate").
+
+ ${system_applytime}= Get ApplyTime ${policy}
+ Valid Value system_applytime ['${policy}']
+
+
Set ApplyTime
[Documentation] Set and verify the firmware "ApplyTime" policy.
[Arguments] ${policy}
@@ -594,8 +616,7 @@
Redfish.Patch ${REDFISH_BASE_URI}UpdateService
... body={'HttpPushUriOptions' : {'HttpPushUriApplyTime' : {'ApplyTime' : '${policy}'}}}
- ${apply_time}= Read Attribute ${SOFTWARE_VERSION_URI}apply_time RequestedApplyTime
- Valid Value apply_time valid_values=["xyz.openbmc_project.Software.ApplyTime.RequestedApplyTimes.${policy}"]
+ Verify Get ApplyTime ${policy}
Rprint Vars apply_time