snf-image-creator
11 years agoAdd new line in metadata and md5sum string
Nikos Skalkotos [Wed, 25 Apr 2012 15:34:07 +0000 (18:34 +0300)]
Add new line in metadata and md5sum string

11 years agoUnify the output of progress bars
Nikos Skalkotos [Tue, 24 Apr 2012 14:40:46 +0000 (17:40 +0300)]
Unify the output of progress bars

11 years agoMinor cleanup (typos, comments, etc)
Nikos Skalkotos [Tue, 24 Apr 2012 12:54:25 +0000 (15:54 +0300)]
Minor cleanup (typos, comments, etc)

11 years agoSwitch to ansicolor for coloring & fix pep8 errors
Nikos Skalkotos [Tue, 24 Apr 2012 09:45:49 +0000 (12:45 +0300)]
Switch to ansicolor for coloring & fix pep8 errors

11 years agoUse progress for progress bar & implement register
Nikos Skalkotos [Mon, 23 Apr 2012 15:53:49 +0000 (18:53 +0300)]
Use progress for progress bar & implement register

12 years agoFix pep8 errors
Nikos Skalkotos [Fri, 20 Apr 2012 14:44:33 +0000 (17:44 +0300)]
Fix pep8 errors

12 years agoAdd progress bar in pithos upload & compute md5sum
Nikos Skalkotos [Fri, 20 Apr 2012 14:38:40 +0000 (17:38 +0300)]
Add progress bar in pithos upload & compute md5sum

12 years agoSeperate snapshoting from get_device in Disk class
Nikos Skalkotos [Fri, 20 Apr 2012 08:29:59 +0000 (11:29 +0300)]
Seperate snapshoting from get_device in Disk class

12 years agoFix image upload
Nikos Skalkotos [Thu, 19 Apr 2012 16:39:07 +0000 (19:39 +0300)]
Fix image upload

Also rearrange input options

12 years agoImprove help msg for remove-user-accounts sysprep
Nikos Skalkotos [Thu, 19 Apr 2012 13:05:04 +0000 (16:05 +0300)]
Improve help msg for remove-user-accounts sysprep

12 years agoMake -u and -r input options require an argument
Nikos Skalkotos [Thu, 19 Apr 2012 13:01:51 +0000 (16:01 +0300)]
Make -u and -r input options require an argument

12 years agoFix typos in var names
Nikos Skalkotos [Thu, 19 Apr 2012 12:58:57 +0000 (15:58 +0300)]
Fix typos in var names

12 years agoAdd a wrapper module for kamaki
Nikos Skalkotos [Wed, 11 Apr 2012 14:25:45 +0000 (17:25 +0300)]
Add a wrapper module for kamaki

This is just a template. Not fully workable

12 years agoAdd options for enabling/disabling sysprep tasks
Nikos Skalkotos [Tue, 10 Apr 2012 13:38:13 +0000 (16:38 +0300)]
Add options for enabling/disabling sysprep tasks

Also merge data_cleanup tasks with syspreps and did a major cleanup

12 years agoAdd options for printing sysprep and data cleanup
Nikos Skalkotos [Mon, 9 Apr 2012 12:09:20 +0000 (15:09 +0300)]
Add options for printing sysprep and data cleanup

Add --print-data-cleanup and --print sysprep input options. If enabled
the program will output what data cleanup and syspep operations will
and won't run a a selected input media

12 years agoFix pep8 error
Nikos Skalkotos [Mon, 9 Apr 2012 12:08:55 +0000 (15:08 +0300)]
Fix pep8 error

12 years agoAdd cleanup method that removes user accounts
Nikos Skalkotos [Fri, 6 Apr 2012 15:08:59 +0000 (18:08 +0300)]
Add cleanup method that removes user accounts

This method will remove all users that have id over 1000. In most
systems this will remove all normal user accounts besides the first
one. This method will not run by default.

12 years agoAdd cleanup method that locks all user accounts
Nikos Skalkotos [Thu, 5 Apr 2012 14:36:19 +0000 (17:36 +0300)]
Add cleanup method that locks all user accounts

12 years agoAdd exclude_task decorator in os_type
Nikos Skalkotos [Thu, 5 Apr 2012 13:26:02 +0000 (16:26 +0300)]
Add exclude_task decorator in os_type

This can be used to create a set of by default disabled data_cleanup
and sysprep tasks.

12 years agoAdd silent mode option
Nikos Skalkotos [Sat, 24 Mar 2012 12:54:01 +0000 (14:54 +0200)]
Add silent mode option

All printing had to be reordered and now it is done from a central point.

12 years agoAdd image_creator.os_type to packages in setup
Nikos Skalkotos [Sat, 24 Mar 2012 11:20:38 +0000 (13:20 +0200)]
Add image_creator.os_type to packages in setup

12 years agoAdd a new line the end of the acpid action script
Nikos Skalkotos [Sat, 24 Mar 2012 08:50:03 +0000 (10:50 +0200)]
Add a new line the end of the acpid action script

12 years agoCapitalize all image metadata keys
Nikos Skalkotos [Sat, 24 Mar 2012 08:40:21 +0000 (10:40 +0200)]
Capitalize all image metadata keys

12 years agoFix cli options help messages
Nikos Skalkotos [Sat, 24 Mar 2012 08:31:43 +0000 (10:31 +0200)]
Fix cli options help messages

12 years agoMove image_extract method into DiskDevice
Nikos Skalkotos [Fri, 23 Mar 2012 17:16:23 +0000 (19:16 +0200)]
Move image_extract method into DiskDevice

12 years agoFix sysprep_acpid method in linux.
Nikos Skalkotos [Wed, 21 Mar 2012 18:45:38 +0000 (20:45 +0200)]
Fix sysprep_acpid method in linux.

Commit 3f70f24 introduced a bug where the event file was overwritten
instead of the action file.

12 years agoCorrect image size computation
Nikos Skalkotos [Wed, 21 Mar 2012 18:32:50 +0000 (20:32 +0200)]
Correct image size computation

This commit fixes a bug where size method in DiskDevice returned the
payload size of the device one byte shorter than it actually was.

12 years agoFix linux sysprep_acpid & remove output indents
Nikos Skalkotos [Wed, 21 Mar 2012 18:14:26 +0000 (20:14 +0200)]
Fix linux sysprep_acpid & remove output indents

12 years agoAdd new-line printing option in printing functions
Nikos Skalkotos [Tue, 20 Mar 2012 17:08:08 +0000 (19:08 +0200)]
Add new-line printing option in printing functions

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

12 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

12 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

12 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.

12 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.

12 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.

12 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

12 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

12 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

12 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.

12 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.

12 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

12 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.

12 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

12 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

12 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.

12 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.

12 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

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

12 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!

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

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

12 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.

12 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

12 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

12 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

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

12 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

12 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

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