Skip to content
Snippets Groups Projects
Commit 3505c6fc authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Merge branch 'master' into debian-wheezy

parents 186757a1 9afcc8c9
No related branches found
No related tags found
No related merge requests found
2013-10-09, v0.5.3
* Fix a bug in snf-mkimage expert mode were the program could crash if
the image did not have any image properties
2013-09-09, v0.5.2
* Fix some errors in the ci scripts
2013-08-23, v0.5.1 2013-08-23, v0.5.1
* Allow more characters in the cloud name * Allow more characters in the cloud name
* Fix various bugs * Fix various bugs
......
#!/usr/bin/env sh #!/bin/sh
set -e set -e
PACKAGES_DIR=$1 PACKAGES_DIR=$1
......
!/bin/sh #!/bin/sh
pylint image_creator pylint image_creator
...@@ -50,9 +50,9 @@ copyright = u'2012, 2013 GRNET S.A. All rights reserved' ...@@ -50,9 +50,9 @@ copyright = u'2012, 2013 GRNET S.A. All rights reserved'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.5.1' version = '0.5.3'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.5.1' release = '0.5.3'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
......
...@@ -239,8 +239,8 @@ for more information). ...@@ -239,8 +239,8 @@ for more information).
Creating a new image Creating a new image
==================== ====================
Suppose you want to create a new Ubuntu server image. Download the installation Suppose your host system is a Debian Wheezy and you want to create a new Ubuntu
disk from the Internet: server image. Download the installation disk from the Internet:
.. code-block:: console .. code-block:: console
...@@ -272,7 +272,9 @@ And install the Ubuntu system on this file: ...@@ -272,7 +272,9 @@ And install the Ubuntu system on this file:
use LVM partitions. They are not supported by snf-image-creator. use LVM partitions. They are not supported by snf-image-creator.
You will be able to boot your installed OS and make any changes you want You will be able to boot your installed OS and make any changes you want
(e.g. install openssh-server) using the following command:: (e.g. install openssh-server) using the following command:
.. code-block:: console
$ sudo kvm -m 1G -boot c -drive file=ubuntu.raw,format=raw,cache=none,if=virtio $ sudo kvm -m 1G -boot c -drive file=ubuntu.raw,format=raw,cache=none,if=virtio
......
...@@ -488,6 +488,15 @@ def add_property(session): ...@@ -488,6 +488,15 @@ def add_property(session):
return True return True
def show_properties_help(session):
"""Show help for image properties"""
d = session['dialog']
help_file = get_help_file("image_properties")
assert os.path.exists(help_file)
d.textbox(help_file, title="Image Properties", width=70, height=40)
def modify_properties(session): def modify_properties(session):
"""Modify an existing image property""" """Modify an existing image property"""
d = session['dialog'] d = session['dialog']
...@@ -497,6 +506,19 @@ def modify_properties(session): ...@@ -497,6 +506,19 @@ def modify_properties(session):
for (key, val) in session['metadata'].items(): for (key, val) in session['metadata'].items():
choices.append((str(key), str(val))) choices.append((str(key), str(val)))
if len(choices) == 0:
code = d.yesno(
"No image properties are available. "
"Would you like to add a new one?", width=WIDTH, help_button=1)
if code == d.DIALOG_OK:
if not add_property(session):
return True
elif code == d.DIALOG_CANCEL:
return True
elif code == d.DIALOG_HELP:
show_properties_help(session)
continue
(code, choice) = d.menu( (code, choice) = d.menu(
"In this menu you can edit existing image properties or add new " "In this menu you can edit existing image properties or add new "
"ones. Be careful! Most properties have special meaning and " "ones. Be careful! Most properties have special meaning and "
...@@ -526,9 +548,7 @@ def modify_properties(session): ...@@ -526,9 +548,7 @@ def modify_properties(session):
elif code == d.DIALOG_EXTRA: elif code == d.DIALOG_EXTRA:
add_property(session) add_property(session)
elif code == 'help': elif code == 'help':
help_file = get_help_file("image_properties") show_properties_help(session)
assert os.path.exists(help_file)
d.textbox(help_file, title="Image Properties", width=70, height=40)
def delete_properties(session): def delete_properties(session):
...@@ -539,6 +559,11 @@ def delete_properties(session): ...@@ -539,6 +559,11 @@ def delete_properties(session):
for (key, val) in session['metadata'].items(): for (key, val) in session['metadata'].items():
choices.append((key, "%s" % val, 0)) choices.append((key, "%s" % val, 0))
if len(choices) == 0:
d.msgbox("No available images properties to delete!",
width=SMALL_WIDTH)
return True
(code, to_delete) = d.checklist("Choose which properties to delete:", (code, to_delete) = d.checklist("Choose which properties to delete:",
choices=choices, width=WIDTH) choices=choices, width=WIDTH)
to_delete = map(lambda x: x.strip('"'), to_delete) # needed for OpenSUSE to_delete = map(lambda x: x.strip('"'), to_delete) # needed for OpenSUSE
......
__version__ = "0.5.1"
__version_info__ = ['0', '5', '1'] __version__ = "0.5.3"
__version_vcs_info__ = { __version_vcs_info__ = {
'branch': 'hotfix-0.5.1', 'branch': 'hotfix-0.5.3',
'revid': 'b25b422', 'revid': 'dc0ecb2',
'revno': 393} 'revno': 402}
__version_user_info__ = "skalkoto@darkstar.admin.grnet.gr" __version_user_email__ = "skalkoto@grnet.gr"
__version_user_name__ = "Nikos Skalkotos"
0.5.1 0.5.3
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment