~nuclearbob/utah/bug1043419

« back to all changes in this revision

Viewing changes to client.py

  • Committer: Javier Collado
  • Date: 2012-08-31 09:25:38 UTC
  • mfrom: (663.2.2 utah_install_type)
  • Revision ID: javier.collado@canonical.com-20120831092538-p9vioe3dzsyawrta
Merged lp:~joetalbott/utah/install_type

The changes add `--install-type` option to the client, so that it can add this
information to the results. Also, it enables de server to pass this to the
client when executing it.

Note: the server knows the install type based on the ISO image contents.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
                        default='yaml', help='Output format (default "yaml")')
34
34
    parser.add_argument('-t', '--testdir',
35
35
                        default='/var/lib/utah', help='Main test directory')
 
36
    parser.add_argument('-i', '--install-type',
 
37
                        choices=['desktop', 'server', 'mini', 'alternate'],
 
38
                        default='desktop',
 
39
                        help='Installation Variant (i.e. server, desktop, etc.)')
36
40
    parser.add_argument('-r', '--runlist', type=url_argument,
37
41
                        # Having a default here means that if a resume happens
38
42
                        # post-reboot without a runlist specified, it will
97
101
    testdir = args.testdir
98
102
    runlist = args.runlist
99
103
    output = args.output
 
104
    install_type = args.install_type
100
105
 
101
106
    if args.append:
102
107
        open_flags = 'a'
119
124
 
120
125
    try:
121
126
        state_agent = StateAgentYAML(state_file=state_file)
122
 
        runner = Runner(state_agent=state_agent, result_class=result_class,
123
 
                        runlist=runlist, resume=resume, testdir=testdir)
 
127
        runner = Runner(install_type=install_type, state_agent=state_agent,
 
128
                        result_class=result_class, runlist=runlist,
 
129
                        resume=resume, testdir=testdir)
124
130
        if resume:
125
131
            runner.load_state()
126
132