corrected docstring on update_image
authorPaul Tonelli <paul.tonelli@logilab.fr>
Wed, 06 Mar 2013 09:58:43 +0100
changeset 27 1ac7131c81bd
parent 26 2c46e9a89857
child 28 25e5edde5370
corrected docstring on update_image
_modules/vm_create.py
--- a/_modules/vm_create.py	Wed Mar 06 09:42:31 2013 +0100
+++ b/_modules/vm_create.py	Wed Mar 06 09:58:43 2013 +0100
@@ -101,7 +101,7 @@
 
     CLI Example::
 
-        salt '*' vm_create.resize_and_check /mnt raring_image.tar.gz
+        salt '*' vm_create.update_image /mnt/variation
     '''
     files_to_delete = []
     #_create_apt_proxy(chroot_dirname + '/etc/apt/apt.conf.d/01proxy')
@@ -140,7 +140,7 @@
         assert len(myfiles) == 1
         myfile = myfiles[0]
         log.info(__salt__['cmd.run']('cp ' + path + '/' + image_dirname + '/boot/'
-                + myfile + ' ' + path))
+                + myfile + ' ' + path + '/' + filetype))
         return_files.append(myfile)
     return tuple(return_files)
 
@@ -158,8 +158,8 @@
     ### Exec pre state here ###
     #update_image(path + '/' + image_dirname)
     log.info(__salt__['state.sls']('ami_creator_pre'))
-    #variate_image(path + '/' + image_dirname, variation_filename)
-    #kernel_name, ramdisk_name = get_initrd_kernel(path, image_dirname)
+    variate_image(path + '/' + image_dirname, variation_filename)
+    kernel_name, ramdisk_name = get_initrd_kernel(path, image_dirname)
     kernel_name = "vmlinuz_" + DEFAULT_MOUNT_DIR
     ramdisk_name = "ramdisk_" + DEFAULT_MOUNT_DIR
     #clean_images(path,image_dirname)