]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Install cloudinit specific files that are loaded into the mime userdata
authorSteven Dake <sdake@redhat.com>
Thu, 12 Apr 2012 20:33:27 +0000 (13:33 -0700)
committerSteven Dake <sdake@redhat.com>
Thu, 12 Apr 2012 20:33:27 +0000 (13:33 -0700)
Partially fixes Issue #48

Signed-off-by: Steven Dake <sdake@redhat.com>
MANIFEST.in
heat/cloudinit/config [new file with mode: 0644]
heat/cloudinit/part-handler.py [new file with mode: 0644]

index 1b20be51bd4cd809aa149c1405c4c97f37a679cf..1f41d53574c6cd9d83318eb6357d8b57dfc0b31b 100644 (file)
@@ -16,6 +16,8 @@ include heat/jeos/F17-x86_64-cfntools-jeos.tdl
 include heat/cfntools/cfn-init
 include heat/cfntools/cfn-hup
 include heat/cfntools/cfn-signal
+include heat/cloudinit/config
+include heat/cloudinit/part-handler.py
 include heat/db/sqlalchemy/migrate_repo/migrate.cfg
 graft etc
 graft docs
diff --git a/heat/cloudinit/config b/heat/cloudinit/config
new file mode 100644 (file)
index 0000000..494f9d8
--- /dev/null
@@ -0,0 +1,9 @@
+#cloud-config
+cloud_config_modules:
+ - locale
+ - scripts_user
+ - set_hostname
+ - ssh
+ - timezone
+ - update_etc_hosts
+ - update_hostname
diff --git a/heat/cloudinit/part-handler.py b/heat/cloudinit/part-handler.py
new file mode 100644 (file)
index 0000000..6dfc89b
--- /dev/null
@@ -0,0 +1,14 @@
+#part-handler
+def list_types():
+    return(["text/x-cfninitdata"])
+
+def handle_part(data,ctype,filename,payload):
+    if ctype == "__begin__":
+       return
+    if ctype == "__end__":
+       return
+
+    if ctype == 'text/x-cfninitdata':
+        f = open('/var/lib/cloud/data/%s' % filename, 'w')
+        f.write(payload)
+        f.close()