From 51a992da77acde9850afc13e93685640319d86e3 Mon Sep 17 00:00:00 2001 From: "Thang Q. Nguyen" Date: Thu, 30 Dec 2021 04:35:08 +0000 Subject: meta-ampere: redfish: remove Chassis chassis instance The chassis instance when implementing sensor monitor using dbus-sensor/entity-manager is /redfish/v1/Chassis/ where is defined from entity-manager configuration. This commit removes /redfish/v1/Chassis/chassis which is redundant and make incorrect link from other schema like ComputerSystem and BMC Manager. Tested: 1. Check no /redfish/v1/Chassis/chassis available. 2. Check all sensors are available in /redfish/v1/Chassis/Mt_Jade. Signed-off-by: Thang Q. Nguyen Change-Id: I334a94bb65c3caa49d0bcb6ab03a42f7999728d5 --- .../inventory/inventory-cleanup.bb | 17 +++++ .../inventory-cleanup/inventory-cleanup.yaml | 16 +++++ .../inventory/inventory-cleanup.bb | 17 ----- .../inventory-cleanup/inventory-cleanup.yaml | 16 ----- .../phosphor-inventory-manager/associations.json | 80 ---------------------- .../phosphor-inventory-manager_%.bbappend | 10 --- 6 files changed, 33 insertions(+), 123 deletions(-) create mode 100644 meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb create mode 100644 meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml delete mode 100644 meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup.bb delete mode 100644 meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml delete mode 100644 meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json delete mode 100644 meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend diff --git a/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup.bb new file mode 100644 index 000000000..1b5a119b1 --- /dev/null +++ b/meta-ampere/meta-common/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-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml new file mode 100644 index 000000000..23f54e331 --- /dev/null +++ b/meta-ampere/meta-common/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml @@ -0,0 +1,16 @@ +description: > + Ampere 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: "xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.RackMount" + type: string diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup.bb b/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup.bb deleted file mode 100644 index 1b5a119b1..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup.bb +++ /dev/null @@ -1,17 +0,0 @@ -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-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml b/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml deleted file mode 100644 index 3fa190852..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/inventory/inventory-cleanup/inventory-cleanup.yaml +++ /dev/null @@ -1,16 +0,0 @@ -description: > - Mt.Jade 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: "xyz.openbmc_project.Inventory.Item.Chassis.ChassisType.RackMount" - type: string diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json b/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json deleted file mode 100644 index 5e535d502..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json +++ /dev/null @@ -1,80 +0,0 @@ -[ - { - "path": "system/chassis/motherboard/powersupply0", - "endpoints": - [ - { - "types": - { - "rType": "inventory", - "fType": "sensors" - }, - "paths": - [ - "/xyz/openbmc_project/sensors/fan_tach/PSU0_fan1", - "/xyz/openbmc_project/sensors/temperature/PSU0_TEMP", - "/xyz/openbmc_project/sensors/voltage/PSU0_VINPUT", - "/xyz/openbmc_project/sensors/voltage/PSU0_VOUTPUT", - "/xyz/openbmc_project/sensors/power/PSU0_PINPUT", - "/xyz/openbmc_project/sensors/power/PSU0_POUTPUT", - "/xyz/openbmc_project/sensors/current/PSU0_IINPUT", - "/xyz/openbmc_project/sensors/current/PSU0_IOUTPUT" - ] - } - ] - }, - { - "path": "system/chassis/motherboard/powersupply1", - "endpoints": - [ - { - "types": - { - "rType": "inventory", - "fType": "sensors" - }, - "paths": - [ - "/xyz/openbmc_project/sensors/fan_tach/PSU1_fan1", - "/xyz/openbmc_project/sensors/temperature/PSU1_TEMP", - "/xyz/openbmc_project/sensors/voltage/PSU1_VINPUT", - "/xyz/openbmc_project/sensors/voltage/PSU1_VOUTPUT", - "/xyz/openbmc_project/sensors/power/PSU1_PINPUT", - "/xyz/openbmc_project/sensors/power/PSU1_POUTPUT", - "/xyz/openbmc_project/sensors/current/PSU1_IINPUT", - "/xyz/openbmc_project/sensors/current/PSU1_IOUTPUT" - ] - } - ] - }, - { - "path": "system/chassis", - "endpoints": - [ - { - "types": - { - "rType": "chassis", - "fType": "all_sensors" - }, - "paths": - [ - "/xyz/openbmc_project/sensors/fan_tach/FAN3_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN3_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN4_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN4_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN5_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN5_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN6_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN6_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN7_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN7_2", - "/xyz/openbmc_project/sensors/fan_tach/FAN8_1", - "/xyz/openbmc_project/sensors/fan_tach/FAN8_2", - "/xyz/openbmc_project/sensors/fan_tach/PSU0_fan1", - "/xyz/openbmc_project/sensors/fan_tach/PSU1_fan1" - ] - } - ] - } -] diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend deleted file mode 100644 index ab3030879..000000000 --- a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend +++ /dev/null @@ -1,10 +0,0 @@ -DEPENDS:append:mtjade = " inventory-cleanup" - -FILESEXTRAPATHS:prepend:mtjade := "${THISDIR}/${PN}:" -PACKAGECONFIG:append:mtjade = " associations" -SRC_URI:append:mtjade = " file://associations.json" - -do_install:append:mtjade() { - install -d ${D}${base_datadir} - install -m 0755 ${WORKDIR}/associations.json ${D}${base_datadir} -} -- cgit v1.2.3