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
062dedef
Commit
062dedef
authored
Aug 04, 2014
by
Nikos Skalkotos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix minor pylint warning and output messages
parent
1aa0184e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
image_creator/dialog_wizard.py
image_creator/dialog_wizard.py
+1
-1
image_creator/disk.py
image_creator/disk.py
+4
-3
image_creator/os_type/windows/__init__.py
image_creator/os_type/windows/__init__.py
+2
-2
No files found.
image_creator/dialog_wizard.py
View file @
062dedef
...
...
@@ -489,7 +489,7 @@ def create_image(session, answers):
text
=
"The %s image was successfully uploaded to the storage service "
\
"and registered with the compute service of %s. Would you like "
\
"to keep a local copy?"
%
\
(
answers
[
'
Cloud'
],
answers
[
'RegistrationType'
].
lower
()
)
(
answers
[
'
RegistrationType'
].
lower
(),
answers
[
'Cloud'
]
)
if
not
session
[
'dialog'
].
yesno
(
text
,
width
=
PAGE_WIDTH
):
extract_image
(
session
)
...
...
image_creator/disk.py
View file @
062dedef
...
...
@@ -152,8 +152,8 @@ class Disk(object):
"""Creates a snapshot of the original source media of the Disk
instance.
"""
self
.
out
.
output
(
"Snapshotting media source ..."
,
False
)
size
=
blockdev
(
'--getsz'
,
self
.
device
)
self
.
out
.
output
(
"Snapshotting media source ..."
,
False
)
cowfd
,
cow
=
tempfile
.
mkstemp
(
dir
=
self
.
tmp
)
os
.
close
(
cowfd
)
self
.
_add_cleanup
(
os
.
unlink
,
cow
)
...
...
@@ -165,7 +165,8 @@ class Disk(object):
tablefd
,
table
=
tempfile
.
mkstemp
()
try
:
try
:
os
.
write
(
tablefd
,
"0 %d snapshot %s %s n 8"
%
os
.
write
(
tablefd
,
"0 %d snapshot %s %s n 8"
%
(
int
(
size
),
self
.
device
,
cowdev
))
finally
:
os
.
close
(
tablefd
)
...
...
image_creator/os_type/windows/__init__.py
View file @
062dedef
...
...
@@ -549,7 +549,7 @@ class Windows(OSBase):
# Since the password is reset when logging in, sleep a little
# bit before checking the connectivity, to avoid race
# conditions
time
.
sleep
(
2
)
time
.
sleep
(
5
)
self
.
out
.
output
(
"Checking connectivity to the VM ..."
,
False
)
self
.
_check_connectivity
()
...
...
@@ -835,7 +835,7 @@ class Windows(OSBase):
"""
with
self
.
mount
(
readonly
=
False
,
silent
=
True
):
# Reset Password
self
.
_add_cleanup
(
'virtio'
,
self
.
registry
.
reset_passwd
,
self
.
_add_cleanup
(
'virtio'
,
self
.
registry
.
reset_passwd
,
self
.
vm
.
admin
.
rid
,
self
.
registry
.
reset_passwd
(
self
.
vm
.
admin
.
rid
))
...
...
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