From 40d6c60f13f2a97d9c94c1bfcc03f21cc4254e8b Mon Sep 17 00:00:00 2001 From: tamil Date: Wed, 11 Sep 2013 17:13:22 -0700 Subject: [PATCH] feature # 5942. Added examples to teuthology binaries help page Signed-off-by: tamil --- teuthology/lock.py | 9 +++++---- teuthology/nuke.py | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/teuthology/lock.py b/teuthology/lock.py index 0d99fb37ce..2869196aa3 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -10,6 +10,7 @@ import tempfile import os import time +from argparse import RawTextHelpFormatter from teuthology import lockstatus as ls from teuthology import misc as teuthology @@ -111,9 +112,9 @@ def canonicalize_hostname(s): return s def main(): - parser = argparse.ArgumentParser(description=""" -Lock, unlock, or query lock status of machines. -""") + parser = argparse.ArgumentParser(description='Lock, unlock, or query lock status of machines', +epilog='Examples: \n teuthology-lock --summary \n teuthology-lock --lock-many 1 --machine-type vps \n teuthology-lock --lock -t target.yaml \n teuthology-lock --list-targets plana01 \n teuthology-lock --list --brief --owner user@host \n teuthology-lock --update --status down --desc testing plana01', +formatter_class=RawTextHelpFormatter) parser.add_argument( '-v', '--verbose', action='store_true', @@ -193,7 +194,7 @@ Lock, unlock, or query lock status of machines. parser.add_argument( '--machine-type', default=None, - help='Type of machine to lock', + help='Type of machine to lock.It could be mira or plana or burnupi or vps or saya or tala', ) parser.add_argument( '--status', diff --git a/teuthology/nuke.py b/teuthology/nuke.py index 9aa4354f4c..6659a6870c 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -1,11 +1,14 @@ import argparse import yaml +from argparse import RawTextHelpFormatter def parse_args(): from teuthology.run import config_file from teuthology.run import MergeConfig - parser = argparse.ArgumentParser(description='Reset test machines') + parser = argparse.ArgumentParser(description='Reset test machines', +epilog='Examples: \n teuthology-nuke -t target.yaml --unlock --owner user@host \n teuthology-nuke -t target.yaml --pid 1234 --unlock --owner user@host \n', +formatter_class=RawTextHelpFormatter) parser.add_argument( '-v', '--verbose', action='store_true', default=None, -- 2.39.5