summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host
diff options
context:
space:
mode:
Diffstat (limited to 'meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host')
-rw-r--r--meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/entity.yaml13
-rwxr-xr-xmeta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/merge_yamls.py7
2 files changed, 20 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/entity.yaml b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/entity.yaml
new file mode 100644
index 000000000..f41c2fda6
--- /dev/null
+++ b/meta-phosphor/recipes-phosphor/ipmi/phosphor-ipmi-host/entity.yaml
@@ -0,0 +1,13 @@
+0x01:
+ containerEntityId: 0x1E
+ containerEntityInstance: 0x1
+ isList: "true"
+ isLinked: "false"
+ entityId1: 0x03
+ entityInstance1: 0x1
+ entityId2: 0x04
+ entityInstance2: 0x1
+ entityId3: 0x00
+ entityInstance3: 0x00
+ entityId4: 0x00
+ entityInstance4: 0x00
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)