IndicatorLED: Add compile option for deprecated property
The IndicatorLED property has been deprecated by Redfish since September
2020. The Redfish Service Validator reports a WARNING for this property:
```
WARNING - IndicatorLED: The given property is deprecated: This property has been deprecated in favor of the `LocationIndicatorActive` property.
```
The LocationIndicatorActive property is now implemented in bmcweb in
all places where IndicatorLED was implemented. So a new meson option
(redfish-allow-deprecated-indicatorled) is being added to control
whether this property is part of get or patch requests. The option is
disabled by default with plans to remove the option by March 2026.
Tested:
- Built with option enabled and confirmed IndicatorLED still part of
Redfish responses and can be patched.
- Built with option disabled and confirmed Redfish Service Validator no
longer reports the warning.
- Built with option disabled and confirmed IndicatorLED no longer part
of Redfish responses and patch fails appropriately.
```
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"IndicatorLED":"Blinking"}' https://${bmc}/redfish/v1/Systems/system
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The property IndicatorLED is not in the list of valid properties for the resource.",
"MessageArgs": [
"IndicatorLED"
],
"MessageId": "Base.1.19.PropertyUnknown",
"MessageSeverity": "Warning",
"Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed."
}
],
"code": "Base.1.19.PropertyUnknown",
"message": "The property IndicatorLED is not in the list of valid properties for the resource."
}
}
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"IndicatorLED":"Off"}' https://${bmc}/redfish/v1/Chassis/chassis
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The property IndicatorLED is not in the list of valid properties for the resource.",
"MessageArgs": [
"IndicatorLED"
],
"MessageId": "Base.1.19.PropertyUnknown",
"MessageSeverity": "Warning",
"Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed."
}
],
"code": "Base.1.19.PropertyUnknown",
"message": "The property IndicatorLED is not in the list of valid properties for the resource."
}
}
```
Change-Id: I2c0d415a7a54aa3122b18d2a1aa69bd9259d567e
Signed-off-by: Janet Adkins <janeta@us.ibm.com>
diff --git a/meson.options b/meson.options
index 86a3713..aee691d 100644
--- a/meson.options
+++ b/meson.options
@@ -301,6 +301,16 @@
sensors in the SensorCollection.''',
)
+# BMCWEB_REDFISH_ALLOW_DEPRECATED_INDICATORLED
+option(
+ 'redfish-allow-deprecated-indicatorled',
+ type: 'feature',
+ value: 'disabled',
+ description: '''Enable/disable the deprecated IndicatorLED property. The
+ default condition is disabled. The code to enable this
+ option will be removed by March 2026.''',
+)
+
# BMCWEB_REDFISH_ALLOW_DEPRECATED_POWER_THERMAL
option(
'redfish-allow-deprecated-power-thermal',