summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2019-04-02 16:00:09 +0530
committerEd Tanous <ed.tanous@intel.com>2019-04-05 20:30:42 +0000
commit474bfad586d7fdaffb9899c839ce6c4ab153eb7c (patch)
tree7f603bd028e9dfe52d028f4cb4c2930d9f49d536
parentf85837bf66a635b816e92c2fdd47dd43851f02cd (diff)
downloadbmcweb-474bfad586d7fdaffb9899c839ce6c4ab153eb7c.tar.gz
bmcweb-474bfad586d7fdaffb9899c839ce6c4ab153eb7c.zip
Add SerialConsole to Manager node
This commit adds SerialConsole property to the response JSON when doing a GET on the manager resource. The supported connection types are hard-coded. Tested: Performed a GET on the manager object to see the newly added properties: curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}:${port}/redfish/v1/Managers/bmc { "@odata.context": "/redfish/v1/$metadata#Manager.Manager", "@odata.id": "/redfish/v1/Managers/bmc", "@odata.type": "#Manager.v1_3_0.Manager", .... .... "SerialConsole": { "ConnectTypesSupported": [ "IPMI", "SSH" ], "ServiceEnabled": "true" }, .... .... } Ran Redfish service validator and ensured no new errors. The newly added properties PASS validation. Snippet of the verbose output from the validator: .... .... Manager.v1_0_0.Manager:SerialConsole value: OrderedDict([('ConnectTypesSupported', ['IPMI', 'SSH']), ('ServiceEnabled', True)]) <class 'collections.OrderedDict'> has Type: Manager.v1_0_0.SerialConsole complex is Optional ***going into Complex Manager.v1_0_0.SerialConsole:ConnectTypesSupported value: ['IPMI', 'SSH'] <class 'list'> has Type: Collection(Manager.v1_0_0.SerialConnectTypesSupported) enum is Optional permission OData.Permission/Read is Collection Success Success Manager.v1_0_0.ManagerService:ServiceEnabled value: True <class 'bool'> has Type: Edm.Boolean Edm.Boolean is Optional permission OData.Permission/ReadWrite Success Manager.v1_0_0.ManagerService:MaxConcurrentSessions value: n/a <class 'str'> has Type: Edm.Int64 Edm.Int64 is Optional prop Does not exist, skip... ***out of Complex .... .... Change-Id: I659501d5537bfb3eedc8cd2204be98fee742324d Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com>
-rw-r--r--redfish-core/lib/managers.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index e6e80a8..c73a218 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -972,6 +972,16 @@ class Manager : public Node
"GracefulRestart"};
res.jsonValue["DateTime"] = crow::utility::dateTimeNow();
+
+ // Fill in GraphicalConsole and SerialConsole info
+ res.jsonValue["SerialConsole"]["ServiceEnabled"] = true;
+ res.jsonValue["SerialConsole"]["ConnectTypesSupported"] = {"IPMI",
+ "SSH"};
+ // TODO (Santosh) : Uncomment when KVM support is in.
+ // res.jsonValue["GraphicalConsole"]["ServiceEnabled"] = true;
+ // res.jsonValue["GraphicalConsole"]["ConnectTypesSupported"] =
+ // {"KVMIP"};
+
res.jsonValue["Links"]["ManagerForServers@odata.count"] = 1;
res.jsonValue["Links"]["ManagerForServers"] = {
{{"@odata.id", "/redfish/v1/Systems/system"}}};
OpenPOWER on IntegriCloud