meta-quanta: olympus-nuvoton: inventory: add assocations
Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Change-Id: Idd9df47b58e5686e424ff385d47c4e765032c03d
diff --git a/meta-olympus-nuvoton/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json b/meta-olympus-nuvoton/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json
new file mode 100644
index 0000000..1119d68
--- /dev/null
+++ b/meta-olympus-nuvoton/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json
@@ -0,0 +1,330 @@
+[
+ {
+ "path": "system/chassis/motherboard/powersupply0",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/power/ps0_input_power",
+ "/xyz/openbmc_project/sensors/power/ps0_output_power",
+ "/xyz/openbmc_project/sensors/voltage/ps0_input_voltage",
+ "/xyz/openbmc_project/sensors/voltage/ps0_output_voltage",
+ "/xyz/openbmc_project/sensors/fan_tach/ps0_fan1",
+ "/xyz/openbmc_project/sensors/fan_tach/ps0_fan2",
+ "/xyz/openbmc_project/sensors/temperature/ps0_tempture"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/powersupply1",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/power/ps1_input_power",
+ "/xyz/openbmc_project/sensors/power/ps1_output_power",
+ "/xyz/openbmc_project/sensors/voltage/ps1_input_voltage",
+ "/xyz/openbmc_project/sensors/voltage/ps1_output_voltage",
+ "/xyz/openbmc_project/sensors/fan_tach/ps1_fan1",
+ "/xyz/openbmc_project/sensors/fan_tach/ps1_fan2",
+ "/xyz/openbmc_project/sensors/temperature/ps1_tempture"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/fan",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/fan_tach/fan1",
+ "/xyz/openbmc_project/sensors/fan_tach/fan2",
+ "/xyz/openbmc_project/sensors/fan_tach/fan3",
+ "/xyz/openbmc_project/sensors/fan_tach/fan4",
+ "/xyz/openbmc_project/sensors/fan_tach/fan5",
+ "/xyz/openbmc_project/sensors/fan_tach/fan6"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "/system/chassis/motherboard/management_card/bmc",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/temperature/bmc_card"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "leds"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/led/physical/heartbeat"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/temperature/inlet",
+ "/xyz/openbmc_project/sensors/temperature/outlet",
+ "/xyz/openbmc_project/sensors/temperature/p0_dimm_vr0_temp",
+ "/xyz/openbmc_project/sensors/temperature/p0_dimm_vr1_temp",
+ "/xyz/openbmc_project/sensors/temperature/p0_vccin_vr_temp",
+ "/xyz/openbmc_project/sensors/temperature/p0_vccio_vr_temp",
+ "/xyz/openbmc_project/sensors/temperature/p1_dimm_vr0_temp",
+ "/xyz/openbmc_project/sensors/temperature/p1_dimm_vr1_temp",
+ "/xyz/openbmc_project/sensors/temperature/p1_vccin_vr_temp",
+ "/xyz/openbmc_project/sensors/temperature/p1_vccio_vr_temp",
+ "/xyz/openbmc_project/sensors/voltage/P12V_STBY",
+ "/xyz/openbmc_project/sensors/voltage/P1V05_STBY_PCH",
+ "/xyz/openbmc_project/sensors/voltage/P3V3",
+ "/xyz/openbmc_project/sensors/voltage/P3V3_STBY",
+ "/xyz/openbmc_project/sensors/voltage/P3V_BAT",
+ "/xyz/openbmc_project/sensors/voltage/P5V",
+ "/xyz/openbmc_project/sensors/voltage/P5V_STBY",
+ "/xyz/openbmc_project/sensors/voltage/PVNN_STBY_PCH",
+ "/xyz/openbmc_project/sensors/voltage/p0_dimm_vr0_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p0_dimm_vr1_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p0_vccin_vr_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p0_vccio_vr_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p1_dimm_vr0_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p1_dimm_vr1_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p1_vccin_vr_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p1_vccio_vr_voltage",
+ "/xyz/openbmc_project/sensors/power/p0_dimm_vr0_pin",
+ "/xyz/openbmc_project/sensors/power/p0_dimm_vr0_pout",
+ "/xyz/openbmc_project/sensors/power/p0_dimm_vr1_pin",
+ "/xyz/openbmc_project/sensors/power/p0_dimm_vr1_pout",
+ "/xyz/openbmc_project/sensors/power/p0_vccin_vr_pin",
+ "/xyz/openbmc_project/sensors/power/p0_vccin_vr_pout",
+ "/xyz/openbmc_project/sensors/power/p0_vccio_vr_pin",
+ "/xyz/openbmc_project/sensors/power/p0_vccio_vr_pout",
+ "/xyz/openbmc_project/sensors/power/p1_dimm_vr0_pin",
+ "/xyz/openbmc_project/sensors/power/p1_dimm_vr0_pout",
+ "/xyz/openbmc_project/sensors/power/p1_dimm_vr1_pin",
+ "/xyz/openbmc_project/sensors/power/p1_dimm_vr1_pout",
+ "/xyz/openbmc_project/sensors/power/p1_vccin_vr_pin",
+ "/xyz/openbmc_project/sensors/power/p1_vccin_vr_pout",
+ "/xyz/openbmc_project/sensors/power/p1_vccio_vr_pin",
+ "/xyz/openbmc_project/sensors/power/p1_vccio_vr_pout",
+ "/xyz/openbmc_project/sensors/power/total_power",
+ "/xyz/openbmc_project/sensors/power/cpu_power",
+ "/xyz/openbmc_project/sensors/power/memory_power",
+ "/xyz/openbmc_project/sensors/current/p0_dimm_vr0_current",
+ "/xyz/openbmc_project/sensors/current/p0_dimm_vr0_lin",
+ "/xyz/openbmc_project/sensors/current/p0_dimm_vr1_current",
+ "/xyz/openbmc_project/sensors/current/p0_dimm_vr1_lin",
+ "/xyz/openbmc_project/sensors/current/p0_vccin_vr_current",
+ "/xyz/openbmc_project/sensors/current/p0_vccio_vr_current",
+ "/xyz/openbmc_project/sensors/current/p1_dimm_vr0_current",
+ "/xyz/openbmc_project/sensors/current/p1_dimm_vr0_lin",
+ "/xyz/openbmc_project/sensors/current/p1_dimm_vr1_current",
+ "/xyz/openbmc_project/sensors/current/p1_dimm_vr1_lin",
+ "/xyz/openbmc_project/sensors/current/p1_vccin_vr_current",
+ "/xyz/openbmc_project/sensors/current/p1_vccio_vr_current"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu0",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/temperature/Core_0_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_1_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_2_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_3_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_4_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_5_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Die_CPU0"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/motherboard/cpu1",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/temperature/Core_0_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_1_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_2_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_3_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_4_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_5_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Die_CPU0"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "chassis",
+ "fType": "all_sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/temperature/inlet",
+ "/xyz/openbmc_project/sensors/temperature/outlet",
+ "/xyz/openbmc_project/sensors/temperature/bmc_card",
+ "/xyz/openbmc_project/sensors/temperature/p0_dimm_vr0_temp",
+ "/xyz/openbmc_project/sensors/temperature/p0_dimm_vr1_temp",
+ "/xyz/openbmc_project/sensors/temperature/p0_vccin_vr_temp",
+ "/xyz/openbmc_project/sensors/temperature/p0_vccio_vr_temp",
+ "/xyz/openbmc_project/sensors/temperature/p1_dimm_vr0_temp",
+ "/xyz/openbmc_project/sensors/temperature/p1_dimm_vr1_temp",
+ "/xyz/openbmc_project/sensors/temperature/p1_vccin_vr_temp",
+ "/xyz/openbmc_project/sensors/temperature/p1_vccio_vr_temp",
+ "/xyz/openbmc_project/sensors/temperature/ps0_tempture",
+ "/xyz/openbmc_project/sensors/temperature/ps1_tempture",
+ "/xyz/openbmc_project/sensors/voltage/P12V_STBY",
+ "/xyz/openbmc_project/sensors/voltage/P1V05_STBY_PCH",
+ "/xyz/openbmc_project/sensors/voltage/P3V3",
+ "/xyz/openbmc_project/sensors/voltage/P3V3_STBY",
+ "/xyz/openbmc_project/sensors/voltage/P3V_BAT",
+ "/xyz/openbmc_project/sensors/voltage/P5V",
+ "/xyz/openbmc_project/sensors/voltage/P5V_STBY",
+ "/xyz/openbmc_project/sensors/voltage/PVNN_STBY_PCH",
+ "/xyz/openbmc_project/sensors/voltage/p0_dimm_vr0_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p0_dimm_vr1_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p0_vccin_vr_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p0_vccio_vr_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p1_dimm_vr0_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p1_dimm_vr1_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p1_vccin_vr_voltage",
+ "/xyz/openbmc_project/sensors/voltage/p1_vccio_vr_voltage",
+ "/xyz/openbmc_project/sensors/power/p0_dimm_vr0_pin",
+ "/xyz/openbmc_project/sensors/power/p0_dimm_vr0_pout",
+ "/xyz/openbmc_project/sensors/power/p0_dimm_vr1_pin",
+ "/xyz/openbmc_project/sensors/power/p0_dimm_vr1_pout",
+ "/xyz/openbmc_project/sensors/power/p0_vccin_vr_pin",
+ "/xyz/openbmc_project/sensors/power/p0_vccin_vr_pout",
+ "/xyz/openbmc_project/sensors/power/p0_vccio_vr_pin",
+ "/xyz/openbmc_project/sensors/power/p0_vccio_vr_pout",
+ "/xyz/openbmc_project/sensors/power/p1_dimm_vr0_pin",
+ "/xyz/openbmc_project/sensors/power/p1_dimm_vr0_pout",
+ "/xyz/openbmc_project/sensors/power/p1_dimm_vr1_pin",
+ "/xyz/openbmc_project/sensors/power/p1_dimm_vr1_pout",
+ "/xyz/openbmc_project/sensors/power/p1_vccin_vr_pin",
+ "/xyz/openbmc_project/sensors/power/p1_vccin_vr_pout",
+ "/xyz/openbmc_project/sensors/power/p1_vccio_vr_pin",
+ "/xyz/openbmc_project/sensors/power/p1_vccio_vr_pout",
+ "/xyz/openbmc_project/sensors/current/p0_dimm_vr0_current",
+ "/xyz/openbmc_project/sensors/current/p0_dimm_vr0_lin",
+ "/xyz/openbmc_project/sensors/current/p0_dimm_vr1_current",
+ "/xyz/openbmc_project/sensors/current/p0_dimm_vr1_lin",
+ "/xyz/openbmc_project/sensors/current/p0_vccin_vr_current",
+ "/xyz/openbmc_project/sensors/current/p0_vccio_vr_current",
+ "/xyz/openbmc_project/sensors/current/p1_dimm_vr0_current",
+ "/xyz/openbmc_project/sensors/current/p1_dimm_vr0_lin",
+ "/xyz/openbmc_project/sensors/current/p1_dimm_vr1_current",
+ "/xyz/openbmc_project/sensors/current/p1_dimm_vr1_lin",
+ "/xyz/openbmc_project/sensors/current/p1_vccin_vr_current",
+ "/xyz/openbmc_project/sensors/current/p1_vccio_vr_current",
+ "/xyz/openbmc_project/sensors/fan_tach/fan1",
+ "/xyz/openbmc_project/sensors/fan_tach/fan2",
+ "/xyz/openbmc_project/sensors/fan_tach/fan3",
+ "/xyz/openbmc_project/sensors/fan_tach/fan4",
+ "/xyz/openbmc_project/sensors/fan_tach/fan5",
+ "/xyz/openbmc_project/sensors/fan_tach/fan6",
+ "/xyz/openbmc_project/sensors/fan_tach/ps0_fan1",
+ "/xyz/openbmc_project/sensors/fan_tach/ps0_fan2",
+ "/xyz/openbmc_project/sensors/fan_tach/ps1_fan1",
+ "/xyz/openbmc_project/sensors/fan_tach/ps1_fan2",
+ "/xyz/openbmc_project/sensors/power/total_power",
+ "/xyz/openbmc_project/sensors/power/cpu_power",
+ "/xyz/openbmc_project/sensors/power/memory_power",
+ "/xyz/openbmc_project/sensors/voltage/ps0_input_voltage",
+ "/xyz/openbmc_project/sensors/voltage/ps0_output_voltage",
+ "/xyz/openbmc_project/sensors/power/ps0_input_power",
+ "/xyz/openbmc_project/sensors/power/ps0_output_power",
+ "/xyz/openbmc_project/sensors/current/ps0_input_current",
+ "/xyz/openbmc_project/sensors/current/ps0_output_current",
+ "/xyz/openbmc_project/sensors/power/ps1_input_power",
+ "/xyz/openbmc_project/sensors/power/ps1_output_power",
+ "/xyz/openbmc_project/sensors/current/ps1_input_current",
+ "/xyz/openbmc_project/sensors/voltage/ps1_input_voltage",
+ "/xyz/openbmc_project/sensors/current/ps1_output_current",
+ "/xyz/openbmc_project/sensors/voltage/ps1_output_voltage",
+ "/xyz/openbmc_project/sensors/temperature/Core_0_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_1_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_2_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_3_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_4_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_5_CPU1",
+ "/xyz/openbmc_project/sensors/temperature/Core_0_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_1_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_2_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_3_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_4_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Core_5_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/DIMM_C1_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Die_CPU0",
+ "/xyz/openbmc_project/sensors/temperature/Die_CPU1"
+ ]
+ }
+ ]
+ }
+]
diff --git a/meta-olympus-nuvoton/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend b/meta-olympus-nuvoton/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend
new file mode 100644
index 0000000..8ff6178
--- /dev/null
+++ b/meta-olympus-nuvoton/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend_olympus-nuvoton := "${THISDIR}/${PN}:"
+PACKAGECONFIG_append_olympus-nuvoton = " associations"
+SRC_URI_append_olympus-nuvoton = " file://associations.json"
+
+DEPENDS_append_olympus-nuvoton = " olympus-nuvoton-inventory-cleanup"
+
+do_install_append_olympus-nuvoton() {
+ install -d ${D}${base_datadir}
+ install -m 0755 ${WORKDIR}/associations.json ${D}${base_datadir}/associations.json
+}