@@ -162,6 +162,20 @@ Verify Enable NTP
162
162
Valid Value ntp["ProtocolEnabled"] valid_values=[True]
163
163
164
164
165
+ Verify Immediate Consumption Of BMC Date
166
+ [Documentation] Verify immediate change in BMC date time.
167
+ [Tags] Verify_Immediate_Consumption_Of_BMC_Date
168
+ [Setup] Run Keywords Set Time To Manual Mode AND
169
+ ... Sleep 2s AND Redfish Set DateTime valid_status_codes=[${HTTP_OK } ]
170
+ [Teardown] Run Keywords FFDC On Test Case Fail AND
171
+ ... Redfish Set DateTime valid_status_codes=[${HTTP_OK } ]
172
+ [Template] Set BMC Date And Verify
173
+
174
+ # host_state
175
+ on
176
+ off
177
+
178
+
165
179
*** Keywords ***
166
180
167
181
@@ -260,4 +274,23 @@ Restore NTP Status
260
274
261
275
Run Keyword If '${original_ntp["ProtocolEnabled"] } ' == 'True'
262
276
... Set NTP state ${TRUE }
263
- ... ELSE Set NTP state ${FALSE }
277
+ ... ELSE Set NTP state ${FALSE }
278
+
279
+
280
+ Set BMC Date And Verify
281
+ [Documentation] Set BMC Date Time at a given host state and verify.
282
+ [Arguments] ${host_state }
283
+ # Description of argument(s):
284
+ # host_state Host state at which date time will be updated for verification
285
+ # (eg. on, off).
286
+
287
+ Run Keyword If '${host_state } ' == 'on'
288
+ ... Redfish Power On stack_mode=skip
289
+ ... ELSE
290
+ ... Redfish Power off stack_mode=skip
291
+ ${current_date } = Get Current Date time_zone=UTC
292
+ ${new_value } = Subtract Time From Date ${current_date } 1 day
293
+ Redfish Set DateTime ${new_value } valid_status_codes=[${HTTP_OK } ]
294
+ ${current_value } = Redfish Get DateTime
295
+ ${time_diff } = Subtract Date From Date ${current_value } ${new_value }
296
+ Should Be True '${time_diff } '<='3 '
0 commit comments