Statistics
| Branch: | Tag: | Revision:

root / image_creator / main.py @ efa7a61b

History | View | Annotate | Download (15.3 kB)

# Date Author Comment
0eac0256 07/30/2013 04:43 pm Nikos Skalkotos

Add support for sysprep-parameters

The user may define parameters needed by the os_type classes to perform
the system preparation tasks.

A new needed_sysprep_params method is added to os_type.OSBase that
returns a list with parameters that should be defined by the user.

b21b5519 07/30/2013 04:43 pm Nikos Skalkotos

Add option for printing the needed sysprep params

ffc64d7c 06/20/2013 05:35 pm Nikos Skalkotos

Remove all referencies to words like ~okeanos

In the documentation and the printed messages, remove all references
to ~okeanos, pithos or cyclades.

8e58e699 06/18/2013 06:59 pm Nikos Skalkotos

Change the metadata file format to json

When registring an image, use the information returned by the
kamaki register method to construct the metadata file.

When dumping the image to the local filesystem, store the image
properties and the disk-format info in the metadata file.

b3a4845c 06/18/2013 05:21 pm Nikos Skalkotos

Add --cloud option in snf-image-creator

This options can be used to get the authentication URL and token
from a saved cloud section in the kamaki configuration file

49c07ce3 06/18/2013 04:27 pm Nikos Skalkotos

Comply with kamaki 0.9

  • Change the authentication everywhere to use clouds
    (authentication URL and token pairs)
  • Add menu entries to manage clouds
  • Add an extra -a option in snf-image-creator to allow the user to
    specify authentication URLs
121f3bc0 06/11/2013 05:41 pm Nikos Skalkotos

Code Cleanup

  • Prefix all private methods with _
  • Write missing docstrings
  • Move all public methods above the private ones
  • Add module docstrings where missing
  • Define source code encodings on all modules
71b0ab28 06/07/2013 03:24 pm Nikos Skalkotos

Move mount/umount from image to os_type module

3afe6b44 05/27/2013 01:08 pm Nikos Skalkotos

Share the md5sum and meta file if image is public

If the image gets registered as public allow anyone to read the
metadata and the md5sum file.

03eb7dc8 05/24/2013 02:20 pm Nikos Skalkotos

Check if remote files exist before uploading

Before uploading to pithos, check if any remote file gets
overwritten.

f9153c84 05/23/2013 02:19 pm Nikos Skalkotos

Fix an some error messages in snf-image-creator

84bc469c 05/17/2013 04:11 pm Nikos Skalkotos

Don't execute syspreps if the fs is not mounted rw

Check if the filesystem is mounted read-write before you execute
the do_sysprep function

f5174d2c 03/26/2013 06:28 pm Nikos Skalkotos

Rename DiskDevice class to Image

Rename DiskDevice class to Image and move it to a seperate module.
Also, don't let the user access the os_type/* modules directly. In
Image class create the `os' member variable that will host an
appropriate instance of one of the OSBase classes.

61d14323 03/22/2013 02:57 pm Nikos Skalkotos

Clean-up the code using flake8

c2cf27e8 03/21/2013 12:19 pm Nikos Skalkotos

Don't check the token if -t is not defined

aa486e93 03/20/2013 06:11 pm Nikos Skalkotos

Fix syntax errors

37d581b8 03/18/2013 12:13 am Nikos Skalkotos

Support private images

Support images that can only be deployed by the user that registers
the image to cyclades

fd9af948 03/16/2013 02:53 pm Nikos Skalkotos

Fix minor typos

31160dc8 03/14/2013 03:47 pm Nikos Skalkotos

Use only the token to authenticate to synnefo

You don't need the account name. You can fetch it from astakos using
the authentication token.

c16850ae 01/10/2013 07:11 pm Nikos Skalkotos

Allow users to specify tmp dir for large files

The cow file when creating images or the temporary image file when
bundling the host system may be large. Allow the user to overwrite
the directory under which those files get created.

663f5f80 01/03/2013 02:52 pm Nikos Skalkotos

Minor fixes in output messages

cf5c6de5 11/05/2012 12:34 pm Nikos Skalkotos

Revert "Monkey patch the source to work with gevent"

This reverts commit 883e57b07a5cfcb2d0462d67399bfa57bacba846.
Drop the greenlet support.

883e57b0 11/02/2012 01:39 pm Nikos Skalkotos

Monkey patch the source to work with gevent

Needed by new kamaki, otherwise it throughs an exception at the end.

9c354f13 10/18/2012 05:24 pm Nikos Skalkotos

Handle keaboard interrupts and TERM signals.

a803b449 10/18/2012 11:37 am Nikos Skalkotos

Mount the media ro if --print-sysprep is specified

dcf9274b 09/01/2012 06:29 pm Vangelis Koukis

Fix various typos, add .gitignore file

Fix various typos in messages, add .gitignore file for
automatically produced intermediate files.

dbf466eb 08/08/2012 03:11 pm Nikos Skalkotos

Remove the image size from the image metadata

3582e34d 08/08/2012 11:22 am Nikos Skalkotos

Remove an unused import in main.py

f99fe99d 06/28/2012 01:20 am Nikos Skalkotos

Fix pep8 errors

Fixed many `E127 continuation line over-indented for visual indent'
errors

e7cbfb0a 06/21/2012 06:10 pm Nikos Skalkotos

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

825fe2a6 06/15/2012 12:03 pm Nikos Skalkotos

Open snapshot in binary mode before uploading

df499fea 06/15/2012 11:55 am Nikos Skalkotos

In some circumstances mount the image readonly

If no customization is to be applied the image should be mounted
readonly.

3b7d3fc7 06/15/2012 11:32 am Nikos Skalkotos

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

bb4db5a8 06/14/2012 11:37 am Nikos Skalkotos

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

4e58b51b 06/11/2012 06:28 pm Nikos Skalkotos

Create a new output subpackage

574f2712 06/06/2012 03:14 pm Nikos Skalkotos

Fix copyright date in main.py

46544c32 06/06/2012 02:05 pm Nikos Skalkotos

Check if stdout is a tty

If not then don't output progressbars and colors

e77e66a9 06/05/2012 07:08 pm Nikos Skalkotos

Unify output by creating a seperated output module

All image-creator components now output messages using an instance
of one of the output classes.

5886f568 05/18/2012 07:14 pm Nikos Skalkotos

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

7d3dc857 05/18/2012 05:05 pm Nikos Skalkotos

Add option for passing user-defined image metadata

The metadata passed by the user will overwrite any automatically
collected metadata with the same key.

e8b1b48b 05/04/2012 06:44 pm Nikos Skalkotos

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.

5b801534 04/29/2012 03:21 pm Nikos Skalkotos

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.

e108efd2 04/27/2012 04:52 pm Nikos Skalkotos

Cleanup code in disk module

143e9484 04/25/2012 06:34 pm Nikos Skalkotos

Add new line in metadata and md5sum string

b1aea98e 04/24/2012 03:54 pm Nikos Skalkotos

Minor cleanup (typos, comments, etc)

42ace959 04/24/2012 12:45 pm Nikos Skalkotos

Switch to ansicolor for coloring & fix pep8 errors

b1395967 04/23/2012 06:53 pm Nikos Skalkotos

Use progress for progress bar & implement register

8e3065a0 04/20/2012 05:38 pm Nikos Skalkotos

Add progress bar in pithos upload & compute md5sum

e22aa3a9 04/20/2012 11:29 am Nikos Skalkotos

Seperate snapshoting from get_device in Disk class

997ac76a 04/19/2012 07:39 pm Nikos Skalkotos

Fix image upload

Also rearrange input options

b5430a9f 04/19/2012 04:01 pm Nikos Skalkotos

Make -u and -r input options require an argument

f165adc0 04/10/2012 04:38 pm Nikos Skalkotos

Add options for enabling/disabling sysprep tasks

Also merge data_cleanup tasks with syspreps and did a major cleanup

76d4a1c9 04/09/2012 03:09 pm Nikos Skalkotos

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

979096dd 03/24/2012 02:54 pm Nikos Skalkotos

Add silent mode option

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

39cfd61a 03/24/2012 10:40 am Nikos Skalkotos

Capitalize all image metadata keys

69aa33fa 03/24/2012 10:31 am Nikos Skalkotos

Fix cli options help messages

d603d80d 03/23/2012 07:16 pm Nikos Skalkotos

Move image_extract method into DiskDevice

3f70f242 03/21/2012 08:14 pm Nikos Skalkotos

Fix linux sysprep_acpid & remove output indents

22a6d232 03/20/2012 06:04 pm Nikos Skalkotos

Beautify program's output.

ae48a082 03/19/2012 12:26 pm Nikos Skalkotos

Fix license, copyright and pep8 infractions

0ae01e26 03/16/2012 06:14 pm Nikos Skalkotos

Create an exception based error reporting system

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

9cbb5794 03/13/2012 05:48 pm Nikos Skalkotos

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

3ccb2618 03/09/2012 05:26 pm Nikos Skalkotos

Remove python-losetup dependency

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

1a3f1298 03/08/2012 05:30 pm Nikos Skalkotos

Add options for image upload/register with kamaki

Not workable. Kamaki is not imported yet.

c408053f 02/29/2012 07:47 pm Nikos Skalkotos

Add input options and populate image metadata

Hooray! This is the first release that actually works!

3b2f6619 02/28/2012 10:12 pm Nikos Skalkotos

Document basic classes and methods

8c574358 02/24/2012 03:29 pm Nikos Skalkotos

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...
0d5a999d 02/22/2012 06:22 pm Nikos Skalkotos

Fix code for cleanup of image data

aa2062ba 02/20/2012 07:59 pm Nikos Skalkotos

Add OS specific classes

1377b8a7 02/17/2012 08:30 pm Nikos Skalkotos

Use libguestfs to access the image

d57775d4 02/15/2012 07:19 pm Nikos Skalkotos

Initial commit