Fix EventService PATCH response handling
The PATCH handler for /redfish/v1/EventService had two issues. First, on a successful PATCH, messages::success() was called which returns HTTP 200 with no body. Per Redfish DSP0266 Section 7.5.2, a successful PATCH with no response body should return HTTP 204 No Content. Replace HTTP 200 with no Body to asyncResp->res.result(boost::beast::http::status::no_content). Second, the out-of-range validation for DeliveryRetryAttempts and DeliveryRetryIntervalSeconds used queryParameterOutOfRange(), which is intended for URL query parameters. These are request-body properties sent via PATCH, so the correct message type is propertyValueOutOfRange() per the Redfish Base Message Registry. Tested: - PATCH /redfish/v1/EventService with valid ServiceEnabled, DeliveryRetryAttempts and DeliveryRetryIntervalSeconds returns HTTP 204 No Content. - Out-of-range DeliveryRetryAttempts (outside [1-3]) returns HTTP 400 with PropertyValueOutOfRange. - Out-of-range DeliveryRetryIntervalSeconds (outside [5-180]) returns HTTP 400 with PropertyValueOutOfRange. - GET /redfish/v1/EventService after successful PATCH confirms updated values are persisted correctly. Change-Id: I2191052199f1cb773928d91819815e03d844d355 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
Y
Yuvakumar Selvamani committed
509ced5b5bc5ffe13b39e30053102d37e44868b2
Parent: a72a21d