/openbmc/bmcweb/redfish-core/lib/ |
H A D | trigger.hpp | diff e3648032f357195d186b7f4f02519fae10a90e41 Wed Oct 16 20:06:39 CDT 2024 Ed Tanous <etanous@nvidia.com> Make trigger use common types
Trigger having its own variant causes us to duplicate code. This was left out of the original refactoring because it was complex given the variant of a variant status.
This commit finally does the port.
Tested: Unclear what tests exist for triggers that would use this code ``` curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X POST https://192.168.7.2/redfish/v1/TelemetryService/Triggers -d '{"Name": "eds", "NumericThresholds": {"LowerCritical": {"Reading": 1.0, "Activation": "Increasing", "DwellTime": "P1S"}}}' ```
Succeeds. GET on the resource results in: { "@odata.id": "/redfish/v1/TelemetryService/Triggers/eds", "@odata.type": "#Triggers.v1_2_0.Triggers", "Id": "eds", "Links": { "MetricReportDefinitions": [] }, "MetricProperties": [], "MetricType": "Numeric", "Name": "eds", "NumericThresholds": { "LowerCritical": { "Activation": "Increasing", "DwellTime": "PT1.000S", "Reading": 1.0 } }, "TriggerActions": [] }
Change-Id: I8f683cc9423ee2ba111d3ca1889e78f7d33433c9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
|
H A D | virtual_media.hpp | diff e3648032f357195d186b7f4f02519fae10a90e41 Wed Oct 16 20:06:39 CDT 2024 Ed Tanous <etanous@nvidia.com> Make trigger use common types
Trigger having its own variant causes us to duplicate code. This was left out of the original refactoring because it was complex given the variant of a variant status.
This commit finally does the port.
Tested: Unclear what tests exist for triggers that would use this code ``` curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X POST https://192.168.7.2/redfish/v1/TelemetryService/Triggers -d '{"Name": "eds", "NumericThresholds": {"LowerCritical": {"Reading": 1.0, "Activation": "Increasing", "DwellTime": "P1S"}}}' ```
Succeeds. GET on the resource results in: { "@odata.id": "/redfish/v1/TelemetryService/Triggers/eds", "@odata.type": "#Triggers.v1_2_0.Triggers", "Id": "eds", "Links": { "MetricReportDefinitions": [] }, "MetricProperties": [], "MetricType": "Numeric", "Name": "eds", "NumericThresholds": { "LowerCritical": { "Activation": "Increasing", "DwellTime": "PT1.000S", "Reading": 1.0 } }, "TriggerActions": [] }
Change-Id: I8f683cc9423ee2ba111d3ca1889e78f7d33433c9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
|
/openbmc/bmcweb/include/ |
H A D | dbus_utility.hpp | diff e3648032f357195d186b7f4f02519fae10a90e41 Wed Oct 16 20:06:39 CDT 2024 Ed Tanous <etanous@nvidia.com> Make trigger use common types
Trigger having its own variant causes us to duplicate code. This was left out of the original refactoring because it was complex given the variant of a variant status.
This commit finally does the port.
Tested: Unclear what tests exist for triggers that would use this code ``` curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X POST https://192.168.7.2/redfish/v1/TelemetryService/Triggers -d '{"Name": "eds", "NumericThresholds": {"LowerCritical": {"Reading": 1.0, "Activation": "Increasing", "DwellTime": "P1S"}}}' ```
Succeeds. GET on the resource results in: { "@odata.id": "/redfish/v1/TelemetryService/Triggers/eds", "@odata.type": "#Triggers.v1_2_0.Triggers", "Id": "eds", "Links": { "MetricReportDefinitions": [] }, "MetricProperties": [], "MetricType": "Numeric", "Name": "eds", "NumericThresholds": { "LowerCritical": { "Activation": "Increasing", "DwellTime": "PT1.000S", "Reading": 1.0 } }, "TriggerActions": [] }
Change-Id: I8f683cc9423ee2ba111d3ca1889e78f7d33433c9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
|
H A D | openbmc_dbus_rest.hpp | diff e3648032f357195d186b7f4f02519fae10a90e41 Wed Oct 16 20:06:39 CDT 2024 Ed Tanous <etanous@nvidia.com> Make trigger use common types
Trigger having its own variant causes us to duplicate code. This was left out of the original refactoring because it was complex given the variant of a variant status.
This commit finally does the port.
Tested: Unclear what tests exist for triggers that would use this code ``` curl -k --user "root:0penBmc" -H "Content-Type: application/json" -X POST https://192.168.7.2/redfish/v1/TelemetryService/Triggers -d '{"Name": "eds", "NumericThresholds": {"LowerCritical": {"Reading": 1.0, "Activation": "Increasing", "DwellTime": "P1S"}}}' ```
Succeeds. GET on the resource results in: { "@odata.id": "/redfish/v1/TelemetryService/Triggers/eds", "@odata.type": "#Triggers.v1_2_0.Triggers", "Id": "eds", "Links": { "MetricReportDefinitions": [] }, "MetricProperties": [], "MetricType": "Numeric", "Name": "eds", "NumericThresholds": { "LowerCritical": { "Activation": "Increasing", "DwellTime": "PT1.000S", "Reading": 1.0 } }, "TriggerActions": [] }
Change-Id: I8f683cc9423ee2ba111d3ca1889e78f7d33433c9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
|