add cable connected & not-connected event
Add the event to be generated when an expected cable is connected and
not connected to a specific port.
Change-Id: I9991372c53a25e4480d1944cd91006ec8850fc33
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/gen/xyz/openbmc_project/State/Cable/meson.build b/gen/xyz/openbmc_project/State/Cable/meson.build
new file mode 100644
index 0000000..fb697db
--- /dev/null
+++ b/gen/xyz/openbmc_project/State/Cable/meson.build
@@ -0,0 +1,15 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/State/Cable__cpp'.underscorify(),
+ input: [ '../../../../../yaml/xyz/openbmc_project/State/Cable.events.yaml', ],
+ output: [ 'event.cpp', 'event.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/State/Cable',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/State/meson.build b/gen/xyz/openbmc_project/State/meson.build
index c425d79..3115b3c 100644
--- a/gen/xyz/openbmc_project/State/meson.build
+++ b/gen/xyz/openbmc_project/State/meson.build
@@ -30,6 +30,21 @@
)
subdir('Boot')
+subdir('Cable')
+generated_others += custom_target(
+ 'xyz/openbmc_project/State/Cable__markdown'.underscorify(),
+ input: [ '../../../../yaml/xyz/openbmc_project/State/Cable.events.yaml', ],
+ output: [ 'Cable.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/State/Cable',
+ ],
+)
+
subdir('Chassis')
generated_others += custom_target(
'xyz/openbmc_project/State/Chassis__markdown'.underscorify(),
diff --git a/yaml/xyz/openbmc_project/State/Cable.events.yaml b/yaml/xyz/openbmc_project/State/Cable.events.yaml
new file mode 100644
index 0000000..75f9a62
--- /dev/null
+++ b/yaml/xyz/openbmc_project/State/Cable.events.yaml
@@ -0,0 +1,26 @@
+version: 1.0.0
+
+errors:
+ - name: CableDisconnected
+ severity: warning
+ metadata:
+ - name: PortId
+ type: string
+ primary: true
+ description: The port where an expected cable is not connected.
+ en:
+ description: An expected cable is not connected.
+ message: An expected cable on port {PortId} is not connected.
+ resolution: Check and fix cable connections.
+ errno: ENODEV
+
+events:
+ - name: CableConnected
+ metadata:
+ - name: PortId
+ type: string
+ primary: true
+ description: The port where an expected cable is connected.
+ en:
+ description: An expected cable is connected.
+ message: An expected cable on port {PortId} is connected.