summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Joseph <tomjoseph@in.ibm.com>2017-07-12 17:13:30 +0530
committerPatrick Williams <patrick@stwcx.xyz>2017-07-18 21:23:00 +0000
commit8af3309b5b1a7a2771b87ab10fb107a911e6d25c (patch)
tree97369c18c02942fcf1449ecf0cc94dc99d8f2ccd
parent29b0828ff4f8040113b2e3b8bf96bbec77b49513 (diff)
downloadtalos-openbmc-8af3309b5b1a7a2771b87ab10fb107a911e6d25c.tar.gz
talos-openbmc-8af3309b5b1a7a2771b87ab10fb107a911e6d25c.zip
phosphor-inventory-manager: YAML to create AssetTag property
Change-Id: Ic9085d06eeaeeaf73a5cc49fe6437e9e2f42834b Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb20
-rw-r--r--meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml14
-rw-r--r--meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb2
3 files changed, 35 insertions, 1 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb
new file mode 100644
index 000000000..f92f4c83f
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Recipe to create AssetTag property in inventory manager"
+PR = "r1"
+
+inherit native
+inherit obmc-phosphor-license
+inherit phosphor-inventory-manager
+
+PROVIDES += "virtual/phosphor-inventory-manager-assettag"
+
+SRC_URI += "file://assettag.yaml"
+
+S = "${WORKDIR}"
+
+do_install() {
+ # This recipe would provide the yaml for inventory manager to
+ # create AssetTag property at startup
+
+ install -d ${base_datadir}/events.d/
+ install assettag.yaml ${base_datadir}/events.d/assettag.yaml
+}
diff --git a/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml
new file mode 100644
index 000000000..d3a0104b9
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml
@@ -0,0 +1,14 @@
+events:
+ - name: Creating AssetTag at startup
+ description: >
+ Create /system at startup and populate the AssetTag property with
+ empty string.
+ type: startup
+ actions:
+ - name: createObjects
+ objs:
+ /system:
+ xyz.openbmc_project.Inventory.Decorator.AssetTag:
+ AssetTag:
+ value: ""
+ type: string
diff --git a/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb
index bc65eec18..d7dd57e04 100644
--- a/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb
+++ b/meta-phosphor/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb
@@ -7,7 +7,7 @@ PR = "r1"
inherit obmc-phosphor-license
inherit native
-PHOSPHOR_INVENTORY_MANAGER_CONFIGS ??= ""
+PHOSPHOR_INVENTORY_MANAGER_CONFIGS ??= "phosphor-inventory-manager-assettag-native"
# To add additional managed inventory items, create a recipe in your layer,
# and add it to PHOSPHOR_INVENTORY_MANAGER_CONFIGS with a bbappend to this recipe.
OpenPOWER on IntegriCloud