snf-image-creator
7 years agoBeautify program's output.
Nikos Skalkotos [Tue, 20 Mar 2012 16:04:38 +0000 (18:04 +0200)]
Beautify program's output.

7 years agoFix license, copyright and pep8 infractions
Nikos Skalkotos [Mon, 19 Mar 2012 10:26:31 +0000 (12:26 +0200)]
Fix license, copyright and pep8 infractions

7 years agoFix wrong variable name in progress_callback
Nikos Skalkotos [Fri, 16 Mar 2012 17:21:12 +0000 (19:21 +0200)]
Fix wrong variable name in progress_callback

7 years agoCreate an exception based error reporting system
Nikos Skalkotos [Fri, 16 Mar 2012 16:14:48 +0000 (18:14 +0200)]
Create an exception based error reporting system

All modules should use image_creator.FatalError exception to report
fatal errors.

7 years agoFix a bug in linux sysprep_* methods
Nikos Skalkotos [Fri, 16 Mar 2012 15:36:23 +0000 (17:36 +0200)]
Fix a bug in linux sysprep_* methods

The parameter order when calling guestfs.write was incorrect.

7 years agoSplit DiskDevice constructor in 2 parts
Nikos Skalkotos [Fri, 16 Mar 2012 15:26:44 +0000 (17:26 +0200)]
Split DiskDevice constructor in 2 parts

In the constructor only variable initialization is performed. This is
needed because the constructor is executed before the DiskDevice
instance is appended to the device list, and if something fails there,
then the resources may be cleaned up in an incorrect order.

7 years agoExtend data_cleanup method in unix
Nikos Skalkotos [Tue, 13 Mar 2012 16:09:22 +0000 (18:09 +0200)]
Extend data_cleanup method in unix

* Add more userdata to be cleaned
* Prefix all data_cleanup methods with data_cleanup

7 years agoAdd sysprep method in os_type classes.
Nikos Skalkotos [Tue, 13 Mar 2012 15:48:54 +0000 (17:48 +0200)]
Add sysprep method in os_type classes.

This is used to prepare the media for image extraction. The main
difference from data_cleanup is that the tasks performed with this
method are mandatory in order to make the image workable.

Added the following sysprep methods for linux:
 * sysprep_acpid
 * sysprep_persistent_net_rules
 * sysprep_persistend_devs

7 years agoAdd cleanup_cache function in unix
Nikos Skalkotos [Tue, 13 Mar 2012 10:23:48 +0000 (12:23 +0200)]
Add cleanup_cache function in unix

This function will remove regular files under /var/cache

7 years agoAdd remove_persistent_net method in linux.
Nikos Skalkotos [Tue, 13 Mar 2012 10:17:46 +0000 (12:17 +0200)]
Add remove_persistent_net method in linux.

This will remove the persitent net udev rule.

7 years agoAdd convert_to_persistent_dev method in Linux
Nikos Skalkotos [Mon, 12 Mar 2012 17:01:34 +0000 (19:01 +0200)]
Add convert_to_persistent_dev method in Linux

This method replaces all non-persistent device appearances in fstab and
grub1 with UUIDs.

7 years agoAdd mail and /var/tmp cleanup for unix systems
Nikos Skalkotos [Sun, 11 Mar 2012 20:51:04 +0000 (22:51 +0200)]
Add mail and /var/tmp cleanup for unix systems

7 years agoRemove python-losetup dependency
Nikos Skalkotos [Fri, 9 Mar 2012 15:26:29 +0000 (17:26 +0200)]
Remove python-losetup dependency

The package is buggy and we can use pbs to do the same thing.

7 years agoAdd an extra yield in progress_generator
Nikos Skalkotos [Thu, 8 Mar 2012 16:51:55 +0000 (18:51 +0200)]
Add an extra yield in progress_generator

This is needed to suppress the StopIteration exception

7 years agoAdd progress bar for the guestfs launch method
Nikos Skalkotos [Thu, 8 Mar 2012 15:32:04 +0000 (17:32 +0200)]
Add progress bar for the guestfs launch method

7 years agoAdd options for image upload/register with kamaki
Nikos Skalkotos [Thu, 8 Mar 2012 15:30:04 +0000 (17:30 +0200)]
Add options for image upload/register with kamaki

Not workable. Kamaki is not imported yet.

7 years agoHandle imported commands that aren't in the PATH
Nikos Skalkotos [Wed, 7 Mar 2012 13:40:05 +0000 (15:40 +0200)]
Handle imported commands that aren't in the PATH

This fixes cases where a normal user tries to execute the program and
the program raises pbs.CommandNotFound exceptions because it tries to
import a command from sbin, which is not in the path.

7 years agoFix a bug in get_passworded_users
Nikos Skalkotos [Mon, 5 Mar 2012 14:13:05 +0000 (16:13 +0200)]
Fix a bug in get_passworded_users

7 years agoAdd external dependencies in setuptools
Nikos Skalkotos [Mon, 5 Mar 2012 13:45:00 +0000 (15:45 +0200)]
Add external dependencies in setuptools

7 years agoAdd input options and populate image metadata
Nikos Skalkotos [Wed, 29 Feb 2012 17:47:36 +0000 (19:47 +0200)]
Add input options and populate image metadata

Hooray! This is the first release that actually works!

7 years agoFix minor typos
Nikos Skalkotos [Wed, 29 Feb 2012 12:27:04 +0000 (14:27 +0200)]
Fix minor typos

7 years agoDocument basic classes and methods
Nikos Skalkotos [Tue, 28 Feb 2012 20:12:52 +0000 (22:12 +0200)]
Document basic classes and methods

7 years agoDetect Kubuntu images
Nikos Skalkotos [Tue, 28 Feb 2012 16:32:52 +0000 (18:32 +0200)]
Detect Kubuntu images

This is done checking an Ubuntu image for the presence of
kubuntu-desktop package.

7 years agoMake DiskDevice.shrink() return the new disk size
Nikos Skalkotos [Tue, 28 Feb 2012 16:26:26 +0000 (18:26 +0200)]
Make DiskDevice.shrink() return the new disk size

7 years agoMajor code revision
Nikos Skalkotos [Fri, 24 Feb 2012 13:29:55 +0000 (15:29 +0200)]
Major code revision

* Add foreach_file function in OSBase. This is used by all cleanup
  methods
* Add slackware class. This class derives from linux and overwrites the
  log cleanup behaviour. This is needed since slackware stores all
  package management info in /var/log/packages
* Add a shrink method in DiskDevice. This method shrinks the last
  filesystem to the minimum size
* Make the code style comply with pep8

7 years agoFix code for cleanup of image data
Nikos Skalkotos [Wed, 22 Feb 2012 16:22:17 +0000 (18:22 +0200)]
Fix code for cleanup of image data

7 years agoAdd OS specific classes
Nikos Skalkotos [Mon, 20 Feb 2012 17:59:43 +0000 (19:59 +0200)]
Add OS specific classes

7 years agoUse libguestfs to access the image
Nikos Skalkotos [Fri, 17 Feb 2012 18:30:36 +0000 (20:30 +0200)]
Use libguestfs to access the image

7 years agoFurther development
Nikos Skalkotos [Fri, 17 Feb 2012 09:41:32 +0000 (11:41 +0200)]
Further development

Make the cow file sparse
Add method in Device to list the partitions
Add a "is bootable" flag in Device constructor

7 years agoInitial commit
Nikos Skalkotos [Wed, 15 Feb 2012 17:19:46 +0000 (19:19 +0200)]
Initial commit