Add a new interface for ThermalDirection
This (xyz.openbmc_project.Inventory.Decorator.ThermalDirection)
interface will provide the general direction of the thermal
management path through the chassis. It will indicate the
airflow direction of the chassis.
This patch is referred based on the below bmcweb patch.
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/61603
Tested: Tested and verified the interface with client and
server file creation.
Change-Id: I4620def4cf9e2401a531495caa8e25e589fe576d
Signed-off-by: Jayashree Dhanapal <jayashree-d@hcl.com>
diff --git a/gen/xyz/openbmc_project/Inventory/Decorator/ThermalDirection/meson.build b/gen/xyz/openbmc_project/Inventory/Decorator/ThermalDirection/meson.build
new file mode 100644
index 0000000..59c94d6
--- /dev/null
+++ b/gen/xyz/openbmc_project/Inventory/Decorator/ThermalDirection/meson.build
@@ -0,0 +1,15 @@
+# Generated file; do not modify.
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Inventory/Decorator/ThermalDirection__cpp'.underscorify(),
+ input: [ '../../../../../../yaml/xyz/openbmc_project/Inventory/Decorator/ThermalDirection.interface.yaml', ],
+ output: [ '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/Inventory/Decorator/ThermalDirection',
+ ],
+)
+
diff --git a/gen/xyz/openbmc_project/Inventory/Decorator/meson.build b/gen/xyz/openbmc_project/Inventory/Decorator/meson.build
index 9dcc20c..7a1f970 100644
--- a/gen/xyz/openbmc_project/Inventory/Decorator/meson.build
+++ b/gen/xyz/openbmc_project/Inventory/Decorator/meson.build
@@ -209,6 +209,21 @@
],
)
+subdir('ThermalDirection')
+generated_others += custom_target(
+ 'xyz/openbmc_project/Inventory/Decorator/ThermalDirection__markdown'.underscorify(),
+ input: [ '../../../../../yaml/xyz/openbmc_project/Inventory/Decorator/ThermalDirection.interface.yaml', ],
+ output: [ 'ThermalDirection.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/Inventory/Decorator/ThermalDirection',
+ ],
+)
+
subdir('UniqueIdentifier')
generated_others += custom_target(
'xyz/openbmc_project/Inventory/Decorator/UniqueIdentifier__markdown'.underscorify(),
diff --git a/yaml/xyz/openbmc_project/Inventory/Decorator/ThermalDirection.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Decorator/ThermalDirection.interface.yaml
new file mode 100644
index 0000000..bd534b0
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Inventory/Decorator/ThermalDirection.interface.yaml
@@ -0,0 +1,34 @@
+description: >
+ Indicates the thermal management path through the chassis. This decorator
+ should only be added to xyz.openbmc_project.Inventory.Item.Chassis
+ instances.
+properties:
+ - name: Direction
+ type: enum[self.Direction]
+ default: Unknown
+ description: >
+ This property shall indicate the general direction of the thermal
+ management path through the chassis.
+
+enumerations:
+ - name: Direction
+ description: >
+ Possible airflow direction
+ values:
+ - name: BackToFront
+ description: >
+ A chassis with the air intake in the back and exhaust out the
+ front.
+ - name: FrontToBack
+ description: >
+ A chassis with the air intake in the front and exhaust out the
+ back.
+ - name: Sealed
+ description: >
+ A sealed chassis with no air pathway.
+ - name: TopExhaust
+ description: >
+ A chassis with air exhaust on the top.
+ - name: Unknown
+ description: >
+ A default type for Airflow direction.