move non-threshold events into sensor namespace
Move the non-threshold events into the sensor namespace so they don't
include threshold in their interface name. These events are generic
sensor events and have no relation to threshold monitoring. I verified
in the openBMC code and there has been no user of these events for now,
hence they are safe to move.
Change-Id: I5aa6a5bdda04f520f842107c2e7a3537e04f821a
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/gen/xyz/openbmc_project/Sensor/meson.build b/gen/xyz/openbmc_project/Sensor/meson.build
index 911680e..55022b1 100644
--- a/gen/xyz/openbmc_project/Sensor/meson.build
+++ b/gen/xyz/openbmc_project/Sensor/meson.build
@@ -8,6 +8,28 @@
sdbusplus_current_path = 'xyz/openbmc_project/Sensor'
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Sensor__cpp'.underscorify(),
+ input: ['../../../../yaml/xyz/openbmc_project/Sensor.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/Sensor',
+ ],
+ install: should_generate_cpp,
+ install_dir: [false, get_option('includedir') / sdbusplus_current_path],
+ build_by_default: should_generate_cpp,
+)
+
generated_markdown += custom_target(
'xyz/openbmc_project/Sensor/Accuracy__markdown'.underscorify(),
input: [
diff --git a/gen/xyz/openbmc_project/meson.build b/gen/xyz/openbmc_project/meson.build
index 01c93d8..d9945bb 100644
--- a/gen/xyz/openbmc_project/meson.build
+++ b/gen/xyz/openbmc_project/meson.build
@@ -238,6 +238,50 @@
)
generated_markdown += custom_target(
+ 'xyz/openbmc_project/Sensor__markdown'.underscorify(),
+ input: ['../../../yaml/xyz/openbmc_project/Sensor.events.yaml'],
+ output: ['Sensor.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/Sensor',
+ ],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
+)
+
+generated_registry += custom_target(
+ 'xyz/openbmc_project/Sensor__registry'.underscorify(),
+ input: ['../../../yaml/xyz/openbmc_project/Sensor.events.yaml'],
+ output: ['Sensor.json'],
+ depend_files: sdbusplusplus_depfiles,
+ command: [
+ sdbuspp_gen_meson_prog,
+ '--command',
+ 'registry',
+ '--output',
+ meson.current_build_dir(),
+ '--tool',
+ sdbusplusplus_prog,
+ '--directory',
+ meson.current_source_dir() / '../../../yaml',
+ 'xyz/openbmc_project/Sensor',
+ ],
+ install: should_generate_registry,
+ install_dir: [inst_registry_dir / sdbusplus_current_path],
+ build_by_default: should_generate_registry,
+)
+
+generated_markdown += custom_target(
'xyz/openbmc_project/Time__markdown'.underscorify(),
input: ['../../../yaml/xyz/openbmc_project/Time.errors.yaml'],
output: ['Time.md'],
diff --git a/yaml/xyz/openbmc_project/Sensor.events.yaml b/yaml/xyz/openbmc_project/Sensor.events.yaml
new file mode 100644
index 0000000..44e6560
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Sensor.events.yaml
@@ -0,0 +1,31 @@
+version: 1.0.0
+
+errors:
+ - name: InvalidSensorReading
+ severity: warning
+ errno: EIO
+ metadata:
+ - name: SensorName
+ description: The name or identifier of the sensor.
+ type: object_path
+ primary: true
+ redfish-mapping: SensorEvent.InvalidSensorReading
+
+ - name: SensorFailure
+ severity: critical
+ errno: EIO
+ metadata:
+ - name: SensorName
+ description: The name or identifier of the sensor.
+ type: object_path
+ primary: true
+ redfish-mapping: SensorEvent.SensorFailure
+
+events:
+ - name: SensorRestored
+ metadata:
+ - name: SensorName
+ description: The name or identifier of the sensor.
+ type: object_path
+ primary: true
+ redfish-mapping: SensorEvent.SensorRestored
diff --git a/yaml/xyz/openbmc_project/Sensor/Threshold.events.yaml b/yaml/xyz/openbmc_project/Sensor/Threshold.events.yaml
index db930d6..85d24ee 100644
--- a/yaml/xyz/openbmc_project/Sensor/Threshold.events.yaml
+++ b/yaml/xyz/openbmc_project/Sensor/Threshold.events.yaml
@@ -1,16 +1,6 @@
-version: 1.1.0
+version: 1.2.0
errors:
- - name: InvalidSensorReading
- severity: warning
- errno: EIO
- metadata:
- - name: SensorName
- description: The name or identifier of the sensor.
- type: object_path
- primary: true
- redfish-mapping: SensorEvent.InvalidSensorReading
-
- name: ReadingAboveLowerCriticalThreshold
severity: warning
errno: ERANGE
@@ -417,16 +407,6 @@
primary: true
redfish-mapping: SensorEvent.ReadingNoLongerCritical
- - name: SensorFailure
- severity: critical
- errno: EIO
- metadata:
- - name: SensorName
- description: The name or identifier of the sensor.
- type: object_path
- primary: true
- redfish-mapping: SensorEvent.SensorFailure
-
events:
- name: SensorReadingNormalRange
metadata:
@@ -443,11 +423,3 @@
type: enum[xyz.openbmc_project.Sensor.Value.Unit]
primary: true
redfish-mapping: SensorEvent.SensorReadingNormalRange
-
- - name: SensorRestored
- metadata:
- - name: SensorName
- description: The name or identifier of the sensor.
- type: object_path
- primary: true
- redfish-mapping: SensorEvent.SensorRestored