adjust argparse metavar for command help function
'system help addrpool-add' or 'system help addrpool-modify' does not take effect and print empty. simplify metavar and move parameter's grammar to help addrpool_add,addrpool_modify,cluster_add and cluster_modify function are modified accordingly. Closes-Bug: #1807091 Change-Id: I87bfbf46855d257623454a5723a4d843d9f5ec18 Signed-off-by: Sun Austin <austin.sun@intel.com>
This commit is contained in:
parent
025a8cc03c
commit
23415e801b
@ -83,8 +83,9 @@ def _get_range_tuples(data):
|
|||||||
metavar='<network prefix>',
|
metavar='<network prefix>',
|
||||||
help="Network IP address prefix length [REQUIRED]")
|
help="Network IP address prefix length [REQUIRED]")
|
||||||
@utils.arg('--ranges',
|
@utils.arg('--ranges',
|
||||||
metavar='<start-end>,[<start-end],...',
|
metavar='<ranges>',
|
||||||
help="The inclusive range of addresses to allocate")
|
help="The inclusive range of addresses to allocate "
|
||||||
|
"<startaddr1-endaddr1>[,<startaddr2-endaddr2>,...]")
|
||||||
@utils.arg('--order',
|
@utils.arg('--order',
|
||||||
metavar='<sequential | random>',
|
metavar='<sequential | random>',
|
||||||
help="The allocation order within the start/end range")
|
help="The allocation order within the start/end range")
|
||||||
@ -116,8 +117,9 @@ def do_addrpool_add(cc, args):
|
|||||||
metavar='<name>',
|
metavar='<name>',
|
||||||
help="Name of the Address Pool]")
|
help="Name of the Address Pool]")
|
||||||
@utils.arg('--ranges',
|
@utils.arg('--ranges',
|
||||||
metavar='<start-end>,[<start-end],...',
|
metavar='<ranges>',
|
||||||
help="The inclusive range of addresses to allocate")
|
help="The inclusive range of addresses to allocate "
|
||||||
|
"<startaddr1-endaddr1>[,<startaddr2-endaddr2>,...]")
|
||||||
@utils.arg('--order',
|
@utils.arg('--order',
|
||||||
metavar='<sequential | random>',
|
metavar='<sequential | random>',
|
||||||
help="The allocation order within the start/end range")
|
help="The allocation order within the start/end range")
|
||||||
|
@ -86,8 +86,9 @@ if os.path.exists('/var/run/.sysinv_running_in_lab'):
|
|||||||
metavar='<name>',
|
metavar='<name>',
|
||||||
help='Name of the Cluster [REQUIRED]')
|
help='Name of the Cluster [REQUIRED]')
|
||||||
@utils.arg('--peers',
|
@utils.arg('--peers',
|
||||||
metavar='<name~status>,[<name~status],...',
|
metavar='<peers>',
|
||||||
help='The inclusive range of peers to allocate')
|
help='The inclusive range of peers to allocate '
|
||||||
|
"<name~status>[,<name~status>,...]")
|
||||||
def do_cluster_add(cc, args):
|
def do_cluster_add(cc, args):
|
||||||
"""Add Cluster."""
|
"""Add Cluster."""
|
||||||
|
|
||||||
@ -115,8 +116,9 @@ if os.path.exists('/var/run/.sysinv_running_in_lab'):
|
|||||||
metavar='<name>',
|
metavar='<name>',
|
||||||
help="Name of the Cluster")
|
help="Name of the Cluster")
|
||||||
@utils.arg('--peers',
|
@utils.arg('--peers',
|
||||||
metavar='<name-status>,[<name-status],...',
|
metavar='<peers>',
|
||||||
help="The inclusive range of peers to allocate")
|
help="The inclusive range of peers to allocate "
|
||||||
|
"<name~status>[,<name~status>,...]")
|
||||||
def do_cluster_modify(cc, args):
|
def do_cluster_modify(cc, args):
|
||||||
"""Modify Cluster attributes."""
|
"""Modify Cluster attributes."""
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user