From 89ca38dbc3433b3b734a20068e599809f3bd7b90 Mon Sep 17 00:00:00 2001 From: Karol Wachowski Date: Tue, 23 Feb 2021 15:53:16 +0000 Subject: [PATCH] Set Inserted redfish property for not inserted resources Tested: Verified that Inserted property is returned and set to "false" for not inserted media. Signed-off-by: Karol Wachowski --- redfish-core/lib/virtual_media.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp index 3e28164..4c475b7 100644 --- a/redfish-core/lib/virtual_media.hpp +++ b/redfish-core/lib/virtual_media.hpp @@ -96,6 +96,7 @@ static void BMCWEB_LOG_DEBUG << "Value Active not found"; return; } + aResp->res.jsonValue["Inserted"] = *activeValue; const std::string* endpointIdValue = std::get_if(&endpointIdProperty->second); @@ -107,7 +108,6 @@ static void aResp->res.jsonValue["Oem"]["OpenBMC"]["WebSocketEndpoint"] = *endpointIdValue; aResp->res.jsonValue["TransferProtocolType"] = "OEM"; - aResp->res.jsonValue["Inserted"] = *activeValue; if (*activeValue == true) { aResp->res.jsonValue["ConnectedVia"] = "Applet"; @@ -138,7 +138,6 @@ static void } aResp->res.jsonValue["Image"] = *imageUrlValue; - aResp->res.jsonValue["Inserted"] = *activeValue; aResp->res.jsonValue["TransferProtocolType"] = getTransferProtocolTypeFromUri(*imageUrlValue); -- 2.17.1