msg = "All necessary information has been gathered:\n\n"
for page in self.pages:
msg += " * %s\n" % page.info
- msg += "\nConfirm and Proceed."
+ msg += "\nContinue with the image creation process?"
ret = self.d.yesno(
- msg, width=PAGE_WIDTH, height=12, ok_label="Yes",
- cancel="Back", extra_button=1, extra_label="Quit",
- title="Confirmation")
+ msg, width=PAGE_WIDTH, height=8 + len(self.pages),
+ ok_label="Yes", cancel="Back", extra_button=1,
+ extra_label="Quit", title="Confirmation")
if ret == self.d.DIALOG_CANCEL:
idx -= 1
PREV = -1
def __init__(self, **kargs):
- if 'validate' in kargs:
- validate = kargs['validate']
- else:
- validate = lambda x: x
+ validate = kargs['validate'] if 'validate' in kargs else lambda x: x
setattr(self, "validate", validate)
- if 'display' in kargs:
- display = kargs['display']
- else:
- display = lambda x: x
+ display = kargs['display'] if 'display' in kargs else lambda x: x
setattr(self, "display", display)
def run(self, session, index, total):
out.success('done')
out.output()
- is_public = True if w['ImageRegistration'] == "Public" else False
+ is_public = True if wizard['ImageRegistration'] == "Public" else \
+ False
out.output('Registering %s image with ~okeanos ...' %
- w['ImageRegistration'].lower(), False)
+ wizard['ImageRegistration'].lower(), False)
kamaki.register(wizard['ImageName'], pithos_file, metadata,
is_public)
out.success('done')
msg = "The %s image was successfully uploaded and registered with " \
"~okeanos. Would you like to keep a local copy of the image?" \
- % w['ImageRegistration'].lower()
+ % wizard['ImageRegistration'].lower()
if not d.yesno(msg, width=PAGE_WIDTH):
extract_image(session)