blob: eaba041d5f9c750b5419808e9d4cde483318023e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
From dab4adbf211b6867f86fcf6080b34a0e41f6f4a1 Mon Sep 17 00:00:00 2001
From: Karol Wachowski <karol.wachowski@intel.com>
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 <karol.wachowski@intel.com>
---
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 188248a..f477f63 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -95,6 +95,7 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface,
BMCWEB_LOG_DEBUG << "Value Active not found";
return;
}
+ aResp->res.jsonValue["Inserted"] = *activeValue;
const std::string* endpointIdValue =
std::get_if<std::string>(&endpointIdProperty->second);
@@ -106,7 +107,6 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface,
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";
@@ -137,7 +137,6 @@ static void vmParseInterfaceObject(const DbusInterfaceType& interface,
}
aResp->res.jsonValue["Image"] = *imageUrlValue;
- aResp->res.jsonValue["Inserted"] = *activeValue;
aResp->res.jsonValue["TransferProtocolType"] =
getTransferProtocolTypeFromUri(*imageUrlValue);
|