Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (23 sloc) 0.619 kb
cdb35d5 adding the #!
BuzzTroll authored
1 #!/usr/bin/env python
2
8fe5c30 more testing framework for cloud client test
BuzzTroll authored
3 import pexpect
4 import sys
446b505 test framework changes
BuzzTroll authored
5 from ConfigParser import SafeConfigParser
6
8fe5c30 more testing framework for cloud client test
BuzzTroll authored
7
8 cmd = "%s %s" % (sys.argv[1], sys.argv[2])
9 logfile = sys.stdout
10 child = pexpect.spawn (cmd, timeout=800, maxread=200000, logfile=logfile)
11 child.expect ('CA Name:')
12 print child.before
13 child.sendline ('CA')
14 child.expect ('Hostname:')
15 print child.before
16 child.sendline ('localhost')
17 x = child.readlines()
18 print x
446b505 test framework changes
BuzzTroll authored
19
20 try:
21 print "setting up ssh knowhosts"
22 child = pexpect.spawn (cmd, timeout=8, maxread=20000, logfile=logfile)
23 child.expect ('(yes/no)?')
24 print child.before
25 child.sendline ('yes')
26 except:
27 pass
Something went wrong with that request. Please try again.