Added Connect() method in console DBUS interface
The "xyz.openbmc_project.Console.Access" interface is updated to add new
method called Connect(). This method returns the unix socket file
descriptor. The consumer can use this file descriptor to receive the
console data. The leaf node in the object path is a console id.
Also, the "SocketName" property is deprecated and removed to avoid
exposing implementation details about the console.
The tree for the "default" console id.
$ busctl tree xyz.openbmc_project.Console.default
`-/xyz
`-/xyz/openbmc_project
`-/xyz/openbmc_project/console
`-/xyz/openbmc_project/console/default
The introspect for the "default" console id.
$ busctl introspect xyz.openbmc_project.Console.default \
/xyz/openbmc_project/console/default
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Console.Access interface - - -
.Connect method - h -
Change-Id: I52472320de0990dcf0e802add87141a97288085c
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
diff --git a/yaml/xyz/openbmc_project/Console/Access.interface.yaml b/yaml/xyz/openbmc_project/Console/Access.interface.yaml
index 9991218..3e285a5 100644
--- a/yaml/xyz/openbmc_project/Console/Access.interface.yaml
+++ b/yaml/xyz/openbmc_project/Console/Access.interface.yaml
@@ -1,16 +1,17 @@
description: >
- Provides properties for supported consoles in the system.
+ Provides methods for supported consoles in the system. This interface should
+ be used to retrieve the console data.
-properties:
- - name: SocketName
- type: array[byte]
+methods:
+ - name: Connect
description: >
- Unix socket identifier for a console. This is used by a process like
- bmcweb to put consoles, most likely host serial consoles, out on
- WebSocket Secure (wss).
-
- This attribute provides unix abstract socket name and its first
- character is always null hence the attribute type is an array of bytes
- instead of string. The byte array does not include a null terminator.
- flags:
- - readonly
+ Returns the unix socket file descriptor. The consumer can user this
+ descriptor to read the console data.
+ returns:
+ - name: fd
+ type: unixfd
+ description: >
+ The file descriptor to the unix socket.
+ errors:
+ - xyz.openbmc_project.Common.Error.InternalFailure
+ - xyz.openbmc_project.User.Common.Error.NoResource