phosphor-inventory-manager: YAML to create AssetTag property

Change-Id: Ic9085d06eeaeeaf73a5cc49fe6437e9e2f42834b
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb b/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag-native.bb
new file mode 100644
index 0000000..f92f4c8
--- /dev/null
+++ b/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/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml b/common/recipes-phosphor/inventory/phosphor-inventory-manager-assettag/assettag.yaml
new file mode 100644
index 0000000..d3a0104
--- /dev/null
+++ b/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/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb b/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb
index bc65eec..d7dd57e 100644
--- a/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb
+++ b/common/recipes-phosphor/inventory/phosphor-inventory-manager-config-native.bb
@@ -7,7 +7,7 @@
 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.