summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/ipmi
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2019-07-11 11:34:39 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-07-14 17:09:14 +0300
commitc153c314bdf3f322adc01f7233ea254284ca5971 (patch)
tree4b818cca85199f457cb3b962d6d90ab1b2aed79f /meta-phosphor/recipes-phosphor/ipmi
parent7dc58bf39a82ca690493dd1f7ae2e5d036d96735 (diff)
downloadopenbmc-c153c314bdf3f322adc01f7233ea254284ca5971.tar.xz
Revert "Revert "Accelerator interface for sensorinventory items""
This reverts commit 7fb0c049d3a290c8f9d7f7c9690cdef9a97b3c52. Restore function reverted by 7fb0c049d3a290c8f9d7f7c9690cdef9a97b3c52, swift build issue has now been resolved. (From meta-phosphor rev: 7106ecfbc78b7ab9aba84dfa3319455cdc833903) Signed-off-by: Santosh Puranik <santosh.puranik@in.ibm.com> Change-Id: Iec14a8efc79f9094e6c37e0b1489e4e9ab9406c9 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-phosphor/ipmi')
-rwxr-xr-xmeta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py7
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml1
2 files changed, 8 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py
index 5e6c4b5e6..877e3eb57 100755
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py
@@ -12,6 +12,11 @@ import sys
import yaml
import copy
+# Custom representer for None types. This is to handle empty dictionaries.
+# By default Pyyaml outputs these as "null", whereas we want an empty character.
+def represent_none(self, _):
+ return self.represent_scalar('tag:yaml.org,2002:null', '')
+
def dict_merge(target, source):
"""Deep merge for dicts.
@@ -43,6 +48,8 @@ if len(sys.argv) == 2:
# No overrides to handle
sys.exit(0)
+yaml.add_representer(type(None), represent_none)
+
target_filename = sys.argv[1]
with open(target_filename) as target_file:
data = yaml.safe_load(target_file)
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml
index ec82afed6..8188612b3 100644
--- a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory-mrw-config/config.yaml
@@ -207,6 +207,7 @@ gpu_func_sensor:
type: "bool"
assert: true
deassert: false
+ xyz.openbmc_project.Inventory.Item.Accelerator:
# Field replaceable doesn't come as a sensor data
# but we know that GPU is Field replaceable so setting
# true in both cases.