Adding /usr/sbin/prepare-metadata.py to VMs

Related-PROD: PRODX-0000
Change-Id: I776e58d38dded147a823f961218d29e35ca6c540
diff --git a/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml b/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
index cc6b89c..38e830a 100644
--- a/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
+++ b/de/heat-templates/fragments/SrvInstancesVMCephOSD.yaml
@@ -94,6 +94,27 @@
             $storage_backend_network_interface_ip: { get_attr: [storage_backend_server_port, fixed_ips, 0, ip_address] }
             $storage_backend_network_cidr: { get_param: storage_backend_network_cidr }
 
+  inject_files:
+    type: "OS::Heat::CloudConfig"
+    properties:
+      cloud_config:
+        write_files:
+          - path: /usr/sbin/prepare-metadata.py
+            owner: "root:root"
+            permissions: "0755"
+            content: {get_file: ../scripts/prepare-metadata.py}
+          - path: /usr/share/metadata/lab-metadata.yaml
+            owner: "root:root"
+            permissions: "0644"
+            content: { get_param: hardware_metadata}
+
+  install_config_agent:
+    type: "OS::Heat::MultipartMime"
+    properties:
+      parts:
+      - config: {get_resource: software_config}
+      - config: {get_resource: inject_files}
+
   server:
     type: OS::Nova::Server
     properties:
@@ -106,8 +127,8 @@
         - port: { get_resource: private_floating_server_port }
         - port: { get_resource: storage_frontend_server_port }
         - port: { get_resource: storage_backend_server_port }
-      user_data_format: RAW
-      user_data: { get_resource: software_config }
+      user_data_format: SOFTWARE_CONFIG
+      user_data: { get_resource:  install_config_agent}
       metadata: { get_param: metadata }
 
   accessible_server_port: