Nikos Skalkotos [Wed, 3 Oct 2012 14:11:22 +0000 (17:11 +0300)]
Fix missing imports introduced in
023e1217b32385ba
Nikos Skalkotos [Tue, 4 Sep 2012 14:45:45 +0000 (17:45 +0300)]
Code cleanup and refactoring
Create a new dialog_menu module to host all the "expert mode" code.
Check the code with a new version of pep8
Vangelis Koukis [Sat, 1 Sep 2012 15:29:47 +0000 (18:29 +0300)]
Fix various typos, add .gitignore file
Fix various typos in messages, add .gitignore file for
automatically produced intermediate files.
Nikos Skalkotos [Wed, 29 Aug 2012 14:13:10 +0000 (17:13 +0300)]
Fix a bug in kamaki menu code
Every time you tried to reupload an image, the dialog displayed the
pithos url instead of the image filename as initial value.
Nikos Skalkotos [Wed, 29 Aug 2012 09:07:23 +0000 (12:07 +0300)]
Fix fix_acpid syspep
Extend the mechanism to recognise events with value "button/power.*"
as power button events. It used to only check for events with value
"button[ /]power".
Nikos Skalkotos [Wed, 29 Aug 2012 08:54:26 +0000 (11:54 +0300)]
Fix cleanup_userdata sysprep
The function used to ignore directories when cleaning sensitive data
Nikos Skalkotos [Fri, 24 Aug 2012 12:43:25 +0000 (15:43 +0300)]
Fix a bug in the kamaki menu
The account info was saved in the token field in .kamakirc
Nikos Skalkotos [Fri, 24 Aug 2012 11:19:02 +0000 (14:19 +0300)]
In wizard update the bg title after shrinking
Nikos Skalkotos [Fri, 24 Aug 2012 09:48:18 +0000 (12:48 +0300)]
Make the cow file size equal to the original media
The size of the cow file was hardcoded to 1G. This was buggy, because
for a big image, the resize operation could fill up the cow file and
fail.
Nikos Skalkotos [Thu, 23 Aug 2012 15:44:54 +0000 (18:44 +0300)]
Fix the wizard confirmation message
Nikos Skalkotos [Thu, 23 Aug 2012 15:17:06 +0000 (18:17 +0300)]
Add support for overwriting yes/no button labels
Fix some typos and overwrite the yes/no labels of the wizard/expert
mode yesno dialog
Nikos Skalkotos [Thu, 23 Aug 2012 09:04:09 +0000 (12:04 +0300)]
Rename CombinedOutput to CompositeOutput
Also move it to a separate module.
Nikos Skalkotos [Wed, 22 Aug 2012 10:37:49 +0000 (13:37 +0300)]
Add logging service in snf-image-creator-dialog
Logging can be enabled using the -l input option
Nikos Skalkotos [Wed, 22 Aug 2012 09:18:37 +0000 (12:18 +0300)]
Fix minor pep8 error
Nikos Skalkotos [Tue, 21 Aug 2012 10:38:54 +0000 (13:38 +0300)]
When in wizard mode, allow local image dumping
After the image has been uploaded to pithos and registered to cyclades,
prompt the user about saving the uploaded image locally.
Nikos Skalkotos [Mon, 20 Aug 2012 10:06:59 +0000 (13:06 +0300)]
Implement a WizardExit exception in dialog_wizard
This exception can be used by the WizardPage instances to exit the
wizard.
Nikos Skalkotos [Wed, 8 Aug 2012 13:34:52 +0000 (16:34 +0300)]
Use the description field inputed in the wizard
Make the ImageDescription field of the dialog wizard overwrite the
DESCRIPTION image property.
Nikos Skalkotos [Wed, 8 Aug 2012 13:13:57 +0000 (16:13 +0300)]
Add a new clear method in the Output class
In the cli output classes this method will clear terminal screen if
the standard output is a terminal.
Nikos Skalkotos [Wed, 8 Aug 2012 12:40:27 +0000 (15:40 +0300)]
Do not allow empty USERS metadata fields
If snf-image-creator does not find any passworded user, then the
USERS metadata field is not created at all.
Nikos Skalkotos [Wed, 8 Aug 2012 12:11:24 +0000 (15:11 +0300)]
Remove the image size from the image metadata
Nikos Skalkotos [Wed, 8 Aug 2012 08:43:20 +0000 (11:43 +0300)]
Make the dialog wizard workable
A user can now create and upload an image using the wizard
Nikos Skalkotos [Wed, 8 Aug 2012 08:22:37 +0000 (11:22 +0300)]
Remove an unused import in main.py
Nikos Skalkotos [Tue, 31 Jul 2012 15:01:58 +0000 (18:01 +0300)]
Add all wizard dialog boxes.
The system does not perform anything yet when in wizard mode.
Nikos Skalkotos [Fri, 27 Jul 2012 17:17:02 +0000 (20:17 +0300)]
Change kamaki account & token retrieval interface
Nikos Skalkotos [Thu, 26 Jul 2012 16:00:40 +0000 (19:00 +0300)]
Move wizard code out of dialog_main.py
Create the new python module to host the aforementioned code.
Nikos Skalkotos [Thu, 26 Jul 2012 15:52:01 +0000 (18:52 +0300)]
Read ~okeanos account/token from kamaki
If present in the kamaki configuration file, the user will read
the ~okeanos credentials using the kamaki config interface.
Whenever the user changes the ~okeanos credentians, the changes are
pushed back to kamaki.
Nikos Skalkotos [Tue, 24 Jul 2012 14:12:36 +0000 (17:12 +0300)]
Add new wizard mode in snf-image-creator-dialog
Not fully implemented yet
Nikos Skalkotos [Thu, 28 Jun 2012 10:50:33 +0000 (13:50 +0300)]
Fix minor typos
Nikos Skalkotos [Wed, 27 Jun 2012 22:20:19 +0000 (01:20 +0300)]
Fix pep8 errors
Fixed many `E127 continuation line over-indented for visual indent'
errors
Nikos Skalkotos [Wed, 27 Jun 2012 15:03:06 +0000 (18:03 +0300)]
Populate image properties with task_metadata
Before extracting an image or registring it with cyclades, the image
properties are populated with metadata concerning excluded deployment
tasks.
Nikos Skalkotos [Wed, 27 Jun 2012 14:42:17 +0000 (17:42 +0300)]
Leave 2048 sectors space at the end when shrinking
Most partition manipulation programs leave 2048 sector empty space
after the last partition.
Nikos Skalkotos [Wed, 27 Jun 2012 09:59:18 +0000 (12:59 +0300)]
Fix a bug in _get_passworded_users method in Unix
The method used a wrong warning output function
Nikos Skalkotos [Tue, 26 Jun 2012 13:42:04 +0000 (16:42 +0300)]
Add image properties help file
Nikos Skalkotos [Tue, 26 Jun 2012 13:35:37 +0000 (16:35 +0300)]
Fix error message for non supported media source
Nikos Skalkotos [Mon, 25 Jun 2012 21:29:11 +0000 (00:29 +0300)]
Fix pep8 errors
Nikos Skalkotos [Mon, 25 Jun 2012 13:21:39 +0000 (16:21 +0300)]
Fix minor typos in dialog_main.py
Nikos Skalkotos [Mon, 25 Jun 2012 13:04:07 +0000 (16:04 +0300)]
Fix a warning message in linux fix_acpid sysprep
Nikos Skalkotos [Mon, 25 Jun 2012 11:39:09 +0000 (14:39 +0300)]
Use vfs_uuid instead of blkid to compute uuid
vfs_uuid is more suitable for this and it whas added before blkid
in guestfs, hence it is supported in more guestfs versions.
Nikos Skalkotos [Mon, 25 Jun 2012 09:57:19 +0000 (12:57 +0300)]
Monitor metadata changes during shrink and sysprep
Inform the user about metadata changes performed during syspreps
execution or image shrinking.
Nikos Skalkotos [Fri, 22 Jun 2012 15:51:59 +0000 (18:51 +0300)]
Populate Shrink menu entry
Also fix various issues. snf-image-creator-dialog is almost ready.
Some `Help' entries are missing.
Nikos Skalkotos [Thu, 21 Jun 2012 16:20:05 +0000 (19:20 +0300)]
Populate Sysprep menu entry
Also create a new output class (InfoBoxOutput) to be used when
performing syspreps
Nikos Skalkotos [Thu, 21 Jun 2012 15:10:22 +0000 (18:10 +0300)]
Add get_sysprep_by_name method in os_type classes
This method returns a sysprep object with a given name. Now,
(enable,disable)_sysprep work with sysprep objects instead of sysprep
names
Nikos Skalkotos [Wed, 20 Jun 2012 23:13:59 +0000 (02:13 +0300)]
Fix a bug introduced in
2e50092b2437913561a37c646e
The do_sysprep method was not updated to comply with the changes
made in list_syspreps method
Nikos Skalkotos [Wed, 20 Jun 2012 16:10:26 +0000 (19:10 +0300)]
Merge Deploy and Customize menu entries
Populate Sysprep entry in "Image Customization Menu". Not fully
working.
Nikos Skalkotos [Wed, 20 Jun 2012 15:30:55 +0000 (18:30 +0300)]
In linux.py make sysprep names for descriptive
Nikos Skalkotos [Wed, 20 Jun 2012 13:28:52 +0000 (16:28 +0300)]
Add sysprep_info method in os_type classes
This method takes a sysprep object as argument and returns the name
and a description for this object.
Nikos Skalkotos [Wed, 20 Jun 2012 12:17:01 +0000 (15:17 +0300)]
Make os_type list_sysprep method return 1 list
The method used to return 2 lists of enabled and disabled sysprep
object. Since sysprep objs contail an `enabled' attribute, it is easy
to determine which of those are enabled and which are not. There is
no need to return 2 seperate lists.
Nikos Skalkotos [Tue, 19 Jun 2012 14:54:51 +0000 (17:54 +0300)]
Add help subpackage
This dir will host help files used by snf-image-create-dialog
Nikos Skalkotos [Mon, 18 Jun 2012 14:30:58 +0000 (17:30 +0300)]
Populate `Deploy' dialog menu entry
Image properties manipulation works fine.
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