From d133e7864a9c902125979003d6b65a8f9a1fdd78 Mon Sep 17 00:00:00 2001 From: George Hung Date: Tue, 15 Sep 2020 21:17:23 +0800 Subject: meta-quanta: gbs: add sensors associations for Redfish 1. add GBS sensors associations for Redfish 2. enable DBUS log service transactions through Redfish option (From meta-quanta rev: a271b5e4d39d8d57a453f7ea2e500d309241e250) Signed-off-by: George Hung Change-Id: If71fc9e9ec4f47b7dc78bb0940588e801e6e8c45 Signed-off-by: Andrew Geissler --- .../recipes-phosphor/interfaces/bmcweb_%.bbappend | 3 + .../inventory/inventory-cleanup.bb | 17 + .../inventory-cleanup/inventory-cleanup.yaml | 16 + .../phosphor-inventory-manager/associations.json | 487 +++++++++++++++++++++ .../phosphor-inventory-manager_%.bbappend | 9 + 5 files changed, 532 insertions(+) create mode 100755 meta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/inventory/inventory-cleanup.bb create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend (limited to 'meta-quanta') diff --git a/meta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend new file mode 100755 index 000000000..87ecf4fa3 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -0,0 +1,3 @@ +EXTRA_OECMAKE_append_gbs = " \ + -DBMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES=ON \ + " diff --git a/meta-quanta/meta-gbs/recipes-phosphor/inventory/inventory-cleanup.bb b/meta-quanta/meta-gbs/recipes-phosphor/inventory/inventory-cleanup.bb new file mode 100644 index 000000000..0c4b56f72 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/inventory/inventory-cleanup.bb @@ -0,0 +1,17 @@ +SUMMARY = "Copy the inventory cleanup yaml for inventory manager" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit allarch +inherit phosphor-inventory-manager + +S = "${WORKDIR}" + +SRC_URI = "file://inventory-cleanup.yaml" + +do_install() { + install -D inventory-cleanup.yaml ${D}${base_datadir}/events.d/inventory-cleanup.yaml +} + +FILES_${PN} += "${base_datadir}/events.d/inventory-cleanup.yaml" diff --git a/meta-quanta/meta-gbs/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml b/meta-quanta/meta-gbs/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml new file mode 100644 index 000000000..78e03fee0 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml @@ -0,0 +1,16 @@ +description: > + GBS inventory fixups + +events: + - name: Add Chassis interface + description: > + Add the chassis interface on the chassis inventory path + type: startup + actions: + - name: createObjects + objs: + /system/chassis: + xyz.openbmc_project.Inventory.Item.Chassis: + Type: + value: "RackMount" + type: string diff --git a/meta-quanta/meta-gbs/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json b/meta-quanta/meta-gbs/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json new file mode 100644 index 000000000..b834fa876 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json @@ -0,0 +1,487 @@ +[ + { + "path": "system/chassis/motherboard/nvme0", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme0" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme1", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme1" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme2", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme2" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme3", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme3" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme4", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme4" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme5", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme5" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme6", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme6" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme7", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme7" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme8", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme8" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme9", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme9" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme10", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme10" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme11", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme11" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme12", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme12" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme13", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme13" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme14", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme14" + ] + } + ] + }, + { + "path": "system/chassis/motherboard/nvme15", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/nvme15" + ] + } + ] + }, + { + "path": "system/chassis/fan", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/fan_tach/fan0", + "/xyz/openbmc_project/sensors/fan_tach/fan1", + "/xyz/openbmc_project/sensors/fan_tach/fb_fan0", + "/xyz/openbmc_project/sensors/fan_tach/fb_fan1", + "/xyz/openbmc_project/sensors/fan_tach/fb_fan2" + ] + } + ] + }, + { + "path": "system/chassis/motherboard", + "endpoints": + [ + { + "types": + { + "rType": "inventory", + "fType": "sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/i2cool_0", + "/xyz/openbmc_project/sensors/temperature/i2cool_1", + "/xyz/openbmc_project/sensors/temperature/i2cool_2", + "/xyz/openbmc_project/sensors/temperature/powerseq_temp", + "/xyz/openbmc_project/sensors/temperature/cputemp", + "/xyz/openbmc_project/sensors/temperature/nvme0", + "/xyz/openbmc_project/sensors/temperature/nvme1", + "/xyz/openbmc_project/sensors/temperature/nvme2", + "/xyz/openbmc_project/sensors/temperature/nvme3", + "/xyz/openbmc_project/sensors/temperature/nvme4", + "/xyz/openbmc_project/sensors/temperature/nvme5", + "/xyz/openbmc_project/sensors/temperature/nvme6", + "/xyz/openbmc_project/sensors/temperature/nvme7", + "/xyz/openbmc_project/sensors/temperature/nvme8", + "/xyz/openbmc_project/sensors/temperature/nvme9", + "/xyz/openbmc_project/sensors/temperature/nvme10", + "/xyz/openbmc_project/sensors/temperature/nvme11", + "/xyz/openbmc_project/sensors/temperature/nvme12", + "/xyz/openbmc_project/sensors/temperature/nvme13", + "/xyz/openbmc_project/sensors/temperature/nvme14", + "/xyz/openbmc_project/sensors/temperature/nvme15", + + "/xyz/openbmc_project/sensors/voltage/p1v8_stby", + "/xyz/openbmc_project/sensors/voltage/vddcr_soc_stby", + "/xyz/openbmc_project/sensors/voltage/p2v5_stby", + "/xyz/openbmc_project/sensors/voltage/p1v2_stby", + "/xyz/openbmc_project/sensors/voltage/p1v175_stby", + "/xyz/openbmc_project/sensors/voltage/p1v8", + "/xyz/openbmc_project/sensors/voltage/p3v3", + "/xyz/openbmc_project/sensors/voltage/pwrgd_pvpp", + "/xyz/openbmc_project/sensors/voltage/pwrgd_pvddio", + "/xyz/openbmc_project/sensors/voltage/pwrgd_cpuvr", + "/xyz/openbmc_project/sensors/voltage/p3v3_stby", + "/xyz/openbmc_project/sensors/voltage/p5v_stby", + "/xyz/openbmc_project/sensors/voltage/p3v_bat_adc", + + "/xyz/openbmc_project/sensors/voltage/vddcr_cpu_in", + "/xyz/openbmc_project/sensors/voltage/vddcr_cpu_out", + "/xyz/openbmc_project/sensors/current/vddcr_cpu_in", + "/xyz/openbmc_project/sensors/current/vddcr_cpu_out", + "/xyz/openbmc_project/sensors/temperature/vddcr_cpu", + + "/xyz/openbmc_project/sensors/voltage/vddcr_soc_in", + "/xyz/openbmc_project/sensors/voltage/vddcr_soc_out", + "/xyz/openbmc_project/sensors/current/vddcr_soc_in", + "/xyz/openbmc_project/sensors/current/vddcr_soc_out", + "/xyz/openbmc_project/sensors/temperature/vddcr_soc", + + "/xyz/openbmc_project/sensors/voltage/vddio_abcd_out", + "/xyz/openbmc_project/sensors/voltage/vddio_abcd_in", + "/xyz/openbmc_project/sensors/current/vddio_abcd_in", + "/xyz/openbmc_project/sensors/current/vddio_abcd_out", + "/xyz/openbmc_project/sensors/temperature/vddio_abcd", + + "/xyz/openbmc_project/sensors/voltage/vddio_efgh_out", + "/xyz/openbmc_project/sensors/voltage/vddio_efgh_in", + "/xyz/openbmc_project/sensors/current/vddio_efgh_in", + "/xyz/openbmc_project/sensors/current/vddio_efgh_out", + "/xyz/openbmc_project/sensors/temperature/vddio_efgh", + + "/xyz/openbmc_project/sensors/voltage/p12v_mobo_out", + "/xyz/openbmc_project/sensors/voltage/p12v_mobo_in", + "/xyz/openbmc_project/sensors/current/p12v_mobo_in", + "/xyz/openbmc_project/sensors/current/p12v_mobo_out", + "/xyz/openbmc_project/sensors/temperature/p12v_mobo", + + "/xyz/openbmc_project/sensors/voltage/p12v_fan_out", + "/xyz/openbmc_project/sensors/voltage/p12v_fan_in", + "/xyz/openbmc_project/sensors/current/p12v_fan_in", + "/xyz/openbmc_project/sensors/current/p12v_fan_out", + "/xyz/openbmc_project/sensors/temperature/p12v_fan", + + "/xyz/openbmc_project/sensors/voltage/hotswap_vin", + "/xyz/openbmc_project/sensors/voltage/hotswap_vout", + "/xyz/openbmc_project/sensors/current/hotswap_iout", + "/xyz/openbmc_project/sensors/power/hotswap_pout", + "/xyz/openbmc_project/sensors/temperature/hotswap" + ] + } + ] + }, + { + "path": "system/chassis", + "endpoints": + [ + { + "types": + { + "rType": "chassis", + "fType": "all_sensors" + }, + "paths": + [ + "/xyz/openbmc_project/sensors/temperature/i2cool_0", + "/xyz/openbmc_project/sensors/temperature/i2cool_1", + "/xyz/openbmc_project/sensors/temperature/i2cool_2", + "/xyz/openbmc_project/sensors/temperature/powerseq_temp", + "/xyz/openbmc_project/sensors/temperature/cputemp", + "/xyz/openbmc_project/sensors/temperature/nvme0", + "/xyz/openbmc_project/sensors/temperature/nvme1", + "/xyz/openbmc_project/sensors/temperature/nvme2", + "/xyz/openbmc_project/sensors/temperature/nvme3", + "/xyz/openbmc_project/sensors/temperature/nvme4", + "/xyz/openbmc_project/sensors/temperature/nvme5", + "/xyz/openbmc_project/sensors/temperature/nvme6", + "/xyz/openbmc_project/sensors/temperature/nvme7", + "/xyz/openbmc_project/sensors/temperature/nvme8", + "/xyz/openbmc_project/sensors/temperature/nvme9", + "/xyz/openbmc_project/sensors/temperature/nvme10", + "/xyz/openbmc_project/sensors/temperature/nvme11", + "/xyz/openbmc_project/sensors/temperature/nvme12", + "/xyz/openbmc_project/sensors/temperature/nvme13", + "/xyz/openbmc_project/sensors/temperature/nvme14", + "/xyz/openbmc_project/sensors/temperature/nvme15", + + "/xyz/openbmc_project/sensors/voltage/p1v8_stby", + "/xyz/openbmc_project/sensors/voltage/vddcr_soc_stby", + "/xyz/openbmc_project/sensors/voltage/p2v5_stby", + "/xyz/openbmc_project/sensors/voltage/p1v2_stby", + "/xyz/openbmc_project/sensors/voltage/p1v175_stby", + "/xyz/openbmc_project/sensors/voltage/p1v8", + "/xyz/openbmc_project/sensors/voltage/p3v3", + "/xyz/openbmc_project/sensors/voltage/pwrgd_pvpp", + "/xyz/openbmc_project/sensors/voltage/pwrgd_pvddio", + "/xyz/openbmc_project/sensors/voltage/pwrgd_cpuvr", + "/xyz/openbmc_project/sensors/voltage/p3v3_stby", + "/xyz/openbmc_project/sensors/voltage/p5v_stby", + "/xyz/openbmc_project/sensors/voltage/p3v_bat_adc", + + "/xyz/openbmc_project/sensors/voltage/vddcr_cpu_in", + "/xyz/openbmc_project/sensors/voltage/vddcr_cpu_out", + "/xyz/openbmc_project/sensors/current/vddcr_cpu_in", + "/xyz/openbmc_project/sensors/current/vddcr_cpu_out", + "/xyz/openbmc_project/sensors/temperature/vddcr_cpu", + + "/xyz/openbmc_project/sensors/voltage/vddcr_soc_in", + "/xyz/openbmc_project/sensors/voltage/vddcr_soc_out", + "/xyz/openbmc_project/sensors/current/vddcr_soc_in", + "/xyz/openbmc_project/sensors/current/vddcr_soc_out", + "/xyz/openbmc_project/sensors/temperature/vddcr_soc", + + "/xyz/openbmc_project/sensors/voltage/vddio_abcd_out", + "/xyz/openbmc_project/sensors/voltage/vddio_abcd_in", + "/xyz/openbmc_project/sensors/current/vddio_abcd_in", + "/xyz/openbmc_project/sensors/current/vddio_abcd_out", + "/xyz/openbmc_project/sensors/temperature/vddio_abcd", + + "/xyz/openbmc_project/sensors/voltage/vddio_efgh_out", + "/xyz/openbmc_project/sensors/voltage/vddio_efgh_in", + "/xyz/openbmc_project/sensors/current/vddio_efgh_in", + "/xyz/openbmc_project/sensors/current/vddio_efgh_out", + "/xyz/openbmc_project/sensors/temperature/vddio_efgh", + + "/xyz/openbmc_project/sensors/voltage/p12v_mobo_out", + "/xyz/openbmc_project/sensors/voltage/p12v_mobo_in", + "/xyz/openbmc_project/sensors/current/p12v_mobo_in", + "/xyz/openbmc_project/sensors/current/p12v_mobo_out", + "/xyz/openbmc_project/sensors/temperature/p12v_mobo", + + "/xyz/openbmc_project/sensors/voltage/p12v_fan_out", + "/xyz/openbmc_project/sensors/voltage/p12v_fan_in", + "/xyz/openbmc_project/sensors/current/p12v_fan_in", + "/xyz/openbmc_project/sensors/current/p12v_fan_out", + "/xyz/openbmc_project/sensors/temperature/p12v_fan", + + "/xyz/openbmc_project/sensors/voltage/hotswap_vin", + "/xyz/openbmc_project/sensors/voltage/hotswap_vout", + "/xyz/openbmc_project/sensors/current/hotswap_iout", + "/xyz/openbmc_project/sensors/power/hotswap_pout", + "/xyz/openbmc_project/sensors/temperature/hotswap", + + "/xyz/openbmc_project/sensors/fan_tach/fan0", + "/xyz/openbmc_project/sensors/fan_tach/fan1", + "/xyz/openbmc_project/sensors/fan_tach/fb_fan0", + "/xyz/openbmc_project/sensors/fan_tach/fb_fan1", + "/xyz/openbmc_project/sensors/fan_tach/fb_fan2" + ] + } + ] + } +] diff --git a/meta-quanta/meta-gbs/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend new file mode 100644 index 000000000..205822cb9 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:" +PACKAGECONFIG_append_gbs = " associations" +SRC_URI_append_gbs = " file://associations.json" +DEPENDS_append_gbs = " inventory-cleanup" + +do_install_append_gbs() { + install -d ${D}${base_datadir} + install -m 0755 ${WORKDIR}/associations.json ${D}${base_datadir}/associations.json +} -- cgit v1.2.3