1
0
mirror of https://github.com/ceph/ceph synced 2024-12-21 02:42:48 +00:00

made help more readable

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
This commit is contained in:
tamil 2013-09-12 15:03:10 -07:00
parent 6552f5a520
commit eb4c575f54
2 changed files with 23 additions and 7 deletions
teuthology

View File

@ -9,6 +9,7 @@ import collections
import tempfile
import os
import time
import textwrap
from argparse import RawTextHelpFormatter
from teuthology import lockstatus as ls
@ -112,9 +113,18 @@ def canonicalize_hostname(s):
return s
def main():
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 = argparse.ArgumentParser(
description='Lock, unlock, or query lock status of machines',
epilog=textwrap.dedent('''
Examples:
teuthology-lock --summary
teuthology-lock --lock-many 1 --machine-type vps
teuthology-lock --lock -t target.yaml
teuthology-lock --list-targets plana01
teuthology-lock --list --brief --owner user@host
teuthology-lock --update --status down --desc testing plana01
'''),
formatter_class=RawTextHelpFormatter)
parser.add_argument(
'-v', '--verbose',
action='store_true',
@ -194,7 +204,7 @@ formatter_class=RawTextHelpFormatter)
parser.add_argument(
'--machine-type',
default=None,
help='Type of machine to lock.It could be mira or plana or burnupi or vps or saya or tala',
help='Type of machine to lock, valid choices: mira | plana | burnupi | vps | saya | tala',
)
parser.add_argument(
'--status',

View File

@ -1,14 +1,20 @@
import argparse
import yaml
import textwrap
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',
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 = argparse.ArgumentParser(
description='Reset test machines',
epilog=textwrap.dedent('''
Examples:
teuthology-nuke -t target.yaml --unlock --owner user@host
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,