Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
snf-image-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
snf-image-creator
Commits
b2fa1397
Commit
b2fa1397
authored
Aug 07, 2014
by
Nikos Skalkotos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rephrase various messages
parent
7094b43e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
22 deletions
+27
-22
image_creator/bundle_volume.py
image_creator/bundle_volume.py
+2
-2
image_creator/dialog_main.py
image_creator/dialog_main.py
+4
-4
image_creator/dialog_menu.py
image_creator/dialog_menu.py
+7
-6
image_creator/dialog_util.py
image_creator/dialog_util.py
+3
-4
image_creator/dialog_wizard.py
image_creator/dialog_wizard.py
+3
-2
image_creator/image.py
image_creator/image.py
+2
-1
image_creator/os_type/windows/__init__.py
image_creator/os_type/windows/__init__.py
+6
-3
No files found.
image_creator/bundle_volume.py
View file @
b2fa1397
...
...
@@ -395,8 +395,8 @@ class BundleVolume(object):
# Create the file systems
for
i
,
dev
in
mapped
.
iteritems
():
fs
=
filesystem
[
i
].
fs
self
.
out
.
output
(
'Creating %s file
system on partition %d ... '
%
(
fs
,
i
),
False
)
self
.
out
.
output
(
'Creating %s file
system on partition %d ... '
%
(
fs
,
i
),
False
)
get_command
(
'mkfs.%s'
%
fs
)(
*
(
MKFS_OPTS
[
fs
]
+
[
dev
]))
# For ext[234] enable the default mount options
...
...
image_creator/dialog_main.py
View file @
b2fa1397
...
...
@@ -111,11 +111,11 @@ def create_image(d, media, out, tmp):
msg
=
"snf-image-creator detected a %s system on the input media. "
\
"Would you like to run a wizard to assist you through the "
\
"image creation process?
\n\n
Choose <Wizard> to run the wizard,"
\
" <Expert> to run
the snf-image-creator in expert mode or
"
\
"
press
ESC to quit the program."
\
%
(
image
.
ostype
if
image
.
ostype
==
image
.
distro
or
" <Expert> to run
snf-image-creator in expert mode or press
"
\
"ESC to quit the program."
\
%
(
image
.
ostype
.
capitalize
()
if
image
.
ostype
==
image
.
distro
or
image
.
distro
==
"unknown"
else
"%s (%s)"
%
(
image
.
ostype
,
image
.
distro
))
(
image
.
ostype
.
capitalize
(),
image
.
distro
.
capitalize
()
))
update_background_title
(
session
)
...
...
image_creator/dialog_menu.py
View file @
b2fa1397
...
...
@@ -369,13 +369,14 @@ def kamaki_menu(session):
if
'account'
not
in
session
and
'cloud'
in
session
:
cloud
+=
" <invalid>"
upload
=
session
[
"upload"
]
if
"upload"
in
session
else
"<none>"
choices
=
[(
"Add/Edit"
,
"Add/Edit cloud accounts"
),
(
"Delete"
,
"Delete existing cloud accounts"
),
(
"Cloud"
,
"Select cloud account to use: %s"
%
cloud
),
(
"Upload"
,
"Upload image to the cloud"
),
(
"Register"
,
"Register image with the cloud: %s"
%
upload
)]
(
"Upload"
,
"Upload image to the cloud"
)]
if
'upload'
in
session
:
choices
.
append
((
"Register"
,
"Register image with the cloud: %s"
%
session
[
'upload'
]))
(
code
,
choice
)
=
d
.
menu
(
text
=
"Choose one of the following or press <Back> to go back."
,
...
...
@@ -893,7 +894,7 @@ def customization_menu(session):
choices
=
[]
if
hasattr
(
image
.
os
,
"install_virtio_drivers"
):
choices
.
append
((
"Virt
io
"
,
"Install or update the VirtIO drivers"
))
choices
.
append
((
"Virt
IO
"
,
"Install or update the VirtIO drivers"
))
choices
.
extend
(
[(
"Sysprep"
,
"Run various image preparation tasks"
),
(
"Properties"
,
"View & Modify image properties"
),
...
...
@@ -901,7 +902,7 @@ def customization_menu(session):
default_item
=
0
actions
=
{
"Virt
io
"
:
virtio
,
actions
=
{
"Virt
IO
"
:
virtio
,
"Sysprep"
:
sysprep
,
"Properties"
:
modify_properties
,
"Exclude"
:
exclude_tasks
}
...
...
image_creator/dialog_util.py
View file @
b2fa1397
...
...
@@ -111,8 +111,8 @@ def update_background_title(session):
postfix
=
" (shrinked)"
if
image
.
os
.
shrinked
else
''
title
=
"OS: %s, Distro: %s, Size: %dMB%s, Source: %s"
%
\
(
image
.
ostype
,
image
.
distro
,
size
,
postfix
,
os
.
path
.
abspath
(
disk
.
source
))
(
image
.
ostype
.
capitalize
(),
image
.
distro
.
capitalize
(),
size
,
postfix
,
os
.
path
.
abspath
(
disk
.
source
))
d
.
setBackgroundTitle
(
title
)
...
...
@@ -379,8 +379,7 @@ def update_sysprep_param(session, name, title=None):
value
=
answer
.
strip
()
if
param
.
set_value
(
value
)
is
False
:
d
.
msgbox
(
"Unable to update the value. Reason: %s"
%
param
.
error
,
width
=
WIDTH
)
d
.
msgbox
(
"Error: %s"
%
param
.
error
,
width
=
WIDTH
)
param
.
error
=
None
continue
break
...
...
image_creator/dialog_wizard.py
View file @
b2fa1397
...
...
@@ -337,7 +337,7 @@ def start_wizard(session):
# Create VirtIO Installation Page
def
display_installed_drivers
():
"""Return
es the installed virtio
drivers"""
"""Return
s the installed VirtIO
drivers"""
image
=
session
[
'image'
]
versions
=
virtio_versions
(
image
.
os
.
virtio_state
)
...
...
@@ -378,10 +378,11 @@ def start_wizard(session):
return
drv_dir
title
=
"Please select a directory that hosts VirtIO drivers."
virtio
=
WizardInfoPage
(
"virtio"
,
"Press <New> to install new VirtIO drivers."
,
display_installed_drivers
,
title
=
"VirtIO Drivers"
,
extra_label
=
'New'
,
extra
=
lambda
:
update_sysprep_param
(
session
,
'virtio'
),
extra
=
lambda
:
update_sysprep_param
(
session
,
'virtio'
,
title
=
title
),
validate
=
validate_virtio
,
print_name
=
"VirtIO Drivers Path"
)
# Create Image Registration Wizard Page
...
...
image_creator/image.py
View file @
b2fa1397
...
...
@@ -132,8 +132,9 @@ class Image(object):
# process has opened pipes. Since the recovery process is an optional
# feature of libguestfs, it's better to disable it.
if
self
.
check_guestfs_version
(
1
,
17
,
14
)
>=
0
:
self
.
out
.
output
(
"Enabling recovery proc
"
)
self
.
out
.
output
(
"Enabling recovery proc
ess ..."
,
False
)
self
.
g
.
set_recovery_proc
(
1
)
self
.
out
.
success
(
'done'
)
else
:
self
.
g
.
set_recovery_proc
(
0
)
...
...
image_creator/os_type/windows/__init__.py
View file @
b2fa1397
...
...
@@ -208,7 +208,8 @@ def virtio_dir_check(dirname):
if
driver
:
return
dirname
raise
ValueError
(
"Invalid VirtIO directory. No VirtIO driver found"
)
raise
ValueError
(
"Could not find any VirtIO driver in this directory. "
"Please select another one."
)
DESCR
=
{
...
...
@@ -383,9 +384,11 @@ class Windows(OSBase):
self
.
vm
.
rexec
(
r
"cscript \Windows\system32\slmgr.vbs /ipk %s"
%
setup_key
)
@
sysprep
(
'Shrinking
the last filesystem
'
)
@
sysprep
(
'Shrinking
file system on the last partition
'
)
def
_shrink
(
self
):
"""Shrink the last filesystem. Make sure the filesystem is defragged"""
"""Shrink the last file system. Please make sure the file system is
defragged.
"""
# Query for the maximum number of reclaimable bytes
cmd
=
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment