summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Nikos Skalkotos [Fri, 15 Jun 2012 16:26:32 +0000 (19:26 +0300)]
Further development on snf-image-creator-dialog
Extract and Register menu entries work fine.
Nikos Skalkotos [Fri, 15 Jun 2012 13:46:59 +0000 (16:46 +0300)]
In kamaki.register convert all metadata to strings
Otherwise the registration may fail.
Nikos Skalkotos [Fri, 15 Jun 2012 09:03:50 +0000 (12:03 +0300)]
Open snapshot in binary mode before uploading
Nikos Skalkotos [Fri, 15 Jun 2012 08:55:35 +0000 (11:55 +0300)]
In some circumstances mount the image readonly
If no customization is to be applied the image should be mounted
readonly.
Nikos Skalkotos [Fri, 15 Jun 2012 08:32:20 +0000 (11:32 +0300)]
Don't handle kamaki exceptions in kamaki_wrapper
Let the application decide what to do with them. If image-creator
receives an error from kamaki it will terminate. But this may not be
the proper thing to do for an interactive application like
image-creator-dialog
Nikos Skalkotos [Thu, 14 Jun 2012 15:19:39 +0000 (18:19 +0300)]
Initial commit for snf-image-creator-dialog
snf-image-creator-dialog is a dialog based version of snf-image-creator
Nothing works yet
Nikos Skalkotos [Thu, 14 Jun 2012 14:46:00 +0000 (17:46 +0300)]
Allow readonly mount in DiskDevice class
Add an option to DiskDevice's mount method to allow readonly mount
Nikos Skalkotos [Thu, 14 Jun 2012 10:33:33 +0000 (13:33 +0300)]
Add Output module for dialog-based output
Nikos Skalkotos [Thu, 14 Jun 2012 08:37:20 +0000 (11:37 +0300)]
Fix a bug introduced in
4e58b51b
The error function main.py used for outputing errors has been removed
and the code was not updated to use the error method of SimpleOutput
output class.
Also did a minor cleanup: git_os_class function was renamed to os_cls
Nikos Skalkotos [Thu, 14 Jun 2012 08:32:21 +0000 (11:32 +0300)]
Save bar_type parameter in Output base class
Nikos Skalkotos [Tue, 12 Jun 2012 14:53:30 +0000 (17:53 +0300)]
Add cleanup method in output class
Nikos Skalkotos [Mon, 11 Jun 2012 15:28:18 +0000 (18:28 +0300)]
Create a new output subpackage
Nikos Skalkotos [Mon, 11 Jun 2012 09:12:11 +0000 (12:12 +0300)]
Print an extra space when new_line=False
Nikos Skalkotos [Mon, 11 Jun 2012 09:02:04 +0000 (12:02 +0300)]
Add size param in the Output.Progress constructor
Nikos Skalkotos [Mon, 11 Jun 2012 08:25:51 +0000 (11:25 +0300)]
Disable recovery proc if libguestfs ver < 1.17.14
In older versions of libguestfs, the recovery process did not close
the file descriptors it inherited. This could case problems if the
parent process had open pipes.
Nikos Skalkotos [Thu, 7 Jun 2012 10:58:40 +0000 (13:58 +0300)]
Make progress class contain and Ouput instance
This is handy because now progress class can print using the output
methods of it's output class
Nikos Skalkotos [Wed, 6 Jun 2012 12:14:38 +0000 (15:14 +0300)]
Fix copyright date in main.py
Nikos Skalkotos [Wed, 6 Jun 2012 11:02:28 +0000 (14:02 +0300)]
Check if stdout is a tty
If not then don't output progressbars and colors
Nikos Skalkotos [Wed, 6 Jun 2012 09:05:56 +0000 (12:05 +0300)]
Fix a bug in Output.progress_generator
The progress bar of the progress generator had a wrong max attribute.
Nikos Skalkotos [Tue, 5 Jun 2012 15:36:17 +0000 (18:36 +0300)]
Unify output by creating a seperated output module
All image-creator components now output messages using an instance
of one of the output classes.
Nikos Skalkotos [Fri, 18 May 2012 16:14:12 +0000 (19:14 +0300)]
Remove get_metadata() from os_type classes
The metadata are collected in the constructor and are saved in the
meta variable. This way they can be accessed and altered by the
sysprep methods. There are cases where some metadata are not valid
and need to be updated after a sysprep action is performed. For
example, remove_user_accounts sysprep action may remove a user that
is present in the USERS metadata.
Nikos Skalkotos [Fri, 18 May 2012 14:05:01 +0000 (17:05 +0300)]
Add option for passing user-defined image metadata
The metadata passed by the user will overwrite any automatically
collected metadata with the same key.
Nikos Skalkotos [Wed, 16 May 2012 12:23:34 +0000 (15:23 +0300)]
Add remove_swap_entry sysprep in linux
This action will remove the swap entry from the fstab.
Nikos Skalkotos [Fri, 4 May 2012 15:44:43 +0000 (18:44 +0300)]
Remove the swap partition when shrinking
If the swap partition is the last partition in the media, then it can
be safely removed. The image-creator will save enough info in the
SWAP metadata to recreate it.
Nikos Skalkotos [Sun, 29 Apr 2012 12:21:47 +0000 (15:21 +0300)]
Move get_os_class from image_creator to os_type
This is needed because otherwise setup.py fails on some systems. Also
do some more cleanup.
Nikos Skalkotos [Sun, 29 Apr 2012 09:56:52 +0000 (12:56 +0300)]
Fix a bug introduced in commit
e108efd285b34d5a28e
Not all needed code parts where updated when the size() method in
DiskDevice class was abandoned in favor of the size attribute.
Nikos Skalkotos [Fri, 27 Apr 2012 13:52:11 +0000 (16:52 +0300)]
Cleanup code in disk module
Nikos Skalkotos [Fri, 27 Apr 2012 11:57:20 +0000 (14:57 +0300)]
Cleanup code & add comments in gpt module
Nikos Skalkotos [Thu, 26 Apr 2012 16:55:53 +0000 (19:55 +0300)]
Add support for GUID Partition Tables
Nikos Skalkotos [Wed, 25 Apr 2012 15:34:07 +0000 (18:34 +0300)]
Add new line in metadata and md5sum string
Nikos Skalkotos [Tue, 24 Apr 2012 14:40:46 +0000 (17:40 +0300)]
Unify the output of progress bars
Nikos Skalkotos [Tue, 24 Apr 2012 12:54:25 +0000 (15:54 +0300)]
Minor cleanup (typos, comments, etc)
Nikos Skalkotos [Tue, 24 Apr 2012 09:45:49 +0000 (12:45 +0300)]
Switch to ansicolor for coloring & fix pep8 errors
Nikos Skalkotos [Mon, 23 Apr 2012 15:53:49 +0000 (18:53 +0300)]
Use progress for progress bar & implement register
Nikos Skalkotos [Fri, 20 Apr 2012 14:44:33 +0000 (17:44 +0300)]
Fix pep8 errors
Nikos Skalkotos [Fri, 20 Apr 2012 14:38:40 +0000 (17:38 +0300)]
Add progress bar in pithos upload & compute md5sum
Nikos Skalkotos [Fri, 20 Apr 2012 08:29:59 +0000 (11:29 +0300)]
Seperate snapshoting from get_device in Disk class
Nikos Skalkotos [Thu, 19 Apr 2012 16:39:07 +0000 (19:39 +0300)]
Fix image upload
Also rearrange input options
Nikos Skalkotos [Thu, 19 Apr 2012 13:05:04 +0000 (16:05 +0300)]
Improve help msg for remove-user-accounts sysprep
Nikos Skalkotos [Thu, 19 Apr 2012 13:01:51 +0000 (16:01 +0300)]
Make -u and -r input options require an argument
Nikos Skalkotos [Thu, 19 Apr 2012 12:58:57 +0000 (15:58 +0300)]
Fix typos in var names
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
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
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
Nikos Skalkotos [Mon, 9 Apr 2012 12:08:55 +0000 (15:08 +0300)]
Fix pep8 error
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.
Nikos Skalkotos [Thu, 5 Apr 2012 14:36:19 +0000 (17:36 +0300)]
Add cleanup method that locks all user accounts
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.
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.
Nikos Skalkotos [Sat, 24 Mar 2012 11:20:38 +0000 (13:20 +0200)]
Add image_creator.os_type to packages in setup
Nikos Skalkotos [Sat, 24 Mar 2012 08:50:03 +0000 (10:50 +0200)]
Add a new line the end of the acpid action script
Nikos Skalkotos [Sat, 24 Mar 2012 08:40:21 +0000 (10:40 +0200)]
Capitalize all image metadata keys
Nikos Skalkotos [Sat, 24 Mar 2012 08:31:43 +0000 (10:31 +0200)]
Fix cli options help messages
Nikos Skalkotos [Fri, 23 Mar 2012 17:16:23 +0000 (19:16 +0200)]
Move image_extract method into DiskDevice
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.
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.
Nikos Skalkotos [Wed, 21 Mar 2012 18:14:26 +0000 (20:14 +0200)]
Fix linux sysprep_acpid & remove output indents
Nikos Skalkotos [Tue, 20 Mar 2012 17:08:08 +0000 (19:08 +0200)]
Add new-line printing option in printing functions
Nikos Skalkotos [Tue, 20 Mar 2012 16:04:38 +0000 (18:04 +0200)]
Beautify program's output.
Nikos Skalkotos [Mon, 19 Mar 2012 10:26:31 +0000 (12:26 +0200)]
Fix license, copyright and pep8 infractions
Nikos Skalkotos [Fri, 16 Mar 2012 17:21:12 +0000 (19:21 +0200)]
Fix wrong variable name in progress_callback
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.
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.
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.
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
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
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
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.
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.
Nikos Skalkotos [Sun, 11 Mar 2012 20:51:04 +0000 (22:51 +0200)]
Add mail and /var/tmp cleanup for unix systems
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.
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
Nikos Skalkotos [Thu, 8 Mar 2012 15:32:04 +0000 (17:32 +0200)]
Add progress bar for the guestfs launch method
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.
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.
Nikos Skalkotos [Mon, 5 Mar 2012 14:13:05 +0000 (16:13 +0200)]
Fix a bug in get_passworded_users
Nikos Skalkotos [Mon, 5 Mar 2012 13:45:00 +0000 (15:45 +0200)]
Add external dependencies in setuptools
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!
Nikos Skalkotos [Wed, 29 Feb 2012 12:27:04 +0000 (14:27 +0200)]
Fix minor typos
Nikos Skalkotos [Tue, 28 Feb 2012 20:12:52 +0000 (22:12 +0200)]
Document basic classes and methods
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.
Nikos Skalkotos [Tue, 28 Feb 2012 16:26:26 +0000 (18:26 +0200)]
Make DiskDevice.shrink() return the new disk size
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
Nikos Skalkotos [Wed, 22 Feb 2012 16:22:17 +0000 (18:22 +0200)]
Fix code for cleanup of image data
Nikos Skalkotos [Mon, 20 Feb 2012 17:59:43 +0000 (19:59 +0200)]
Add OS specific classes
Nikos Skalkotos [Fri, 17 Feb 2012 18:30:36 +0000 (20:30 +0200)]
Use libguestfs to access the image
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
Nikos Skalkotos [Wed, 15 Feb 2012 17:19:46 +0000 (19:19 +0200)]
Initial commit