summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-11-06 11:12:28 +0000
committerNeil Williams <codehelp@debian.org>2015-11-06 11:12:28 +0000
commitde7ee920cb2a0b9918ff980f2ad59e83dec5452f (patch)
treed9659136ccfb992866438ea021bb359fd022c0b7 /examples
parent9da95b81d867ae1c2646191cf396461a00abed5a (diff)
downloadvmdebootstrap-de7ee920cb2a0b9918ff980f2ad59e83dec5452f.tar.gz
add support for username/password tests
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/lava-submit.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/lava-submit.py b/examples/lava-submit.py
index ae89758..546dddc 100755
--- a/examples/lava-submit.py
+++ b/examples/lava-submit.py
@@ -46,6 +46,8 @@ TOKEN = ""
HOSTNAME = ""
IMAGE = ""
ARCH = ""
+PROMPT = ""
+PASSWORD = "" # leave empty if no root password
def job(image):
@@ -62,7 +64,7 @@ def job(image):
}, {
'boot': {
'media': 'tmpfs',
- 'prompts': ["root@debian:"],
+ 'prompts': [PROMPT],
'auto_login': {
"login_prompt": "login:",
"username": "root"
@@ -75,6 +77,12 @@ def job(image):
"context": { "arch": ARCH },
'timeouts': {'action': {'minutes': 1}, 'job': {'minutes': 5}},
'visibility': 'public'}
+ if PASSWORD:
+ boot = [action['boot'] for action in job_def['actions'] if 'boot' in action][0]
+ boot['auto_login'].update({
+ "password_prompt": "Password:",
+ "password": PASSWORD
+ })
return job_def