Add a new dbus interface to get list of consoles

The "xyz.openbmc_project.Console.Access" interface will provide a
single property containing the name of the abstract socket for the
object hosting the interface. The caller can use mapper function to
find the list of registered consoles.  The bmcweb can exploit this
interface by putting console for each console object.

The SocketName attribute provides unix abstract socket name and it's
first character is always null, the attribute type is an array of bytes
types instead of string type. The byte array does not include a null
terminator.

For example, object path and property exposed for host console is as
follows:
Object:
    /xyz/openbmc_project/console/host
Property:
    SocketName  -> "\0obmc-console.host"

The tree for console0:
$ busctl tree xyz.openbmc_project.Console.console0
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/console
      `-/xyz/openbmc_project/console/console0

The introspect for console0:
busctl introspect xyz.openbmc_project.Console.console0 /xyz/openbmc_project/console/console0
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 -         -                                        -
.SocketName                         property  ay        22 0 111 98 109 99 45 99 111 110 115 ... -

   Related commits:
        1) phosphor-dbus-interface: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/61486
        2) obmc-console: https://gerrit.openbmc.org/c/openbmc/obmc-console/+/62496
        3) bmcweb: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/62525

Change-Id: Ic50d311b327d9a4d917e4656af3ebeebfe95b5c9
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
diff --git a/gen/xyz/openbmc_project/Console/Access/meson.build b/gen/xyz/openbmc_project/Console/Access/meson.build
new file mode 100644
index 0000000..6065443
--- /dev/null
+++ b/gen/xyz/openbmc_project/Console/Access/meson.build
@@ -0,0 +1,15 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+    'xyz/openbmc_project/Console/Access__cpp'.underscorify(),
+    input: [ '../../../../../yaml/xyz/openbmc_project/Console/Access.interface.yaml',  ],
+    output: [ 'common.hpp', 'server.cpp', 'server.hpp', 'client.hpp',  ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'cpp',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../yaml',
+        'xyz/openbmc_project/Console/Access',
+    ],
+)
+
diff --git a/gen/xyz/openbmc_project/Console/meson.build b/gen/xyz/openbmc_project/Console/meson.build
new file mode 100644
index 0000000..47f5fad
--- /dev/null
+++ b/gen/xyz/openbmc_project/Console/meson.build
@@ -0,0 +1,16 @@
+# Generated file; do not modify.
+subdir('Access')
+generated_others += custom_target(
+    'xyz/openbmc_project/Console/Access__markdown'.underscorify(),
+    input: [ '../../../../yaml/xyz/openbmc_project/Console/Access.interface.yaml',  ],
+    output: [ 'Access.md' ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'markdown',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../yaml',
+        'xyz/openbmc_project/Console/Access',
+    ],
+)
+
diff --git a/gen/xyz/openbmc_project/meson.build b/gen/xyz/openbmc_project/meson.build
index 72ce0bc..9a092ad 100644
--- a/gen/xyz/openbmc_project/meson.build
+++ b/gen/xyz/openbmc_project/meson.build
@@ -49,6 +49,7 @@
 )
 
 subdir('Condition')
+subdir('Console')
 subdir('Control')
 subdir('Dump')
 subdir('HardwareIsolation')
diff --git a/yaml/xyz/openbmc_project/Console/Access.interface.yaml b/yaml/xyz/openbmc_project/Console/Access.interface.yaml
new file mode 100644
index 0000000..9991218
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Console/Access.interface.yaml
@@ -0,0 +1,16 @@
+description: >
+    Provides properties for supported consoles in the system.
+
+properties:
+    - name: SocketName
+      type: array[byte]
+      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