Skip to content

Commit

Permalink
Fix some grammar issues (Azure#5081)
Browse files Browse the repository at this point in the history
* Fix spelling of "until" in generic wait command help

* Fix "long-running" to include an internal hyphen

* Remove trailing comma from batch_preparers.py
  • Loading branch information
mboersma authored and derekbekoe committed Dec 12, 2017
1 parent a7444af commit dc3f6bf
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/azure-cli-core/azure/cli/core/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def load_arguments(self):
cmd_args.append(
(self.no_wait_param,
CLICommandArgument(self.no_wait_param, options_list=['--no-wait'], action='store_true',
help='Do not wait for the long running operation to finish.')))
help='Do not wait for the long-running operation to finish.')))
self.arguments.update(cmd_args)

def update_argument(self, param_name, argtype):
Expand Down Expand Up @@ -463,7 +463,7 @@ def __call__(self, poller):
self._delay()
except KeyboardInterrupt:
self.cli_ctx.get_progress_controller().stop()
logger.error('Long running operation wait cancelled. %s', correlation_message)
logger.error('Long-running operation wait cancelled. %s', correlation_message)
raise

try:
Expand Down Expand Up @@ -639,7 +639,7 @@ def command(self, name, method_name=None, command_type=None, **kwargs):
- confirmation: Prompt prior to the action being executed. This is useful if the action
would cause a loss of data. (bool)
- exception_handler: Exception handler for handling non-standard exceptions (function)
- no_wait_param: The name of a boolean parameter that will be exposed as `--no-wait` to skip long running
- no_wait_param: The name of a boolean parameter that will be exposed as `--no-wait` to skip long-running
operation polling. (string)
- transform: Transform function for transforming the output of the command (function)
- table_transformer: Transform function or JMESPath query to be applied to table output to create a
Expand Down
8 changes: 4 additions & 4 deletions src/azure-cli-core/azure/cli/core/commands/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,19 +407,19 @@ def generic_wait_arguments_loader():
)
cmd_args['deleted'] = CLICommandArgument(
'deleted', options_list=['--deleted'], action='store_true', arg_group=group_name,
help='wait till deleted'
help='wait until deleted'
)
cmd_args['created'] = CLICommandArgument(
'created', options_list=['--created'], action='store_true', arg_group=group_name,
help="wait till created with 'provisioningState' at 'Succeeded'"
help="wait until created with 'provisioningState' at 'Succeeded'"
)
cmd_args['updated'] = CLICommandArgument(
'updated', options_list=['--updated'], action='store_true', arg_group=group_name,
help="wait till updated with provisioningState at 'Succeeded'"
help="wait until updated with provisioningState at 'Succeeded'"
)
cmd_args['exists'] = CLICommandArgument(
'exists', options_list=['--exists'], action='store_true', arg_group=group_name,
help="wait till the resource exists"
help="wait until the resource exists"
)
cmd_args['custom'] = CLICommandArgument(
'custom', options_list=['--custom'], arg_group=group_name,
Expand Down
2 changes: 1 addition & 1 deletion src/azure-cli-core/azure/cli/core/commands/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def get_location_type(cli_ctx):

no_wait_type = CLIArgumentType(
options_list=('--no-wait', ),
help='do not wait for the long running operation to finish',
help='do not wait for the long-running operation to finish',
action='store_true'
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Arguments
--resource-group -g [Required]: Name of the resource group.
--keyvault : The KeyVault name or resource ID to be used for an account with
a pool allocation mode of 'User Subscription'.
--no-wait : Do not wait for the long running operation to finish.
--no-wait : Do not wait for the long-running operation to finish.
--storage-account : The storage account name or resource ID to be used for auto
storage.
--tags : Space separated tags in 'key[=value]' format.
Expand Down Expand Up @@ -130,7 +130,7 @@ Command
Arguments
--name -n [Required]: Name of the Batch account.
--resource-group -g [Required]: Name of the resource group.
--no-wait : Do not wait for the long running operation to finish.
--no-wait : Do not wait for the long-running operation to finish.
--yes -y : Do not prompt for confirmation.

Global Arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __call__(self, poller):
result = super(PolicyUpdateResultTransform, self).__call__(poller)
return result.properties.authorization_policies

# Deleting IoT Hub is a long running operation. Due to API implementation issue, 404 error will be thrown during
# Deleting IoT Hub is a long-running operation. Due to API implementation issue, 404 error will be thrown during
# deletion of an IoT Hub.
# This is a work around to suppress the 404 error. It should be removed after API is fixed.
class HubDeleteResultTransform(LongRunningOperation): # pylint: disable=too-few-public-methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def restore_secret(client, vault_base_url, file_path):
def create_certificate(client, vault_base_url, certificate_name, certificate_policy,
disabled=False, tags=None, validity=None):
cert_attrs = CertificateAttributes(not disabled)
logger.info("Starting long running operation 'keyvault certificate create'")
logger.info("Starting long-running operation 'keyvault certificate create'")

if validity is not None:
certificate_policy['x509_certificate_properties']['validity_in_months'] = validity
Expand All @@ -574,13 +574,13 @@ def create_certificate(client, vault_base_url, certificate_name, certificate_pol
check = client.get_certificate_operation(vault_base_url, certificate_name)
if check.status != 'inProgress':
logger.info(
"Long running operation 'keyvault certificate create' finished with result %s.",
"Long-running operation 'keyvault certificate create' finished with result %s.",
check)
return check
try:
time.sleep(10)
except KeyboardInterrupt:
logger.info("Long running operation wait cancelled.")
logger.info("Long-running operation wait cancelled.")
raise
except Exception as client_exception:
telemetry.set_exception(exception=client_exception, fault_type='cert-create-error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2982,7 +2982,7 @@ def _poll(self, update_cmd):
self._response)
else:
raise BadResponse(
'Location header is missing from long running operation.')
'Location header is missing from long-running operation.')

if failed(self._operation.status):
raise OperationFailed("Operation failed or cancelled")
Expand Down Expand Up @@ -3121,7 +3121,7 @@ def create_vpn_connection(cmd, resource_group_name, connection_name, vnet_gatewa
using an 'ExpressRoute' connection.
:param str authorization_key: The authorization key for the VPN connection.
:param bool enable_bgp: Enable BGP for this VPN connection.
:param bool no_wait: Do not wait for the long running operation to finish.
:param bool no_wait: Do not wait for the long-running operation to finish.
:param bool validate: Display and validate the ARM template but do not create any resources.
"""
from azure.cli.core.util import random_string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ def _default_certificate_profile(subject):

def _create_self_signed_key_vault_certificate(cli_ctx, vault_base_url, certificate_name, certificate_policy, certificate_output_folder=None, disabled=False, tags=None, validity=None):
cert_attrs = CertificateAttributes(not disabled)
logger.info("Starting long running operation 'keyvault certificate create'")
logger.info("Starting long-running operation 'keyvault certificate create'")
if validity is not None:
certificate_policy['x509_certificate_properties']['validity_in_months'] = validity
client = _get_keyVault_not_arm_client(cli_ctx)
Expand All @@ -1525,13 +1525,13 @@ def _create_self_signed_key_vault_certificate(cli_ctx, vault_base_url, certifica
check = client.get_certificate_operation(
vault_base_url, certificate_name)
if check.status != 'inProgress':
logger.info("Long running operation 'keyvault certificate create' finished with result %s.",
logger.info("Long-running operation 'keyvault certificate create' finished with result %s.",
check)
break
try:
time.sleep(10)
except KeyboardInterrupt:
logger.info("Long running operation wait cancelled.")
logger.info("Long-running operation wait cancelled.")
raise
except Exception as client_exception:
message = getattr(client_exception, 'message', client_exception)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def load_arguments(self, _):
with self.argument_context(scope) as c:
c.argument('location', get_location_type(self.cli_ctx), help='Location in which to create VM and related resources. If default location is not configured, will default to the resource group\'s location')
c.argument('tags', tags_type)
c.argument('no_wait', help='Do not wait for the long running operation to finish.')
c.argument('no_wait', help='Do not wait for the long-running operation to finish.')
c.argument('validate', options_list=['--validate'], help='Generate and validate the ARM template without creating any resources.', action='store_true')
c.argument('size', help='The VM size to be created. See https://azure.microsoft.com/en-us/pricing/details/virtual-machines/ for size info.')
c.argument('image', completer=get_urn_aliases_completion_list)
Expand Down

0 comments on commit dc3f6bf

Please sign in to comment.