diff options
author | Evgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru> | 2022-09-27 14:28:25 +0300 |
---|---|---|
committer | Evgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru> | 2022-09-29 15:49:01 +0300 |
commit | ca4388ce7620f229a74fed8f514a8587a3d681e2 (patch) | |
tree | 54b032448f88f72127d9ddb566f898fb231eb583 | |
parent | c02ca264c92d4e0eae00aaaa7340f2f9da58a659 (diff) | |
download | openbmc-ca4388ce7620f229a74fed8f514a8587a3d681e2.tar.xz |
IBS: Add psus thresholds yaml 4 dbus-mon
-rw-r--r-- | meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy.bb (renamed from meta-ibs/meta-common/recipes-phosphor/dbus/psu-thresholds-manager.bb) | 6 | ||||
-rw-r--r-- | meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy/psu-threshold-policy.yaml | 88 | ||||
-rw-r--r-- | meta-ibs/meta-common/recipes-phosphor/dbus/psu-thresholds-manager/snmp-config.yaml | 18 |
3 files changed, 91 insertions, 21 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/dbus/psu-thresholds-manager.bb b/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy.bb index c0fd090b00..b1d55553b6 100644 --- a/meta-ibs/meta-common/recipes-phosphor/dbus/psu-thresholds-manager.bb +++ b/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy.bb @@ -8,10 +8,10 @@ inherit phosphor-dbus-monitor FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI += "file://psu-threshold-config.yaml" +SRC_URI += "file://psu-threshold-policy.yaml" do_install() { - install -D ${WORKDIR}/psu-threshold-config.yaml ${D}${config_dir}/psu-threshold-config.yaml + install -D ${WORKDIR}/psu-threshold-policy.yaml ${D}${config_dir}/psu-threshold-policy.yaml } -FILES:${PN} += "${config_dir}/psu-threshold-config.yaml" +FILES:${PN} += "${config_dir}/psu-threshold-policy.yaml" diff --git a/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy/psu-threshold-policy.yaml b/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy/psu-threshold-policy.yaml new file mode 100644 index 0000000000..98db0e2f9a --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy/psu-threshold-policy.yaml @@ -0,0 +1,88 @@ +- name: chassis state + description: > + 'Witherspoon has a single chassis to monitor.' + class: group + group: path + members: + - meta: CHASSISSTATE + path: /xyz/openbmc_project/state/chassis0 + +- name: chassis powered + description: > + 'Monitor the chassis power state.' + class: group + group: property + type: string + members: + - interface: xyz.openbmc_project.State.Chassis + meta: CHASSIS_STATE + property: CurrentPowerState + +- name: watch chassis state + description: > + 'Trigger logic on chassis power state changes.' + class: watch + watch: property + paths: chassis state + properties: chassis powered + callback: check cooling type + +- name: check power on + description: > + 'If the chassis has power, enable PSU Thresholds.' + class: condition + condition: count + paths: chassis state + properties: chassis powered + callback: enable psu1 vout threshold + countop: '>' + countbound: 0 + op: '==' + bound: xyz.openbmc_project.State.Chassis.PowerState.On + +- name: check power off + description: > + 'If the chassis has power, enable PSU Thresholds.' + class: condition + condition: count + paths: chassis state + properties: chassis powered + callback: disable psu1 vout threshold + countop: '>' + countbound: 0 + op: '!=' + bound: xyz.openbmc_project.State.Chassis.PowerState.On + +- name: enable psu1 vout threshold + description: > + 'Enable PSU0 Vout' + class: callback + callback: method + service: xyz.openbmc_project.PSUSensor + path: /xyz/openbmc_project/sensors/voltage/PSU1_Output_Voltage + interface: org.freedesktop.DBus.Properties + method: Set + args: + - value: xyz.openbmc_project.State.Decorator.Availability + type: string + - value: Available + type: string + - value: true + type: boolean + +- name: disable psu0 vout threshold + description: > + 'Enable PSU0 Vout' + class: callback + callback: method + service: xyz.openbmc_project.PSUSensor + path: /xyz/openbmc_project/sensors/voltage/PSU1_Output_Voltage + interface: org.freedesktop.DBus.Properties + method: Set + args: + - value: xyz.openbmc_project.State.Decorator.Availability + type: string + - value: Available + type: string + - value: false + type: boolean diff --git a/meta-ibs/meta-common/recipes-phosphor/dbus/psu-thresholds-manager/snmp-config.yaml b/meta-ibs/meta-common/recipes-phosphor/dbus/psu-thresholds-manager/snmp-config.yaml deleted file mode 100644 index a168bde3f5..0000000000 --- a/meta-ibs/meta-common/recipes-phosphor/dbus/psu-thresholds-manager/snmp-config.yaml +++ /dev/null @@ -1,18 +0,0 @@ -- name: errorlog path group - class: group - group: path - members: - - meta: PATH - path: /xyz/openbmc_project/logging - -- name: pathwatch errorlog - class: pathwatch - pathwatch: path - paths: errorlog path group - pathcallback: create errorlog trap - -- name: create errorlog trap - class: pathcallback - pathcallback: eventpath - paths: errorlog path group - eventType: ErrorTrap |