blob: 061023e8e7539fc892f7da38d5e8f3537624ead2 [file] [log] [blame]
manashsarma663c2da2023-05-26 06:06:14 -05001*** Settings ***
2
3Documentation Test telemetry functionality of OpenBMC.
4
5Resource ../../lib/bmc_redfish_resource.robot
6Resource ../../lib/openbmc_ffdc.robot
7
8Suite Setup Suite Setup Execution
9Suite Teardown Redfish.Logout
10Test Teardown Test Teardown Execution
11
12*** Variables ***
13
14${metric_definition_base_uri} /redfish/v1/TelemetryService/MetricReportDefinitions
15${metric_report_base_uri} /redfish/v1/TelemetryService/MetricReports
16
17*** Test Cases ***
18
19Verify Basic Telemetry Report Creation
20 [Documentation] Verify if a telemetry basic report is created.
21 [Tags] Verify_Basic_Telemetry_Report_Creation
22
23 ${report_name}= Set Variable Test_basic_report_ambient_temp
24 ${resp}= Redfish.Get Properties
25 ... /redfish/v1/TelemetryService/MetricDefinitions/Ambient_0_Temp
26 ${body}= Catenate {"Id": "${report_name}",
27 ... "MetricReportDefinitionType": "OnRequest",
28 ... "ReportActions":["LogToMetricReportsCollection"],
29 ... "Metrics":[{"MetricProperties":${resp["MetricProperties"]}}]}
30 ${body}= Replace String ${body} ' "
31 ${dict} Evaluate json.loads('''${body}''') json
32
33 Redfish.Post ${metric_definition_base_uri} body=&{dict}
34 ... valid_status_codes=[${HTTP_CREATED}]
35
36 Redfish.Get ${metric_report_base_uri}/Test_basic_report_ambient_temp
37 ... valid_status_codes=[${HTTP_OK}]
38
39
40*** Keywords ***
41
42Suite Setup Execution
43 [Documentation] Do test case setup tasks.
44
45 Redfish.Login
46
47
48Test Teardown Execution
49 [Documentation] Do test teardown operation.
50
51 FFDC On Test Case Fail