From b5e4edfc26eec245427d3435de9acaa9363ae836 Mon Sep 17 00:00:00 2001 From: Jayaprakash Mutyala Date: Mon, 28 Dec 2020 18:55:57 +0000 Subject: [PATCH] managers: add attributes for Manager.CommandShell Issue: ConnectTypesSupported, ServiceEnabled and MaxConcurrentSessions Attributes are missing for Manager.CommandShell, though Requirement mandates it. Fix: Added missing attributes to Manager.CommandShell Tested: 1. Verified redfish validator passed 2. Get bmc details from Redfish Redfish URI: https:///redfish/v1/Managers/bmc Response: { "@odata.id": "/redfish/v1/Managers/bmc", "@odata.type": "#Manager.v1_9_0.Manager", .... .... "CommandShell": { "ConnectTypesSupported": [ "SSH", "IPMI" ], "MaxConcurrentSessions": 4, "ServiceEnabled": true }, .... .... Signed-off-by: Jayaprakash Mutyala --- redfish-core/lib/managers.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp index 67f8d99..dcbc347 100644 --- a/redfish-core/lib/managers.hpp +++ b/redfish-core/lib/managers.hpp @@ -1830,6 +1830,13 @@ class Manager : public Node asyncResp->res.jsonValue["SerialConsole"]["MaxConcurrentSessions"] = 15; asyncResp->res.jsonValue["SerialConsole"]["ConnectTypesSupported"] = { "IPMI", "SSH"}; + + // Fill in CommandShell info + asyncResp->res.jsonValue["CommandShell"]["ServiceEnabled"] = true; + asyncResp->res.jsonValue["CommandShell"]["MaxConcurrentSessions"] = 4; + asyncResp->res.jsonValue["CommandShell"]["ConnectTypesSupported"] = { + "SSH", "IPMI"}; + #ifdef BMCWEB_ENABLE_KVM // Fill in GraphicalConsole info asyncResp->res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true; @@ -2272,7 +2279,7 @@ class Manager : public Node } std::string uuid; -}; +}; // namespace redfish class ManagerCollection : public Node { -- 2.17.1