Merge lp:~utah/utah/bug1039555 into lp:utah

Proposed by Javier Collado
Status: Merged
Approved by: Javier Collado
Approved revision: 666
Merged at revision: 675
Proposed branch: lp:~utah/utah/bug1039555
Merge into: lp:utah
Diff against target: 720 lines (+340/-71) (has conflicts)
20 files modified
Makefile (+6/-2)
client-Makefile (+6/-2)
client.py (+16/-14)
debian/control (+4/-0)
debian/rules (+3/-0)
debian/utah-client.manpages (+1/-0)
debian/utah.manpages (+4/-0)
docs/Makefile (+1/-0)
docs/source/conf.py (+100/-2)
docs/source/introduction.rst (+1/-1)
docs/source/man/run_install_test.py.rst (+26/-0)
docs/source/man/run_test_cobbler.py.rst (+26/-0)
docs/source/man/run_test_vm.py.rst (+26/-0)
docs/source/man/run_utah_tests.py.rst (+26/-0)
docs/source/man/utah.rst (+16/-0)
examples/run_install_test.py (+22/-14)
examples/run_test_cobbler.py (+15/-10)
examples/run_test_vm.py (+15/-10)
examples/run_utah_tests.py (+25/-15)
utah_howto.txt (+1/-1)
Text conflict in debian/control
Text conflict in docs/source/conf.py
To merge this branch: bzr merge lp:~utah/utah/bug1039555
Reviewer Review Type Date Requested Status
Gema Gomez (community) Approve
Max Brustkern (community) Approve
Review via email: mp+124172@code.launchpad.net

Description of the change

This branch adds manual pages for both the server and the client packages.

The packaging changes have been already reviewed when merging other branches to this one, so the final thing to be reviewed before merging to dev, should be just the text for the manual pages which is autogenerated from the parser objects in the code.

To review this, please follow these steps:
bzr branch lp:~utah/utah/bug1039555
make manpages
man ./docs/build/man/<script>.1

where <script> is any of the scripts in both the client and server packages.

To post a comment you must log in.
Revision history for this message
Max Brustkern (nuclearbob) wrote :

This looks good to me.

review: Approve
Revision history for this message
Gema Gomez (gema) wrote :

The run_utah_tests documentation could do with some explaining on how it uses the other scripts.

The utah document needs a bit more of description, explicitely saying that is only intended to be used for development purposes or when the machine targetted for the testing is the current development machine, that otherwise it'll be used by run_utah_tests after provisioning the test environment.

Other than that I like the documents a lot, please make sure to explain max and joe how to keep them up to date.

review: Approve
lp:~utah/utah/bug1039555 updated
664. By Javier Collado

Updated description to describe what the client actually does

665. By Javier Collado

Added note to make clear that run_utah_tests is a wrapper around the other scripts

666. By Javier Collado

Added note to describe when `utah` should be used

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2012-08-14 16:42:41 +0000
3+++ Makefile 2012-09-14 11:09:20 +0000
4@@ -1,5 +1,5 @@
5 PYC_PATTERN?=*.pyc
6-all: client conf/utah/bootspeed-preseed.cfg conf/utah/bridged-network-vm.xml conf/utah/config
7+all: client conf/utah/bootspeed-preseed.cfg conf/utah/bridged-network-vm.xml conf/utah/config manpages
8
9 client:
10 [ -d "client" ] || mkdir client
11@@ -17,6 +17,9 @@
12 conf/utah/config:
13 ./utah/config.py > conf/utah/config
14
15+manpages:
16+ cd docs && make man
17+
18 clean:
19 find . -name "$(PYC_PATTERN)" -delete
20 rm -rf client
21@@ -25,5 +28,6 @@
22 rm -f utah/config
23 rm -f utah_*
24 rm -f utah-*
25+ cd docs && make clean
26
27-.PHONY: client clean
28+.PHONY: client clean manpages
29
30=== modified file 'client-Makefile'
31--- client-Makefile 2012-05-21 14:05:50 +0000
32+++ client-Makefile 2012-09-14 11:09:20 +0000
33@@ -1,4 +1,4 @@
34-all: utah-client_fake_all.deb utah/config
35+all: utah-client_fake_all.deb utah/config manpages
36
37 utah-client_fake_all.deb:
38 touch utah-client_fake_all.deb
39@@ -6,7 +6,11 @@
40 utah/config:
41 touch utah/config
42
43+manpages:
44+ cd docs && make man
45+
46 clean:
47 rm utah/config
48+ cd docs && make clean
49
50-.PHONY: clean
51+.PHONY: clean manpages
52
53=== modified file 'client.py'
54--- client.py 2012-08-31 09:25:38 +0000
55+++ client.py 2012-09-14 11:09:20 +0000
56@@ -14,23 +14,28 @@
57 from utah.client.exceptions import UTAHClientError
58
59
60-def process_cmdline_argparse():
61+def get_parser():
62 """
63 Process the command line arguments.
64 """
65-
66 # requires Python2.7+
67 import argparse
68
69 parser = argparse.ArgumentParser(
70- description='Ubuntu Automation Testing Harness')
71+ description='''Run test cases locally and write results to a file.
72+
73+Note: This is expected to be used only for development purposes on a machine
74+that has been provisioned using run_utah_tests.py''',
75+ formatter_class=argparse.RawTextHelpFormatter)
76 parser.add_argument('--resume', action='store_true',
77 help='Continue a previous run. Used after a reboot')
78 parser.add_argument('-s', '--state-file',
79- help=('File to use for storing state (default "%s"'
80+ help=('File to use for storing state (default "%s")'
81 % DEFAULT_STATE_FILE))
82- parser.add_argument('-f', '--format', choices=['text', 'yaml', 'json'],
83- default='yaml', help='Output format (default "yaml")')
84+ parser.add_argument('-f', '--format',
85+ choices=['text', 'yaml', 'json'],
86+ default='yaml',
87+ help='Output format (default "%(default)s")')
88 parser.add_argument('-t', '--testdir',
89 default='/var/lib/utah', help='Main test directory')
90 parser.add_argument('-i', '--install-type',
91@@ -49,13 +54,7 @@
92 parser.add_argument('-d', '--debug', action='store_true',
93 help='Print debugging output')
94
95- args = parser.parse_args()
96-
97- return args
98-
99-# TODO: write <2.7 optparse version and set based on version of python
100-# being used.
101-process_cmdline = process_cmdline_argparse
102+ return parser
103
104
105 def exit(returncode, msg):
106@@ -77,7 +76,10 @@
107 """
108 The main driver for the 'utah' application.
109 """
110- args = process_cmdline()
111+ # TODO: write <2.7 optparse version and set based on version of python
112+ # being used.
113+ parser = get_parser()
114+ args = parser.parse_args()
115
116 # When resuming, this script is invoked as root by rc.local
117 # No group membership is assigned then, so root needs to be able to run
118
119=== modified file 'debian/control'
120--- debian/control 2012-09-13 12:41:29 +0000
121+++ debian/control 2012-09-14 11:09:20 +0000
122@@ -3,7 +3,11 @@
123 X-Python-Version: >= 2.5
124 Priority: optional
125 Maintainer: Max Brustkern <max@canonical.com>
126+<<<<<<< TREE
127 Build-Depends: debhelper (>= 7.0.50~), devscripts, python-all
128+=======
129+Build-Depends: debhelper (>= 7.0.50~), devscripts, python-all, python-sphinx
130+>>>>>>> MERGE-SOURCE
131 Standards-Version: 3.9.3
132 Homepage: https://code.launchpad.net/utah
133 Vcs-Bzr: https://code.launchpad.net/utah
134
135=== modified file 'debian/rules'
136--- debian/rules 2012-08-17 09:47:01 +0000
137+++ debian/rules 2012-09-14 11:09:20 +0000
138@@ -47,3 +47,6 @@
139 fi;\
140 done
141 dh_auto_install
142+
143+override_dh_installman:
144+ dh_installman --language=C
145
146=== added file 'debian/utah-client.manpages'
147--- debian/utah-client.manpages 1970-01-01 00:00:00 +0000
148+++ debian/utah-client.manpages 2012-09-14 11:09:20 +0000
149@@ -0,0 +1,1 @@
150+docs/build/man/utah.1
151
152=== added file 'debian/utah.manpages'
153--- debian/utah.manpages 1970-01-01 00:00:00 +0000
154+++ debian/utah.manpages 2012-09-14 11:09:20 +0000
155@@ -0,0 +1,4 @@
156+docs/build/man/run_install_test.py.1
157+docs/build/man/run_test_cobbler.py.1
158+docs/build/man/run_test_vm.py.1
159+docs/build/man/run_utah_tests.py.1
160
161=== modified file 'docs/Makefile'
162--- docs/Makefile 2012-08-07 16:06:37 +0000
163+++ docs/Makefile 2012-09-14 11:09:20 +0000
164@@ -40,6 +40,7 @@
165
166 clean:
167 -rm -rf $(BUILDDIR)/*
168+ -rm source/man/*.txt # Autogenerated content for man pages
169
170 html:
171 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
172
173=== modified file 'docs/source/conf.py'
174--- docs/source/conf.py 2012-09-06 15:44:36 +0000
175+++ docs/source/conf.py 2012-09-14 11:09:20 +0000
176@@ -12,13 +12,20 @@
177 # All configuration values have a default; values that are commented out
178 # serve to show the default.
179
180+<<<<<<< TREE
181 import sys
182 import os
183+=======
184+import sys, os
185+import itertools
186+import re
187+>>>>>>> MERGE-SOURCE
188
189 # If extensions (or modules to document with autodoc) are in another directory,
190 # add these directories to sys.path here. If the directory is relative to the
191 # documentation root, use os.path.abspath to make it absolute, like shown here.
192 sys.path.insert(0, os.path.abspath('../..'))
193+sys.path.insert(0, os.path.abspath('../../examples'))
194
195
196 class ModuleMock(object):
197@@ -64,14 +71,96 @@
198 'apt', 'apt.cache'):
199 sys.modules[mod_name] = ModuleMock(mod_name)
200
201+<<<<<<< TREE
202 # -- General configuration ----------------------------------------------------
203+=======
204+
205+# Autogenerate help contents for manual pages when building manual pages
206+# Note: This assumes that sphinx-build is called as in the makefile like this:
207+# /usr/bin/sphinx-build -b man <sphinx_opts>
208+if sys.argv[2] == 'man':
209+ def get_parser_strings(script_name, parser):
210+ description = parser.description
211+
212+ help_lines = parser.format_help().splitlines()
213+ options_lines = itertools.dropwhile(
214+ lambda l: l != 'optional arguments:',
215+ help_lines) # Drop usage
216+ options_lines = itertools.takewhile(
217+ lambda l: bool(l),
218+ options_lines) # Drop epilog
219+ options_lines.next() # Drop first line
220+
221+ def fix_line(line):
222+ """
223+ Remove indentation and replace curly braces with angle brackets
224+ to match the expected format
225+ """
226+ line = line[2:]
227+
228+ # Apply changes only to option lines,
229+ # not the ones with the help text
230+ if line.startswith('-'):
231+ line = line.replace('{', '<')
232+ line = line.replace('}', '>')
233+ return line
234+
235+ options_lines = [fix_line(line) for line in options_lines]
236+ options = '\n'.join(options_lines)
237+
238+ if parser.epilog is None:
239+ epilog = ''
240+ else:
241+ # Highlight program name and options
242+ epilog = parser.epilog % {'prog': '**%s**' % script_name}
243+ epilog = re.sub(r'(-\w)', r'**\1**', epilog)
244+
245+ # Duplicate backslashes to avoid dropping them
246+ # because of the rst formatting
247+ epilog = re.sub(r'\\', r'\\\\', epilog)
248+
249+ # Drop 'For example:'
250+ epilog = '\n'.join(epilog.splitlines()[1:])
251+
252+ # Use line blocks to preserve line breaks
253+ # Make sure that block is in a separate paragraph
254+ epilog = re.sub(r'^\t', '\n| ', epilog, flags=re.M, count=1)
255+ epilog = re.sub(r'^\t', '| ', epilog, flags=re.M)
256+
257+ return description, options, epilog
258+
259+ module_names = ('client', 'run_install_test', 'run_test_cobbler',
260+ 'run_test_vm', 'run_utah_tests')
261+ for module_name in module_names:
262+ module = __import__(module_name)
263+ parser = module.get_parser()
264+ if module_name == 'client':
265+ script_name = 'utah'
266+ else:
267+ script_name = '{}.py'.format(module_name)
268+ description, options, epilog = get_parser_strings(script_name, parser)
269+
270+ for section_name in ('description', 'options', 'epilog'):
271+ section = locals()[section_name]
272+ filename = 'man/{}_{}.txt'.format(module_name, section_name)
273+ with open(filename, 'w') as f:
274+ f.write(section)
275+
276+# -- General configuration -----------------------------------------------------
277+>>>>>>> MERGE-SOURCE
278
279 # If your documentation needs a minimal Sphinx version, state it here.
280 #needs_sphinx = '1.0'
281
282+<<<<<<< TREE
283 # Add any Sphinx extension module names here, as strings. They can be
284 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
285 extensions = ['sphinx.ext.autodoc']
286+=======
287+# Add any Sphinx extension module names here, as strings. They can be extensions
288+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
289+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
290+>>>>>>> MERGE-SOURCE
291
292 # Add any paths that contain templates here, relative to this directory.
293 templates_path = ['_templates']
294@@ -261,8 +350,17 @@
295 # One entry per manual page. List of tuples
296 # (source start file, name, description, authors, manual section).
297 man_pages = [
298- ('index', 'utah', u'UTAH Documentation',
299- [u'Canonical Ltd'], 1)
300+ ('man/utah', 'utah', u'UTAH client test runner',
301+ [u'Canonical Ltd'], 1),
302+ ('man/run_install_test.py', 'run_install_test.py',
303+ u'UTAH server test runner (provisioning)', [u'Canonical Ltd'], 1),
304+ ('man/run_test_cobbler.py', 'run_test_cobbler.py',
305+ u'UTAH server test runner (physical hardware)', [u'Canonical Ltd'], 1),
306+ ('man/run_test_vm.py', 'run_test_vm.py',
307+ u'UTAH server test runner (virtual hardware)',
308+ [u'Canonical Ltd'], 1),
309+ ('man/run_utah_tests.py', 'run_utah_tests.py',
310+ u'UTAH server test runner (any hardware)', [u'Canonical Ltd'], 1),
311 ]
312
313 # If true, show URL addresses after external links.
314
315=== modified file 'docs/source/introduction.rst'
316--- docs/source/introduction.rst 2012-08-20 14:54:00 +0000
317+++ docs/source/introduction.rst 2012-09-14 11:09:20 +0000
318@@ -124,7 +124,7 @@
319 Variant of architecture, i.e., armel, armhf
320 -n, --no-destroy Preserve machine after tests have run
321 -d, --debug Enable debug logging
322- -j, --json Enable json logging (Default is YAML)
323+ -j, --json Enable json logging (default is YAML)
324
325 For example::
326
327
328=== added directory 'docs/source/man'
329=== added file 'docs/source/man/run_install_test.py.rst'
330--- docs/source/man/run_install_test.py.rst 1970-01-01 00:00:00 +0000
331+++ docs/source/man/run_install_test.py.rst 2012-09-14 11:09:20 +0000
332@@ -0,0 +1,26 @@
333+:orphan:
334+
335+run_install_test.py manual page
336+===============================
337+
338+Synopsis
339+--------
340+**run_install_test.py** [options] [runlist ...]
341+
342+Description
343+-----------
344+.. include:: run_install_test_description.txt
345+
346+Options
347+-------
348+.. include:: run_install_test_options.txt
349+
350+Examples
351+--------
352+.. include:: run_install_test_epilog.txt
353+
354+See also
355+--------
356+:manpage:`run_test_cobbler.py(1)`
357+:manpage:`run_test_vm.py(1)`
358+:manpage:`run_utah_tests.py(1)`
359
360=== added file 'docs/source/man/run_test_cobbler.py.rst'
361--- docs/source/man/run_test_cobbler.py.rst 1970-01-01 00:00:00 +0000
362+++ docs/source/man/run_test_cobbler.py.rst 2012-09-14 11:09:20 +0000
363@@ -0,0 +1,26 @@
364+:orphan:
365+
366+run_test_cobbler.py manual page
367+===============================
368+
369+Synopsis
370+--------
371+**run_test_cobbler.py** [options] [runlist ...]
372+
373+Description
374+-----------
375+.. include:: run_test_cobbler_description.txt
376+
377+Options
378+-------
379+.. include:: run_test_cobbler_options.txt
380+
381+Examples
382+--------
383+.. include:: run_test_cobbler_epilog.txt
384+
385+See also
386+--------
387+:manpage:`run_install_test.py(1)`
388+:manpage:`run_test_vm.py(1)`
389+:manpage:`run_utah_tests.py(1)`
390
391=== added file 'docs/source/man/run_test_vm.py.rst'
392--- docs/source/man/run_test_vm.py.rst 1970-01-01 00:00:00 +0000
393+++ docs/source/man/run_test_vm.py.rst 2012-09-14 11:09:20 +0000
394@@ -0,0 +1,26 @@
395+:orphan:
396+
397+run_test_vm.py manual page
398+==========================
399+
400+Synopsis
401+--------
402+**run_test_vm.py** [options] [runlist ...]
403+
404+Description
405+-----------
406+.. include:: run_test_vm_description.txt
407+
408+Options
409+-------
410+.. include:: run_test_vm_options.txt
411+
412+Examples
413+--------
414+.. include:: run_test_vm_epilog.txt
415+
416+See also
417+--------
418+:manpage:`run_install_test.py(1)`
419+:manpage:`run_test_cobbler.py(1)`
420+:manpage:`run_utah_tests.py(1)`
421
422=== added file 'docs/source/man/run_utah_tests.py.rst'
423--- docs/source/man/run_utah_tests.py.rst 1970-01-01 00:00:00 +0000
424+++ docs/source/man/run_utah_tests.py.rst 2012-09-14 11:09:20 +0000
425@@ -0,0 +1,26 @@
426+:orphan:
427+
428+run_utah_tests.py manual page
429+==============================
430+
431+Synopsis
432+--------
433+**run_utah_tests.py** [options] [runlist ...]
434+
435+Description
436+-----------
437+.. include:: run_utah_tests_description.txt
438+
439+Options
440+-------
441+.. include:: run_utah_tests_options.txt
442+
443+Examples
444+--------
445+.. include:: run_utah_tests_epilog.txt
446+
447+See also
448+--------
449+:manpage:`run_install_test.py(1)`
450+:manpage:`run_test_cobbler.py(1)`
451+:manpage:`run_test_vm.py(1)`
452
453=== added file 'docs/source/man/utah.rst'
454--- docs/source/man/utah.rst 1970-01-01 00:00:00 +0000
455+++ docs/source/man/utah.rst 2012-09-14 11:09:20 +0000
456@@ -0,0 +1,16 @@
457+:orphan:
458+
459+utah manual page
460+================
461+
462+Synopsis
463+--------
464+**utah** [options]
465+
466+Description
467+-----------
468+.. include:: client_description.txt
469+
470+Options
471+-------
472+.. include:: client_options.txt
473
474=== modified file 'examples/run_install_test.py'
475--- examples/run_install_test.py 2012-08-20 20:56:16 +0000
476+++ examples/run_install_test.py 2012-09-14 11:09:20 +0000
477@@ -16,14 +16,17 @@
478 description=('Provision a machine '
479 'and run one or more UTAH runlists there.'),
480 epilog=("For example:\n"
481- "\t%(prog)s -s precise -t server -a i386 "
482- "/usr/share/utah/client/examples/master.run "
483- "'http://people.canonical.com/~max/max_test.run'"),
484+ "Provision a VM using a precise server image "
485+ "with i386 architecture and run the two given runlists\n"
486+ "\t%(prog)s -s precise -t server -a i386 \\\n"
487+ "\t\t/usr/share/utah/client/examples/master.run \\\n"
488+ "\t\t'http://people.canonical.com/~max/max_test.run'"),
489 formatter_class=argparse.RawDescriptionHelpFormatter)
490 parser.add_argument('runlists', metavar='runlist', nargs='+',
491 type=url_argument, help='URLs of runlist files to run')
492- parser.add_argument('-m', '--machinetype', choices=('physical', 'virtual'),
493- default='virtual', help='Type of machine to provision')
494+ parser.add_argument('-m', '--machinetype', metavar='MACHINETYPE',
495+ choices=('physical', 'virtual'), default='virtual',
496+ help='Type of machine to provision (%(choices)s)')
497 parser.add_argument('-e', '--emulator',
498 help=('Emulator to use (kvm and qemu are supported, '
499 'kvm will be favored if available)'))
500@@ -42,15 +45,18 @@
501 parser.add_argument('-g', '--gigabytes', action='append',
502 help=('Size in gigabytes of virtual disk, '
503 'specify more than once for multiple disks'))
504- parser.add_argument('-s', '--series',
505+ parser.add_argument('-s', '--series', metavar='SERIES',
506 choices=('hardy', 'lucid', 'natty',
507 'oneiric', 'precise', 'quantal'),
508- help='Series to use for installation')
509- parser.add_argument('-t', '--type',
510+ help='Series to use for installation (%(choices)s)')
511+ parser.add_argument('-t', '--type', metavar='TYPE',
512 choices=('desktop', 'server', 'mini', 'alternate'),
513- help='Install type to use for installation')
514- parser.add_argument('-a', '--arch', choices=('i386', 'amd64', 'arm'),
515- help='Architecture to use for installation')
516+ help=('Install type to use for installation '
517+ '(%(choices)s)'))
518+ parser.add_argument('-a', '--arch', metavar='ARCH',
519+ choices=('i386', 'amd64', 'arm'),
520+ help=('Architecture to use for installation '
521+ '(%(choices)s)'))
522 parser.add_argument('-v', '--variant',
523 help='Variant of architecture, i.e., armel, armhf')
524 parser.add_argument('-n', '--no-destroy', action='store_true',
525@@ -58,9 +64,11 @@
526 parser.add_argument('-d', '--debug', action='store_true',
527 help='Enable debug logging')
528 parser.add_argument('-j', '--json', action='store_true',
529- help='Enable json logging (Default is YAML)')
530- parser.add_argument('--diskbus', choices=('virtio', 'sata', 'ide'),
531- help='Disk bus to use for customvm installation')
532+ help='Enable json logging (default is YAML)')
533+ parser.add_argument('--diskbus', metavar='DISKBUS',
534+ choices=('virtio', 'sata', 'ide'),
535+ help=('Disk bus to use for customvm installation '
536+ '(%(choices)s)'))
537 return parser
538
539
540
541=== modified file 'examples/run_test_cobbler.py'
542--- examples/run_test_cobbler.py 2012-08-30 08:34:34 +0000
543+++ examples/run_test_cobbler.py 2012-09-14 11:09:20 +0000
544@@ -15,9 +15,11 @@
545 description=('Provision a machine using cobbler '
546 'and run one or more UTAH runlists there.'),
547 epilog=("For example:\n"
548- "\t%(prog)s -s precise -t server -a i386 "
549- "/usr/share/utah/client/examples/master.run "
550- "'http://people.canonical.com/~max/max_test.run'"),
551+ "Provision a machine using a precise server image "
552+ "with i386 architecture and run the two given runlists\n"
553+ "\t%(prog)s -s precise -t server -a i386 \\\n"
554+ "\t\t/usr/share/utah/client/examples/master.run \\\n"
555+ "\t\t'http://people.canonical.com/~max/max_test.run'"),
556 formatter_class=argparse.RawDescriptionHelpFormatter)
557 parser.add_argument('runlists', metavar='runlist', nargs='+',
558 help='URLs of runlist files to run')
559@@ -26,19 +28,22 @@
560 help='Image/ISO file to use for installation')
561 parser.add_argument('-p', '--preseed', type=url_argument,
562 help='Preseed file to use for installation')
563- parser.add_argument('-s', '--series',
564+ parser.add_argument('-s', '--series', metavar='SERIES',
565 choices=('hardy', 'lucid', 'natty',
566 'oneiric', 'precise', 'quantal'),
567- help='Series to use for VM creation')
568- parser.add_argument('-t', '--type',
569+ help='Series to use for VM creation (%(choices)s)')
570+ parser.add_argument('-t', '--type', metavar='TYPE',
571 choices=('desktop', 'server', 'mini', 'alternate'),
572- help='Install type to use for VM creation')
573- parser.add_argument('-a', '--arch', choices=('i386', 'amd64'),
574- help='Architecture to use for VM creation')
575+ help=('Install type to use for VM creation '
576+ '(%(choices)s)'))
577+ parser.add_argument('-a', '--arch', metavar='ARCH',
578+ choices=('i386', 'amd64'),
579+ help=('Architecture to use for VM creation '
580+ '(%(choices)s)'))
581 parser.add_argument('-d', '--debug', action='store_true',
582 help='Enable debug logging')
583 parser.add_argument('-j', '--json', action='store_true',
584- help='Enable json logging (Default is YAML)')
585+ help='Enable json logging (default is YAML)')
586 return parser
587
588
589
590=== modified file 'examples/run_test_vm.py'
591--- examples/run_test_vm.py 2012-08-20 21:00:06 +0000
592+++ examples/run_test_vm.py 2012-09-14 11:09:20 +0000
593@@ -14,27 +14,32 @@
594 description=('Create a virtual machine '
595 'and run a UTAH runlist there.'),
596 epilog=("For example:\n"
597- "\t%(prog)s -s precise -t server -a i386 "
598- "/usr/share/utah/client/examples/master.run "
599- "'http://people.canonical.com/~max/max_test.run'"),
600+ "Provision a VM using a precise server image "
601+ "with i386 architecture and run the two given runlists\n"
602+ "\t%(prog)s -s precise -t server -a i386 \\\n"
603+ "\t\t/usr/share/utah/client/examples/master.run \\\n"
604+ "\t\t'http://people.canonical.com/~max/max_test.run'"),
605 formatter_class=argparse.RawDescriptionHelpFormatter)
606 parser.add_argument('runlists', metavar='runlist', nargs='+',
607 help='URLs of runlist files to run')
608- parser.add_argument('-s', '--series',
609+ parser.add_argument('-s', '--series', metavar='SERIES',
610 choices=('hardy', 'lucid', 'natty',
611 'oneiric', 'precise', 'quantal'),
612- help='Series to use for VM creation')
613- parser.add_argument('-t', '--type',
614+ help='Series to use for VM creation (%(choices)s)')
615+ parser.add_argument('-t', '--type', metavar='TYPE',
616 choices=('desktop', 'server', 'mini', 'alternate'),
617- help='Install type to use for VM creation')
618- parser.add_argument('-a', '--arch', choices=('i386', 'amd64'),
619- help='Architecture to use for VM creation')
620+ help=('Install type to use for VM creation '
621+ '(%(choices)s)'))
622+ parser.add_argument('-a', '--arch', metavar='ARCH',
623+ choices=('i386', 'amd64'),
624+ help=('Architecture to use for VM creation '
625+ '(%(choices)s)'))
626 parser.add_argument('-n', '--no-destroy', action='store_true',
627 help='Preserve VM after tests have run')
628 parser.add_argument('-d', '--debug', action='store_true',
629 help='Enable debug logging')
630 parser.add_argument('-j', '--json', action='store_true',
631- help='Enable json logging (Default is YAML)')
632+ help='Enable json logging (default is YAML)')
633 return parser
634
635
636
637=== modified file 'examples/run_utah_tests.py'
638--- examples/run_utah_tests.py 2012-08-30 08:35:45 +0000
639+++ examples/run_utah_tests.py 2012-09-14 11:09:20 +0000
640@@ -13,16 +13,21 @@
641 def get_parser():
642 parser = argparse.ArgumentParser(
643 description=('Provision a machine '
644- 'and run one or more UTAH runlists there.'),
645+ 'and run one or more UTAH runlists there.\n\n'
646+ 'The appropriate run_*.py script will be called, '
647+ 'depending on the parameters passed.'),
648 epilog=("For example:\n"
649- "\t%(prog)s -s precise -t server -a i386 "
650- "/usr/share/utah/client/examples/master.run "
651- "'http://people.canonical.com/~max/max_test.run'"),
652+ "Provision a VM using a precise server image "
653+ "with i386 architecture and run the two given runlists\n"
654+ "\t%(prog)s -s precise -t server -a i386 \\\n"
655+ "\t\t/usr/share/utah/client/examples/master.run \\\n"
656+ "\t\t'http://people.canonical.com/~max/max_test.run'"),
657 formatter_class=argparse.RawDescriptionHelpFormatter)
658 parser.add_argument('runlists', metavar='runlist', nargs='+',
659 type=url_argument, help='URLs of runlist files to run')
660- parser.add_argument('-m', '--machinetype', choices=('physical', 'virtual'),
661- default='virtual', help='Type of machine to provision')
662+ parser.add_argument('-m', '--machinetype', metavar='MACHINETYPE',
663+ choices=('physical', 'virtual'), default='virtual',
664+ help='Type of machine to provision (%(choices)s)')
665 parser.add_argument('-e', '--emulator',
666 help=('Emulator to use (kvm and qemu are supported, '
667 'kvm will be favored if available)'))
668@@ -41,15 +46,18 @@
669 parser.add_argument('-g', '--gigabytes', action='append',
670 help=('Size in gigabytes of virtual disk, '
671 'specify more than once for multiple disks'))
672- parser.add_argument('-s', '--series',
673+ parser.add_argument('-s', '--series', metavar='SERIES',
674 choices=('hardy', 'lucid', 'natty',
675 'oneiric', 'precise', 'quantal'),
676- help='Series to use for installation')
677- parser.add_argument('-t', '--type',
678+ help='Series to use for installation (%(choices)s)')
679+ parser.add_argument('-t', '--type', metavar='TYPE',
680 choices=('desktop', 'server', 'mini', 'alternate'),
681- help='Install type to use for installation')
682- parser.add_argument('-a', '--arch', choices=('i386', 'amd64', 'arm'),
683- help='Architecture to use for installation')
684+ help=('Install type to use for installation '
685+ '(%(choices)s)'))
686+ parser.add_argument('-a', '--arch', metavar='ARCH',
687+ choices=('i386', 'amd64', 'arm'),
688+ help=('Architecture to use for installation '
689+ '(%(choices)s)'))
690 parser.add_argument('-v', '--variant',
691 help='Variant of architecture, i.e., armel, armhf')
692 parser.add_argument('-n', '--no-destroy', action='store_true',
693@@ -57,9 +65,11 @@
694 parser.add_argument('-d', '--debug', action='store_true',
695 help='Enable debug logging')
696 parser.add_argument('-j', '--json', action='store_true',
697- help='Enable json logging (Default is YAML)')
698- parser.add_argument('--diskbus', choices=('virtio', 'sata', 'ide'),
699- help='Disk bus to use for customvm installation')
700+ help='Enable json logging (default is YAML)')
701+ parser.add_argument('--diskbus', metavar='DISKBUS',
702+ choices=('virtio', 'sata', 'ide'),
703+ help=('Disk bus to use for customvm installation '
704+ '(%(choices)s)'))
705 parser.add_argument('--name', help='Name of machine to provision'
706 + ' (currently only supported for physical machine'
707 + ' provisioning)')
708
709=== modified file 'utah_howto.txt'
710--- utah_howto.txt 2012-08-02 14:18:50 +0000
711+++ utah_howto.txt 2012-09-14 11:09:20 +0000
712@@ -60,7 +60,7 @@
713 usage: utah [-h] [--resume] [-s STATE_FILE] [-f {text,yaml}] [-t TESTDIR]
714 [-r RUNLIST] [-o OUTPUT] [-a] [-d]
715
716-Ubuntu Automation Testing Harness
717+Ubuntu Testing Automation Harness
718
719 optional arguments:
720 -h, --help show this help message and exit

Subscribers

People subscribed via source and target branches

to all changes: