valve: add inventory item
Add Valve as an inventory item with valve direction. The valves will be
used to control the coolant flow in case of liquid cooled systems.
Change-Id: I3d6d122270809de182a77fa31ee9dcc15e2537e8
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/gen/xyz/openbmc_project/Inventory/Item/Valve/meson.build b/gen/xyz/openbmc_project/Inventory/Item/Valve/meson.build
new file mode 100644
index 0000000..e3a95a6
--- /dev/null
+++ b/gen/xyz/openbmc_project/Inventory/Item/Valve/meson.build
@@ -0,0 +1,40 @@
+# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Inventory/Item/Valve'
+
+generated_sources += custom_target(
+ 'xyz/openbmc_project/Inventory/Item/Valve__cpp'.underscorify(),
+ input: [
+ '../../../../../../yaml/xyz/openbmc_project/Inventory/Item/Valve.interface.yaml',
+ ],
+ output: [
+ 'common.hpp',
+ 'server.hpp',
+ 'server.cpp',
+ 'aserver.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/Item/Valve',
+ ],
+ install: should_generate_cpp,
+ install_dir: [
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ false,
+ get_option('includedir') / sdbusplus_current_path,
+ get_option('includedir') / sdbusplus_current_path,
+ ],
+ build_by_default: should_generate_cpp,
+)
+
diff --git a/gen/xyz/openbmc_project/Inventory/Item/meson.build b/gen/xyz/openbmc_project/Inventory/Item/meson.build
index 91117de..41047af 100644
--- a/gen/xyz/openbmc_project/Inventory/Item/meson.build
+++ b/gen/xyz/openbmc_project/Inventory/Item/meson.build
@@ -28,6 +28,7 @@
subdir('System')
subdir('Tpm')
subdir('TrustedComponent')
+subdir('Valve')
subdir('Volume')
subdir('Vrm')
@@ -766,6 +767,30 @@
)
generated_markdown += custom_target(
+ 'xyz/openbmc_project/Inventory/Item/Valve__markdown'.underscorify(),
+ input: [
+ '../../../../../yaml/xyz/openbmc_project/Inventory/Item/Valve.interface.yaml',
+ ],
+ output: ['Valve.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/Item/Valve',
+ ],
+ install: should_generate_markdown,
+ install_dir: [inst_markdown_dir / sdbusplus_current_path],
+ build_by_default: should_generate_markdown,
+)
+
+generated_markdown += custom_target(
'xyz/openbmc_project/Inventory/Item/Volume__markdown'.underscorify(),
input: [
'../../../../../yaml/xyz/openbmc_project/Inventory/Item/Volume.interface.yaml',
diff --git a/yaml/xyz/openbmc_project/Inventory/Item/Valve.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Item/Valve.interface.yaml
new file mode 100644
index 0000000..9e94567
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Inventory/Item/Valve.interface.yaml
@@ -0,0 +1,29 @@
+description: >
+ Implement to provide Valve attributes. A valve helps control the flow of
+ coolant in a liquid cooling system.
+
+properties:
+ - name: Direction
+ type: enum[self.Direction]
+ default: Unknown
+ description: >
+ This property specifies the direction of the liquid flow for the
+ value.
+
+enumerations:
+ - name: Direction
+ description: >
+ This indicates the direction of liquid flow for the valve.
+ values:
+ - name: Supply
+ description: >
+ This indicates that the valve functions as the supply valve for
+ liquid flow.
+ - name: Return
+ description: >
+ This indicates that the valve functions as the return valve for
+ liquid flow.
+ - name: Unknown
+ description: >
+ This indicates the direction of liquid flow for valve is not
+ known.