Merge "Improve help strings"
This commit is contained in:
commit
f2780df3f2
@ -283,7 +283,7 @@ class OpenStackComputeShell(object):
|
||||
'--debug',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help=_("Print debugging output"))
|
||||
help=_("Print debugging output."))
|
||||
|
||||
parser.add_argument(
|
||||
'--os-cache',
|
||||
@ -297,12 +297,12 @@ class OpenStackComputeShell(object):
|
||||
'--timings',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help=_("Print call timing info"))
|
||||
help=_("Print call timing info."))
|
||||
|
||||
parser.add_argument(
|
||||
'--os-auth-token',
|
||||
default=cliutils.env('OS_AUTH_TOKEN'),
|
||||
help='Defaults to env[OS_AUTH_TOKEN]')
|
||||
help='Defaults to env[OS_AUTH_TOKEN].')
|
||||
|
||||
parser.add_argument(
|
||||
'--os_username',
|
||||
@ -352,7 +352,7 @@ class OpenStackComputeShell(object):
|
||||
parser.add_argument(
|
||||
'--service-type',
|
||||
metavar='<service-type>',
|
||||
help=_('Defaults to compute for most actions'))
|
||||
help=_('Defaults to compute for most actions.'))
|
||||
parser.add_argument(
|
||||
'--service_type',
|
||||
help=argparse.SUPPRESS)
|
||||
@ -361,7 +361,7 @@ class OpenStackComputeShell(object):
|
||||
'--service-name',
|
||||
metavar='<service-name>',
|
||||
default=cliutils.env('NOVA_SERVICE_NAME'),
|
||||
help=_('Defaults to env[NOVA_SERVICE_NAME]'))
|
||||
help=_('Defaults to env[NOVA_SERVICE_NAME].'))
|
||||
parser.add_argument(
|
||||
'--service_name',
|
||||
help=argparse.SUPPRESS)
|
||||
@ -370,7 +370,7 @@ class OpenStackComputeShell(object):
|
||||
'--volume-service-name',
|
||||
metavar='<volume-service-name>',
|
||||
default=cliutils.env('NOVA_VOLUME_SERVICE_NAME'),
|
||||
help=_('Defaults to env[NOVA_VOLUME_SERVICE_NAME]'))
|
||||
help=_('Defaults to env[NOVA_VOLUME_SERVICE_NAME].'))
|
||||
parser.add_argument(
|
||||
'--volume_service_name',
|
||||
help=argparse.SUPPRESS)
|
||||
@ -415,7 +415,7 @@ class OpenStackComputeShell(object):
|
||||
dest='bypass_url',
|
||||
default=cliutils.env('NOVACLIENT_BYPASS_URL'),
|
||||
help="Use this API endpoint instead of the Service Catalog. "
|
||||
"Defaults to env[NOVACLIENT_BYPASS_URL]")
|
||||
"Defaults to env[NOVACLIENT_BYPASS_URL].")
|
||||
parser.add_argument('--bypass_url',
|
||||
help=argparse.SUPPRESS)
|
||||
|
||||
@ -869,7 +869,7 @@ class OpenStackComputeShell(object):
|
||||
'command',
|
||||
metavar='<subcommand>',
|
||||
nargs='?',
|
||||
help='Display help for <subcommand>')
|
||||
help='Display help for <subcommand>.')
|
||||
def do_help(self, args):
|
||||
"""
|
||||
Display help about this program or one of its subcommands.
|
||||
|
@ -391,11 +391,11 @@ def _boot(cs, args):
|
||||
default=os.environ.get('NOVACLIENT_DEFAULT_KEY_NAME'),
|
||||
metavar='<key-name>',
|
||||
help=_("Key name of keypair that should be created earlier with \
|
||||
the command keypair-add"))
|
||||
the command keypair-add."))
|
||||
@cliutils.arg(
|
||||
'--key_name',
|
||||
help=argparse.SUPPRESS)
|
||||
@cliutils.arg('name', metavar='<name>', help=_('Name for the new server'))
|
||||
@cliutils.arg('name', metavar='<name>', help=_('Name for the new server.'))
|
||||
@cliutils.arg(
|
||||
'--user-data',
|
||||
default=None,
|
||||
@ -497,7 +497,7 @@ def _boot(cs, args):
|
||||
metavar="<value>",
|
||||
dest='config_drive',
|
||||
default=False,
|
||||
help=_("Enable config drive"))
|
||||
help=_("Enable config drive."))
|
||||
@cliutils.arg(
|
||||
'--poll',
|
||||
dest='poll',
|
||||
@ -509,7 +509,7 @@ def _boot(cs, args):
|
||||
dest='admin_pass',
|
||||
metavar='<value>',
|
||||
default=None,
|
||||
help=_('Admin password for the instance'))
|
||||
help=_('Admin password for the instance.'))
|
||||
def do_boot(cs, args):
|
||||
"""Boot a new server."""
|
||||
boot_args, boot_kwargs = _boot(cs, args)
|
||||
@ -686,7 +686,7 @@ def do_flavor_list(cs, args):
|
||||
@cliutils.arg(
|
||||
'flavor',
|
||||
metavar='<flavor>',
|
||||
help=_("Name or ID of the flavor to delete"))
|
||||
help=_("Name or ID of the flavor to delete."))
|
||||
def do_flavor_delete(cs, args):
|
||||
"""Delete a specific flavor"""
|
||||
flavorid = _find_flavor(cs, args.flavor)
|
||||
@ -697,7 +697,7 @@ def do_flavor_delete(cs, args):
|
||||
@cliutils.arg(
|
||||
'flavor',
|
||||
metavar='<flavor>',
|
||||
help=_("Name or ID of flavor"))
|
||||
help=_("Name or ID of flavor."))
|
||||
def do_flavor_show(cs, args):
|
||||
"""Show details about the given flavor."""
|
||||
flavor = _find_flavor(cs, args.flavor)
|
||||
@ -707,24 +707,24 @@ def do_flavor_show(cs, args):
|
||||
@cliutils.arg(
|
||||
'name',
|
||||
metavar='<name>',
|
||||
help=_("Name of the new flavor"))
|
||||
help=_("Name of the new flavor."))
|
||||
@cliutils.arg(
|
||||
'id',
|
||||
metavar='<id>',
|
||||
help=_("Unique ID (integer or UUID) for the new flavor."
|
||||
" If specifying 'auto', a UUID will be generated as id"))
|
||||
" If specifying 'auto', a UUID will be generated as ID."))
|
||||
@cliutils.arg(
|
||||
'ram',
|
||||
metavar='<ram>',
|
||||
help=_("Memory size in MB"))
|
||||
help=_("Memory size in MB."))
|
||||
@cliutils.arg(
|
||||
'disk',
|
||||
metavar='<disk>',
|
||||
help=_("Disk size in GB"))
|
||||
help=_("Disk size in GB."))
|
||||
@cliutils.arg(
|
||||
'--ephemeral',
|
||||
metavar='<ephemeral>',
|
||||
help=_("Ephemeral space size in GB (default 0)"),
|
||||
help=_("Ephemeral space size in GB (default 0)."),
|
||||
default=0)
|
||||
@cliutils.arg(
|
||||
'vcpus',
|
||||
@ -733,21 +733,21 @@ def do_flavor_show(cs, args):
|
||||
@cliutils.arg(
|
||||
'--swap',
|
||||
metavar='<swap>',
|
||||
help=_("Swap space size in MB (default 0)"),
|
||||
help=_("Swap space size in MB (default 0)."),
|
||||
default=0)
|
||||
@cliutils.arg(
|
||||
'--rxtx-factor',
|
||||
metavar='<factor>',
|
||||
help=_("RX/TX factor (default 1)"),
|
||||
help=_("RX/TX factor (default 1)."),
|
||||
default=1.0)
|
||||
@cliutils.arg(
|
||||
'--is-public',
|
||||
metavar='<is-public>',
|
||||
help=_("Make flavor accessible to the public (default true)"),
|
||||
help=_("Make flavor accessible to the public (default true)."),
|
||||
type=lambda v: strutils.bool_from_string(v, True),
|
||||
default=True)
|
||||
def do_flavor_create(cs, args):
|
||||
"""Create a new flavor"""
|
||||
"""Create a new flavor."""
|
||||
f = cs.flavors.create(args.name, args.ram, args.vcpus, args.disk, args.id,
|
||||
args.ephemeral, args.swap, args.rxtx_factor,
|
||||
args.is_public)
|
||||
@ -757,19 +757,19 @@ def do_flavor_create(cs, args):
|
||||
@cliutils.arg(
|
||||
'flavor',
|
||||
metavar='<flavor>',
|
||||
help=_("Name or ID of flavor"))
|
||||
help=_("Name or ID of flavor."))
|
||||
@cliutils.arg(
|
||||
'action',
|
||||
metavar='<action>',
|
||||
choices=['set', 'unset'],
|
||||
help=_("Actions: 'set' or 'unset'"))
|
||||
help=_("Actions: 'set' or 'unset'."))
|
||||
@cliutils.arg(
|
||||
'metadata',
|
||||
metavar='<key=value>',
|
||||
nargs='+',
|
||||
action='append',
|
||||
default=[],
|
||||
help=_('Extra_specs to set/unset (only key is necessary on unset)'))
|
||||
help=_('Extra_specs to set/unset (only key is necessary on unset).'))
|
||||
def do_flavor_key(cs, args):
|
||||
"""Set or unset extra_spec for a flavor."""
|
||||
flavor = _find_flavor(cs, args.flavor)
|
||||
@ -888,7 +888,7 @@ def do_network_list(cs, args):
|
||||
@cliutils.arg(
|
||||
'network',
|
||||
metavar='<network>',
|
||||
help=_("uuid or label of network"))
|
||||
help=_("UUID or label of network."))
|
||||
def do_network_show(cs, args):
|
||||
"""Show details about the given network."""
|
||||
network = utils.find_resource(cs.networks, args.network)
|
||||
@ -898,7 +898,7 @@ def do_network_show(cs, args):
|
||||
@cliutils.arg(
|
||||
'network',
|
||||
metavar='<network>',
|
||||
help=_("uuid or label of network"))
|
||||
help=_("UUID or label of network."))
|
||||
def do_network_delete(cs, args):
|
||||
"""Delete network by label or id."""
|
||||
network = utils.find_resource(cs.networks, args.network)
|
||||
@ -924,7 +924,7 @@ def do_network_delete(cs, args):
|
||||
@cliutils.arg(
|
||||
'network',
|
||||
metavar='<network>',
|
||||
help=_("uuid of network"))
|
||||
help=_("UUID of network."))
|
||||
def do_network_disassociate(cs, args):
|
||||
"""Disassociate host and/or project from the given network."""
|
||||
if args.host_only:
|
||||
@ -938,7 +938,7 @@ def do_network_disassociate(cs, args):
|
||||
@cliutils.arg(
|
||||
'network',
|
||||
metavar='<network>',
|
||||
help=_("uuid of network"))
|
||||
help=_("UUID of network."))
|
||||
@cliutils.arg(
|
||||
'host',
|
||||
metavar='<host>',
|
||||
@ -951,7 +951,7 @@ def do_network_associate_host(cs, args):
|
||||
@cliutils.arg(
|
||||
'network',
|
||||
metavar='<network>',
|
||||
help=_("uuid of network"))
|
||||
help=_("UUID of network."))
|
||||
def do_network_associate_project(cs, args):
|
||||
"""Associate project with network."""
|
||||
cs.networks.associate_project(args.network)
|
||||
@ -1029,46 +1029,46 @@ def _filter_network_create_options(args):
|
||||
@cliutils.arg(
|
||||
'--dns1',
|
||||
dest="dns1",
|
||||
metavar="<DNS Address>", help=_('First DNS'))
|
||||
metavar="<DNS Address>", help=_('First DNS.'))
|
||||
@cliutils.arg(
|
||||
'--dns2',
|
||||
dest="dns2",
|
||||
metavar="<DNS Address>",
|
||||
help=_('Second DNS'))
|
||||
help=_('Second DNS.'))
|
||||
@cliutils.arg(
|
||||
'--uuid',
|
||||
dest="uuid",
|
||||
metavar="<network uuid>",
|
||||
help=_('Network UUID'))
|
||||
help=_('Network UUID.'))
|
||||
@cliutils.arg(
|
||||
'--fixed-cidr',
|
||||
dest="fixed_cidr",
|
||||
metavar='<x.x.x.x/yy>',
|
||||
help=_('IPv4 subnet for fixed IPs (ex: 10.20.0.0/16)'))
|
||||
help=_('IPv4 subnet for fixed IPs (ex: 10.20.0.0/16).'))
|
||||
@cliutils.arg(
|
||||
'--project-id',
|
||||
dest="project_id",
|
||||
metavar="<project id>",
|
||||
help=_('Project ID'))
|
||||
help=_('Project ID.'))
|
||||
@cliutils.arg(
|
||||
'--priority',
|
||||
dest="priority",
|
||||
metavar="<number>",
|
||||
help=_('Network interface priority'))
|
||||
help=_('Network interface priority.'))
|
||||
@cliutils.arg(
|
||||
'--mtu',
|
||||
dest="mtu",
|
||||
type=int,
|
||||
help=_('MTU for network'))
|
||||
help=_('MTU for network.'))
|
||||
@cliutils.arg(
|
||||
'--enable-dhcp',
|
||||
dest="enable_dhcp",
|
||||
metavar="<'T'|'F'>",
|
||||
help=_('Enable dhcp'))
|
||||
help=_('Enable DHCP.'))
|
||||
@cliutils.arg(
|
||||
'--dhcp-server',
|
||||
dest="dhcp_server",
|
||||
help=_('Dhcp-server (defaults to gateway address)'))
|
||||
help=_('DHCP-server address (defaults to gateway address)'))
|
||||
@cliutils.arg(
|
||||
'--share-address',
|
||||
dest="share_address",
|
||||
@ -1077,11 +1077,11 @@ def _filter_network_create_options(args):
|
||||
@cliutils.arg(
|
||||
'--allowed-start',
|
||||
dest="allowed_start",
|
||||
help=_('Start of allowed addresses for instances'))
|
||||
help=_('Start of allowed addresses for instances.'))
|
||||
@cliutils.arg(
|
||||
'--allowed-end',
|
||||
dest="allowed_end",
|
||||
help=_('End of allowed addresses for instances'))
|
||||
help=_('End of allowed addresses for instances.'))
|
||||
def do_network_create(cs, args):
|
||||
"""Create a network."""
|
||||
|
||||
@ -1128,12 +1128,12 @@ def do_image_list(cs, _args):
|
||||
@cliutils.arg(
|
||||
'image',
|
||||
metavar='<image>',
|
||||
help=_("Name or ID of image"))
|
||||
help=_("Name or ID of image."))
|
||||
@cliutils.arg(
|
||||
'action',
|
||||
metavar='<action>',
|
||||
choices=['set', 'delete'],
|
||||
help=_("Actions: 'set' or 'delete'"))
|
||||
help=_("Actions: 'set' or 'delete'."))
|
||||
@cliutils.arg(
|
||||
'metadata',
|
||||
metavar='<key=value>',
|
||||
@ -1141,7 +1141,7 @@ def do_image_list(cs, _args):
|
||||
action='append',
|
||||
default=[],
|
||||
help=_('Metadata to add/update or delete (only key is necessary on '
|
||||
'delete)'))
|
||||
'delete).'))
|
||||
def do_image_meta(cs, args):
|
||||
"""Set or Delete metadata on an image."""
|
||||
image = _find_image(cs, args.image)
|
||||
@ -1204,7 +1204,7 @@ def _print_flavor(flavor):
|
||||
@cliutils.arg(
|
||||
'image',
|
||||
metavar='<image>',
|
||||
help=_("Name or ID of image"))
|
||||
help=_("Name or ID of image."))
|
||||
def do_image_show(cs, args):
|
||||
"""Show details about the given image."""
|
||||
image = _find_image(cs, args.image)
|
||||
@ -1250,7 +1250,7 @@ def do_image_delete(cs, args):
|
||||
dest='name',
|
||||
metavar='<name-regexp>',
|
||||
default=None,
|
||||
help=_('Search with regular expression match by name'))
|
||||
help=_('Search with regular expression match by name.'))
|
||||
@cliutils.arg(
|
||||
'--instance-name',
|
||||
dest='instance_name',
|
||||
@ -1265,19 +1265,19 @@ def do_image_delete(cs, args):
|
||||
dest='status',
|
||||
metavar='<status>',
|
||||
default=None,
|
||||
help=_('Search by server status'))
|
||||
help=_('Search by server status.'))
|
||||
@cliutils.arg(
|
||||
'--flavor',
|
||||
dest='flavor',
|
||||
metavar='<flavor>',
|
||||
default=None,
|
||||
help=_('Search by flavor name or ID'))
|
||||
help=_('Search by flavor name or ID.'))
|
||||
@cliutils.arg(
|
||||
'--image',
|
||||
dest='image',
|
||||
metavar='<image>',
|
||||
default=None,
|
||||
help=_('Search by image name or ID'))
|
||||
help=_('Search by image name or ID.'))
|
||||
@cliutils.arg(
|
||||
'--host',
|
||||
dest='host',
|
||||
@ -1331,7 +1331,7 @@ def do_image_delete(cs, args):
|
||||
dest='minimal',
|
||||
action="store_true",
|
||||
default=False,
|
||||
help=_('Get only uuid and name.'))
|
||||
help=_('Get only UUID and name.'))
|
||||
@cliutils.arg(
|
||||
'--sort',
|
||||
dest='sort',
|
||||
@ -1344,7 +1344,7 @@ def do_image_delete(cs, args):
|
||||
dest='marker',
|
||||
metavar='<marker>',
|
||||
default=None,
|
||||
help=('The last server uuid of the previous page; displays list of servers'
|
||||
help=('The last server UUID of the previous page; displays list of servers'
|
||||
' after "marker".'))
|
||||
@cliutils.arg(
|
||||
'--limit',
|
||||
@ -1508,7 +1508,7 @@ def do_reboot(cs, args):
|
||||
dest='minimal',
|
||||
action="store_true",
|
||||
default=False,
|
||||
help=_('Skips flavor/image lookups when showing servers'))
|
||||
help=_('Skips flavor/image lookups when showing servers.'))
|
||||
@cliutils.arg(
|
||||
'--preserve-ephemeral',
|
||||
action="store_true",
|
||||
@ -1518,7 +1518,7 @@ def do_reboot(cs, args):
|
||||
'--name',
|
||||
metavar='<name>',
|
||||
default=None,
|
||||
help=_('Name for the new server'))
|
||||
help=_('Name for the new server.'))
|
||||
@cliutils.arg(
|
||||
'--meta',
|
||||
metavar="<key=value>",
|
||||
@ -1843,19 +1843,19 @@ def do_backup(cs, args):
|
||||
@cliutils.arg(
|
||||
'server',
|
||||
metavar='<server>',
|
||||
help=_("Name or ID of server"))
|
||||
help=_("Name or ID of server."))
|
||||
@cliutils.arg(
|
||||
'action',
|
||||
metavar='<action>',
|
||||
choices=['set', 'delete'],
|
||||
help=_("Actions: 'set' or 'delete'"))
|
||||
help=_("Actions: 'set' or 'delete'."))
|
||||
@cliutils.arg(
|
||||
'metadata',
|
||||
metavar='<key=value>',
|
||||
nargs='+',
|
||||
action='append',
|
||||
default=[],
|
||||
help=_('Metadata to set or delete (only key is necessary on delete)'))
|
||||
help=_('Metadata to set or delete (only key is necessary on delete).'))
|
||||
def do_meta(cs, args):
|
||||
"""Set or Delete metadata on a server."""
|
||||
server = _find_server(cs, args.server)
|
||||
@ -1926,7 +1926,7 @@ def _print_server(cs, args, server=None):
|
||||
dest='minimal',
|
||||
action="store_true",
|
||||
default=False,
|
||||
help=_('Skips flavor/image lookups when showing servers'))
|
||||
help=_('Skips flavor/image lookups when showing servers.'))
|
||||
@cliutils.arg('server', metavar='<server>', help=_('Name or ID of server.'))
|
||||
def do_show(cs, args):
|
||||
"""Show details about the given server."""
|
||||
@ -2288,7 +2288,7 @@ def do_volume_type_create(cs, args):
|
||||
@cliutils.arg(
|
||||
'id',
|
||||
metavar='<id>',
|
||||
help=_("Unique ID of the volume type to delete"))
|
||||
help=_("Unique ID of the volume type to delete."))
|
||||
def do_volume_type_delete(cs, args):
|
||||
"""DEPRECATED: Delete a specific volume type."""
|
||||
emit_volume_deprecation_warning('volume-type-delete')
|
||||
@ -2528,7 +2528,7 @@ def do_floating_ip_pool_list(cs, _args):
|
||||
|
||||
@cliutils.arg(
|
||||
'--host', dest='host', metavar='<host>', default=None,
|
||||
help=_('Filter by host'))
|
||||
help=_('Filter by host.'))
|
||||
def do_floating_ip_bulk_list(cs, args):
|
||||
"""List all floating IPs (nova-network only)."""
|
||||
utils.print_list(cs.floating_ips_bulk.list(args.host), ['project_id',
|
||||
@ -2538,19 +2538,21 @@ def do_floating_ip_bulk_list(cs, args):
|
||||
'interface'])
|
||||
|
||||
|
||||
@cliutils.arg('ip_range', metavar='<range>', help=_('Address range to create'))
|
||||
@cliutils.arg('ip_range', metavar='<range>',
|
||||
help=_('Address range to create.'))
|
||||
@cliutils.arg(
|
||||
'--pool', dest='pool', metavar='<pool>', default=None,
|
||||
help=_('Pool for new Floating IPs'))
|
||||
help=_('Pool for new Floating IPs.'))
|
||||
@cliutils.arg(
|
||||
'--interface', metavar='<interface>', default=None,
|
||||
help=_('Interface for new Floating IPs'))
|
||||
help=_('Interface for new Floating IPs.'))
|
||||
def do_floating_ip_bulk_create(cs, args):
|
||||
"""Bulk create floating IPs by range (nova-network only)."""
|
||||
cs.floating_ips_bulk.create(args.ip_range, args.pool, args.interface)
|
||||
|
||||
|
||||
@cliutils.arg('ip_range', metavar='<range>', help=_('Address range to delete'))
|
||||
@cliutils.arg('ip_range', metavar='<range>',
|
||||
help=_('Address range to delete.'))
|
||||
def do_floating_ip_bulk_delete(cs, args):
|
||||
"""Bulk delete floating IPs by range (nova-network only)."""
|
||||
cs.floating_ips_bulk.delete(args.ip_range)
|
||||
@ -2571,9 +2573,9 @@ def do_dns_domains(cs, args):
|
||||
_print_domain_list(domains)
|
||||
|
||||
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain'))
|
||||
@cliutils.arg('--ip', metavar='<ip>', help=_('IP address'), default=None)
|
||||
@cliutils.arg('--name', metavar='<name>', help=_('DNS name'), default=None)
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
|
||||
@cliutils.arg('--ip', metavar='<ip>', help=_('IP address.'), default=None)
|
||||
@cliutils.arg('--name', metavar='<name>', help=_('DNS name.'), default=None)
|
||||
def do_dns_list(cs, args):
|
||||
"""List current DNS entries for domain and IP or domain and name."""
|
||||
if not (args.ip or args.name):
|
||||
@ -2588,33 +2590,33 @@ def do_dns_list(cs, args):
|
||||
_print_dns_list(entries)
|
||||
|
||||
|
||||
@cliutils.arg('ip', metavar='<ip>', help=_('IP address'))
|
||||
@cliutils.arg('name', metavar='<name>', help=_('DNS name'))
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain'))
|
||||
@cliutils.arg('ip', metavar='<ip>', help=_('IP address.'))
|
||||
@cliutils.arg('name', metavar='<name>', help=_('DNS name.'))
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
|
||||
@cliutils.arg(
|
||||
'--type',
|
||||
metavar='<type>',
|
||||
help=_('dns type (e.g. "A")'),
|
||||
help=_('DNS type (e.g. "A")'),
|
||||
default='A')
|
||||
def do_dns_create(cs, args):
|
||||
"""Create a DNS entry for domain, name and IP."""
|
||||
"""Create a DNS entry for domain, name, and IP."""
|
||||
cs.dns_entries.create(args.domain, args.name, args.ip, args.type)
|
||||
|
||||
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain'))
|
||||
@cliutils.arg('name', metavar='<name>', help=_('DNS name'))
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
|
||||
@cliutils.arg('name', metavar='<name>', help=_('DNS name.'))
|
||||
def do_dns_delete(cs, args):
|
||||
"""Delete the specified DNS entry."""
|
||||
cs.dns_entries.delete(args.domain, args.name)
|
||||
|
||||
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain'))
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
|
||||
def do_dns_delete_domain(cs, args):
|
||||
"""Delete the specified DNS domain."""
|
||||
cs.dns_domains.delete(args.domain)
|
||||
|
||||
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain'))
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
|
||||
@cliutils.arg(
|
||||
'--availability-zone',
|
||||
metavar='<availability-zone>',
|
||||
@ -2630,7 +2632,7 @@ def do_dns_create_private_domain(cs, args):
|
||||
args.availability_zone)
|
||||
|
||||
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain'))
|
||||
@cliutils.arg('domain', metavar='<domain>', help=_('DNS domain.'))
|
||||
@cliutils.arg(
|
||||
'--project', metavar='<project>',
|
||||
help=_('Limit access to this domain to users '
|
||||
@ -3125,12 +3127,12 @@ def do_limits(cs, args):
|
||||
@cliutils.arg(
|
||||
'--start',
|
||||
metavar='<start>',
|
||||
help=_('Usage range start date ex 2012-01-20 (default: 4 weeks ago)'),
|
||||
help=_('Usage range start date ex 2012-01-20. (default: 4 weeks ago)'),
|
||||
default=None)
|
||||
@cliutils.arg(
|
||||
'--end',
|
||||
metavar='<end>',
|
||||
help=_('Usage range end date, ex 2012-01-20 (default: tomorrow)'),
|
||||
help=_('Usage range end date, ex 2012-01-20. (default: tomorrow)'),
|
||||
default=None)
|
||||
def do_usage_list(cs, args):
|
||||
"""List usage data for all tenants."""
|
||||
@ -3174,11 +3176,11 @@ def do_usage_list(cs, args):
|
||||
@cliutils.arg(
|
||||
'--start',
|
||||
metavar='<start>',
|
||||
help=_('Usage range start date ex 2012-01-20 (default: 4 weeks ago)'),
|
||||
help=_('Usage range start date ex 2012-01-20. (default: 4 weeks ago)'),
|
||||
default=None)
|
||||
@cliutils.arg(
|
||||
'--end', metavar='<end>',
|
||||
help=_('Usage range end date, ex 2012-01-20 (default: tomorrow)'),
|
||||
help=_('Usage range end date, ex 2012-01-20. (default: tomorrow)'),
|
||||
default=None)
|
||||
@cliutils.arg(
|
||||
'--tenant',
|
||||
@ -3236,13 +3238,13 @@ def do_usage(cs, args):
|
||||
metavar='<private-key-filename>',
|
||||
nargs='?',
|
||||
default='pk.pem',
|
||||
help=_('Filename for the private key [Default: pk.pem]'))
|
||||
help=_('Filename for the private key. [Default: pk.pem]'))
|
||||
@cliutils.arg(
|
||||
'cert_filename',
|
||||
metavar='<x509-cert-filename>',
|
||||
nargs='?',
|
||||
default='cert.pem',
|
||||
help=_('Filename for the X.509 certificate [Default: cert.pem]'))
|
||||
help=_('Filename for the X.509 certificate. [Default: cert.pem]'))
|
||||
def do_x509_create_cert(cs, args):
|
||||
"""Create x509 cert for a user in tenant."""
|
||||
|
||||
@ -3290,7 +3292,7 @@ def do_x509_get_root_cert(cs, args):
|
||||
'--hypervisor',
|
||||
metavar='<hypervisor>',
|
||||
default=None,
|
||||
help=_('type of hypervisor.'))
|
||||
help=_('Type of hypervisor.'))
|
||||
def do_agent_list(cs, args):
|
||||
"""List all builds."""
|
||||
result = cs.agents.list(args.hypervisor)
|
||||
@ -3299,19 +3301,19 @@ def do_agent_list(cs, args):
|
||||
utils.print_list(result, columns)
|
||||
|
||||
|
||||
@cliutils.arg('os', metavar='<os>', help=_('type of os.'))
|
||||
@cliutils.arg('os', metavar='<os>', help=_('Type of OS.'))
|
||||
@cliutils.arg(
|
||||
'architecture',
|
||||
metavar='<architecture>',
|
||||
help=_('type of architecture'))
|
||||
@cliutils.arg('version', metavar='<version>', help=_('version'))
|
||||
@cliutils.arg('url', metavar='<url>', help=_('url'))
|
||||
@cliutils.arg('md5hash', metavar='<md5hash>', help=_('md5 hash'))
|
||||
help=_('Type of architecture.'))
|
||||
@cliutils.arg('version', metavar='<version>', help=_('Version.'))
|
||||
@cliutils.arg('url', metavar='<url>', help=_('URL.'))
|
||||
@cliutils.arg('md5hash', metavar='<md5hash>', help=_('MD5 hash.'))
|
||||
@cliutils.arg(
|
||||
'hypervisor',
|
||||
metavar='<hypervisor>',
|
||||
default='xen',
|
||||
help=_('type of hypervisor.'))
|
||||
help=_('Type of hypervisor.'))
|
||||
def do_agent_create(cs, args):
|
||||
"""Create new agent build."""
|
||||
result = cs.agents.create(args.os, args.architecture,
|
||||
@ -3320,16 +3322,16 @@ def do_agent_create(cs, args):
|
||||
utils.print_dict(result._info.copy())
|
||||
|
||||
|
||||
@cliutils.arg('id', metavar='<id>', help=_('id of the agent-build'))
|
||||
@cliutils.arg('id', metavar='<id>', help=_('ID of the agent-build.'))
|
||||
def do_agent_delete(cs, args):
|
||||
"""Delete existing agent build."""
|
||||
cs.agents.delete(args.id)
|
||||
|
||||
|
||||
@cliutils.arg('id', metavar='<id>', help=_('id of the agent-build'))
|
||||
@cliutils.arg('version', metavar='<version>', help=_('version'))
|
||||
@cliutils.arg('url', metavar='<url>', help=_('url'))
|
||||
@cliutils.arg('md5hash', metavar='<md5hash>', help=_('md5hash'))
|
||||
@cliutils.arg('id', metavar='<id>', help=_('ID of the agent-build.'))
|
||||
@cliutils.arg('version', metavar='<version>', help=_('Version.'))
|
||||
@cliutils.arg('url', metavar='<url>', help=_('URL'))
|
||||
@cliutils.arg('md5hash', metavar='<md5hash>', help=_('MD5 hash.'))
|
||||
def do_agent_modify(cs, args):
|
||||
"""Modify existing agent build."""
|
||||
result = cs.agents.update(args.id, args.version,
|
||||
@ -3485,7 +3487,7 @@ def _print_aggregate_details(aggregate):
|
||||
@cliutils.arg('server', metavar='<server>', help=_('Name or ID of server.'))
|
||||
@cliutils.arg(
|
||||
'host', metavar='<host>', default=None, nargs='?',
|
||||
help=_('destination host name.'))
|
||||
help=_('Destination host name.'))
|
||||
@cliutils.arg(
|
||||
'--block-migrate',
|
||||
action='store_true',
|
||||
@ -3501,7 +3503,7 @@ def _print_aggregate_details(aggregate):
|
||||
action='store_true',
|
||||
dest='disk_over_commit',
|
||||
default=False,
|
||||
help=_('Allow overcommit.(Default=False)'))
|
||||
help=_('Allow overcommit. (Default=False)'))
|
||||
@cliutils.arg(
|
||||
'--disk_over_commit',
|
||||
action='store_true',
|
||||
@ -3605,7 +3607,7 @@ def do_service_disable(cs, args):
|
||||
@cliutils.arg(
|
||||
'--unset',
|
||||
dest='force_down',
|
||||
help=_("Unset the force state down of service"),
|
||||
help=_("Unset the force state down of service."),
|
||||
action='store_false',
|
||||
default=True)
|
||||
def do_service_force_down(cs, args):
|
||||
@ -3614,7 +3616,7 @@ def do_service_force_down(cs, args):
|
||||
utils.print_list([result], ['Host', 'Binary', 'Forced down'])
|
||||
|
||||
|
||||
@cliutils.arg('id', metavar='<id>', help=_('Id of service.'))
|
||||
@cliutils.arg('id', metavar='<id>', help=_('ID of service.'))
|
||||
def do_service_delete(cs, args):
|
||||
"""Delete the service."""
|
||||
cs.services.delete(args.id)
|
||||
@ -3849,7 +3851,7 @@ def _get_first_endpoint(endpoints, region):
|
||||
|
||||
@cliutils.arg(
|
||||
'--wrap', dest='wrap', metavar='<integer>', default=64,
|
||||
help=_('wrap PKI tokens to a specified length, or 0 to disable'))
|
||||
help=_('Wrap PKI tokens to a specified length, or 0 to disable.'))
|
||||
def do_credentials(cs, _args):
|
||||
"""Show user credentials returned from auth."""
|
||||
if isinstance(cs.client, client.SessionClient):
|
||||
@ -3911,7 +3913,7 @@ def do_credentials(cs, _args):
|
||||
@cliutils.arg(
|
||||
'--extra-opts',
|
||||
dest='extra',
|
||||
help=_('Extra options to pass to ssh. see: man ssh'),
|
||||
help=_('Extra options to pass to ssh. see: man ssh.'),
|
||||
default='')
|
||||
def do_ssh(cs, args):
|
||||
"""SSH into a server."""
|
||||
@ -4173,7 +4175,7 @@ def do_quota_defaults(cs, args):
|
||||
action="store_true",
|
||||
default=None,
|
||||
help=_('Whether force update the quota even if the already used and '
|
||||
'reserved exceeds the new quota'))
|
||||
'reserved exceeds the new quota.'))
|
||||
def do_quota_update(cs, args):
|
||||
"""Update the quotas for a tenant/user."""
|
||||
|
||||
@ -4324,13 +4326,13 @@ def do_quota_class_update(cs, args):
|
||||
dest='password',
|
||||
metavar='<password>',
|
||||
help=_("Set the provided admin password on the evacuated server. Not"
|
||||
" applicable with on-shared-storage flag"))
|
||||
" applicable with on-shared-storage flag."))
|
||||
@cliutils.arg(
|
||||
'--on-shared-storage',
|
||||
dest='on_shared_storage',
|
||||
action="store_true",
|
||||
default=False,
|
||||
help=_('Specifies whether server files are located on shared storage'))
|
||||
help=_('Specifies whether server files are located on shared storage.'))
|
||||
def do_evacuate(cs, args):
|
||||
"""Evacuate server from failed host."""
|
||||
|
||||
@ -4564,7 +4566,7 @@ def do_secgroup_delete_default_rule(cs, args):
|
||||
metavar='<policy>',
|
||||
default=argparse.SUPPRESS,
|
||||
nargs='*',
|
||||
help=_('Policies for the server groups ("affinity" or "anti-affinity")'))
|
||||
help=_('Policies for the server groups. ("affinity" or "anti-affinity")'))
|
||||
@cliutils.arg(
|
||||
'--policy',
|
||||
default=[],
|
||||
@ -4585,7 +4587,7 @@ def do_server_group_create(cs, args):
|
||||
'id',
|
||||
metavar='<id>',
|
||||
nargs='+',
|
||||
help=_("Unique ID(s) of the server group to delete"))
|
||||
help=_("Unique ID(s) of the server group to delete."))
|
||||
def do_server_group_delete(cs, args):
|
||||
"""Delete specific server group(s)."""
|
||||
failure_count = 0
|
||||
@ -4606,7 +4608,7 @@ def do_server_group_delete(cs, args):
|
||||
@cliutils.arg(
|
||||
'id',
|
||||
metavar='<id>',
|
||||
help=_("Unique ID of the server group to get"))
|
||||
help=_("Unique ID of the server group to get."))
|
||||
def do_server_group_get(cs, args):
|
||||
"""Get a specific server group."""
|
||||
server_group = cs.server_groups.get(args.id)
|
||||
|
Loading…
Reference in New Issue
Block a user