projects
/
snf-image-creator
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Further development in bundle_volume
[snf-image-creator]
/
image_creator
/
dialog_wizard.py
diff --git
a/image_creator/dialog_wizard.py
b/image_creator/dialog_wizard.py
index
f0a01f4
..
a66cf38
100644
(file)
--- a/
image_creator/dialog_wizard.py
+++ b/
image_creator/dialog_wizard.py
@@
-175,6
+175,13
@@
class WizardYesNoPage(WizardPage):
def wizard(session):
def wizard(session):
+ init_account = Kamaki.get_account()
+ if init_account is None:
+ init_account = ""
+
+ init_token = Kamaki.get_token()
+ if init_token is None:
+ init_token = ""
name = WizardInputPage("ImageName", "Please provide a name for the image:",
title="Image Name", init=session['device'].distro)
name = WizardInputPage("ImageName", "Please provide a name for the image:",
title="Image Name", init=session['device'].distro)
@@
-186,11
+193,11
@@
def wizard(session):
account = WizardInputPage("account",
"Please provide your ~okeanos account e-mail:",
title="~okeanos account information",
account = WizardInputPage("account",
"Please provide your ~okeanos account e-mail:",
title="~okeanos account information",
- init=Kamaki.get_account())
+ init=init_account)
token = WizardInputPage("token",
"Please provide your ~okeanos account token:",
title="~okeanos account token",
token = WizardInputPage("token",
"Please provide your ~okeanos account token:",
title="~okeanos account token",
- init=Kamaki.get_token())
+ init=init_token)
msg = "All necessary information has been gathered. Confirm and Proceed."
proceed = WizardYesNoPage(msg, title="Confirmation")
msg = "All necessary information has been gathered. Confirm and Proceed."
proceed = WizardYesNoPage(msg, title="Confirmation")
@@
-219,6
+226,10
@@
def create_image(session):
image_os = session['image_os']
wizard = session['wizard']
image_os = session['image_os']
wizard = session['wizard']
+ # Save Kamaki credentials
+ Kamaki.save_account(wizard['account'])
+ Kamaki.save_token(wizard['token'])
+
with_progress = OutputWthProgress(True)
out = disk.out
out.add(with_progress)
with_progress = OutputWthProgress(True)
out = disk.out
out.add(with_progress)