summaryrefslogtreecommitdiff
path: root/redfish-core/lib/network_protocol.hpp
diff options
context:
space:
mode:
authorJayaprakash Mutyala <mutyalax.jayaprakash@intel.com>2020-06-24 03:28:09 +0300
committerAppaRao Puli <apparao.puli@linux.intel.com>2020-07-01 20:43:08 +0300
commit0870f8c7250c84c747f40363fe8cf337cff49549 (patch)
tree6eddbc2779253043349dcfd38afd89e9c8c337ca /redfish-core/lib/network_protocol.hpp
parent6f115bbbfdf9d45bad404bf88fc4fe2ffa745a9e (diff)
downloadbmcweb-0870f8c7250c84c747f40363fe8cf337cff49549.tar.xz
network_protocol: Fix for SSH port
Issue: As per the OCP Redfish Profile v1.0 specification, SSH read only parameter. By default SSH is disable, but ProtocolEnabled and Port attributes are mandatory to display in Redfish. But Port property is not displayed in Redfish URI. Fix: As Port attribute is mandatory for SSH property, initialized with null. Tested: 1. Verified redfish validator passed 2. Verified details from Redfish GET: https://<BMC-IP>/redfish/v1/Managers/bmc/NetworkProtocol Before: Response: "SSH": { "ProtocolEnabled": false }, After: "SSH": { "Port": null, "ProtocolEnabled": false }, Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Change-Id: I203b321c3b41bab2017e7c6b5e55aa3463ea6e83
Diffstat (limited to 'redfish-core/lib/network_protocol.hpp')
-rw-r--r--redfish-core/lib/network_protocol.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/redfish-core/lib/network_protocol.hpp b/redfish-core/lib/network_protocol.hpp
index e5448f183c..b32fde10b9 100644
--- a/redfish-core/lib/network_protocol.hpp
+++ b/redfish-core/lib/network_protocol.hpp
@@ -230,6 +230,8 @@ class NetworkProtocol : public Node
for (auto& protocol : protocolToDBus)
{
+ asyncResp->res.jsonValue[protocol.first]["Port"] =
+ nlohmann::detail::value_t::null;
asyncResp->res.jsonValue[protocol.first]["ProtocolEnabled"] = false;
}