diff --git a/azure-cli2017.pyproj b/azure-cli2017.pyproj
index 3d9c6a1a671..90ff4883c55 100644
--- a/azure-cli2017.pyproj
+++ b/azure-cli2017.pyproj
@@ -33,6 +33,7 @@
Code
+
@@ -43,6 +44,7 @@
+
@@ -1087,6 +1089,7 @@
+
@@ -1256,6 +1259,7 @@
+
diff --git a/doc/sphinx/__main__.py b/doc/sphinx/__main__.py
new file mode 100644
index 00000000000..6eabf0afd35
--- /dev/null
+++ b/doc/sphinx/__main__.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+# -*- coding: utf-8 -*-
+
+from __future__ import print_function
+
+import os
+import sphinx
+
+BUILD_DIR = '_build'
+FORMAT = 'xml'
+
+argv = ['sphinx-build', '', 'xml', os.getcwd(), BUILD_DIR]
+sphinx.make_main(argv)
diff --git a/doc/sphinx/azhelpgen/azhelpgen.py b/doc/sphinx/azhelpgen/azhelpgen.py
index 0be1e7c99da..428a798b057 100644
--- a/doc/sphinx/azhelpgen/azhelpgen.py
+++ b/doc/sphinx/azhelpgen/azhelpgen.py
@@ -23,26 +23,28 @@
def get_help_files(cli_ctx):
- invoker = cli_ctx.invocation_cls(cli_ctx=cli_ctx, commands_loader_cls=cli_ctx.commands_loader_cls, parser_cls=cli_ctx.parser_cls, help_cls=cli_ctx.help_cls)
- cli_ctx.invocation = invoker
- cmd_table = invoker.commands_loader.load_command_table(None)
+ cli_ctx.invocation = cli_ctx.invocation_cls(cli_ctx=cli_ctx, commands_loader_cls=cli_ctx.commands_loader_cls, parser_cls=cli_ctx.parser_cls, help_cls=cli_ctx.help_cls)
+ cli_ctx.invocation.commands_loader.load_command_table([])
+ cmd_table = cli_ctx.invocation.commands_loader.command_table
for command in cmd_table:
- invoker.commands_loader.load_arguments(command)
- invoker.parser.load_command_table(invoker.commands_loader.command_table)
+ cli_ctx.invocation.commands_loader.load_arguments(command)
+ cli_ctx.invocation.parser.load_command_table(cli_ctx.invocation.commands_loader)
parser_keys = []
parser_values = []
sub_parser_keys = []
sub_parser_values = []
- _store_parsers(invoker.parser, parser_keys, parser_values, sub_parser_keys, sub_parser_values)
+ _store_parsers(cli_ctx.invocation.parser, parser_keys, parser_values, sub_parser_keys, sub_parser_values)
for cmd, parser in zip(parser_keys, parser_values):
if cmd not in sub_parser_keys:
sub_parser_keys.append(cmd)
sub_parser_values.append(parser)
+
+ help_ctx = cli_ctx.help_cls(cli_ctx=cli_ctx)
help_files = []
for cmd, parser in zip(sub_parser_keys, sub_parser_values):
try:
- help_file = GroupHelpFile(cmd, parser) if _is_group(parser) else CliCommandHelpFile(cmd, parser)
+ help_file = GroupHelpFile(help_ctx, cmd, parser) if _is_group(parser) else CliCommandHelpFile(help_ctx, cmd, parser)
help_file.load(parser)
help_files.append(help_file)
except Exception as ex:
@@ -70,6 +72,8 @@ def make_rst(self):
yield ''
yield '{}:summary: {}'.format(INDENT, help_file.short_summary)
yield '{}:description: {}'.format(INDENT, help_file.long_summary)
+ if help_file.deprecate_info:
+ yield '{}:deprecated: {}'.format(INDENT, help_file.deprecate_info._get_message(help_file.deprecate_info))
if not is_command:
top_group_name = help_file.command.split()[0] if help_file.command else 'az'
yield '{}:docsource: {}'.format(INDENT, doc_source_map[top_group_name] if top_group_name in doc_source_map else '')
@@ -89,6 +93,8 @@ def make_rst(self):
yield '{}.. cliarg:: {}'.format(INDENT, arg.name)
yield ''
yield '{}:required: {}'.format(DOUBLEINDENT, arg.required)
+ if arg.deprecate_info:
+ yield '{}:deprecated: {}'.format(DOUBLEINDENT, arg.deprecate_info._get_message(arg.deprecate_info))
short_summary = arg.short_summary or ''
possible_values_index = short_summary.find(' Possible values include')
short_summary = short_summary[0:possible_values_index
diff --git a/doc/sphinx/cligroup/cligroup.py b/doc/sphinx/cligroup/cligroup.py
index 976dd9e3f5b..a332e86a9ba 100644
--- a/doc/sphinx/cligroup/cligroup.py
+++ b/doc/sphinx/cligroup/cligroup.py
@@ -32,17 +32,21 @@ def get_index_text(self, modname, name):
class CliGroupDirective(CliBaseDirective):
doc_field_types = copy.copy(cli_field_types)
- doc_field_types.append(
+ doc_field_types.extend([
Field('docsource', label='Doc Source', has_arg=False,
- names=('docsource', 'documentsource'))
- )
+ names=('docsource', 'documentsource')),
+ Field('deprecated', label='Deprecated', has_arg=False,
+ names=('deprecated'))
+ ])
class CliCommandDirective(CliBaseDirective):
doc_field_types = copy.copy(cli_field_types)
- doc_field_types.append(
+ doc_field_types.extend([
Field('docsource', label='Doc Source', has_arg=False,
- names=('docsource', 'documentsource'))
- )
+ names=('docsource', 'documentsource')),
+ Field('deprecated', label='Deprecated', has_arg=False,
+ names=('deprecated'))
+ ])
class CliArgumentDirective(CliBaseDirective):
doc_field_types = copy.copy(cli_field_types)
@@ -54,7 +58,9 @@ class CliArgumentDirective(CliBaseDirective):
Field('default', label='Default value', has_arg=False,
names=('default')),
Field('source', label='Values from', has_arg=False,
- names=('source', 'sources'))
+ names=('source', 'sources')),
+ Field('deprecated', label='Deprecated', has_arg=False,
+ names=('deprecated'))
])
class CliExampleDirective(CliBaseDirective):
diff --git a/doc/sphinx/sphinx.pyproj b/doc/sphinx/sphinx.pyproj
new file mode 100644
index 00000000000..e054c9f59ee
--- /dev/null
+++ b/doc/sphinx/sphinx.pyproj
@@ -0,0 +1,47 @@
+
+
+
+ Debug
+ 2.0
+ {049fda00-8c5c-43b8-b908-c60adb29813d}
+
+ __main__.py
+
+ .
+ .
+ {888888a0-9f3d-457c-b088-3a5042f75d52}
+ Standard Python launcher
+ MSBuild|env|$(MSBuildProjectFullPath)
+
+
+
+
+ 10.0
+
+
+
+
+
+
+
+
+ Code
+
+
+
+
+
+
+
+
+ env
+ 3.6
+ env (Python 3.6 (32-bit))
+ Scripts\python.exe
+ Scripts\pythonw.exe
+ PYTHONPATH
+ X86
+
+
+
+
\ No newline at end of file
diff --git a/doc/sphinx/sphinx.sln b/doc/sphinx/sphinx.sln
new file mode 100644
index 00000000000..24c595b39cd
--- /dev/null
+++ b/doc/sphinx/sphinx.sln
@@ -0,0 +1,23 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27703.2018
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "sphinx", "sphinx.pyproj", "{049FDA00-8C5C-43B8-B908-C60ADB29813D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {049FDA00-8C5C-43B8-B908-C60ADB29813D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {049FDA00-8C5C-43B8-B908-C60ADB29813D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {E86FA202-EE47-4610-88A7-EC8B30AD3EF9}
+ EndGlobalSection
+EndGlobal
diff --git a/src/azure-cli-command_modules-nspkg/HISTORY.rst b/src/azure-cli-command_modules-nspkg/HISTORY.rst
index 8295cb94655..0df51314c9e 100644
--- a/src/azure-cli-command_modules-nspkg/HISTORY.rst
+++ b/src/azure-cli-command_modules-nspkg/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.0.2
+++++++
+* Minor fixes.
+
2.0.1
+++++
* minor fixes
diff --git a/src/azure-cli-command_modules-nspkg/setup.py b/src/azure-cli-command_modules-nspkg/setup.py
index f435261a8b0..27067abc8d4 100644
--- a/src/azure-cli-command_modules-nspkg/setup.py
+++ b/src/azure-cli-command_modules-nspkg/setup.py
@@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup
-VERSION = "2.0.1"
+VERSION = "2.0.2"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
diff --git a/src/azure-cli-core/HISTORY.rst b/src/azure-cli-core/HISTORY.rst
index ab49bc353ab..78fdc2247be 100644
--- a/src/azure-cli-core/HISTORY.rst
+++ b/src/azure-cli-core/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.0.41
+++++++
+* Minor fixes
+
2.0.40
++++++
* authentication: support authorization code flow for interactive login
diff --git a/src/azure-cli-core/azure/cli/core/__init__.py b/src/azure-cli-core/azure/cli/core/__init__.py
index 55898d470d0..c00f463b393 100644
--- a/src/azure-cli-core/azure/cli/core/__init__.py
+++ b/src/azure-cli-core/azure/cli/core/__init__.py
@@ -4,12 +4,14 @@
# --------------------------------------------------------------------------------------------
from __future__ import print_function
-__version__ = "2.0.40"
+__version__ = "2.0.41"
import os
import sys
import timeit
+import six
+
from knack.arguments import ArgumentsContext
from knack.cli import CLI
from knack.commands import CLICommandsLoader
@@ -18,7 +20,6 @@
from knack.log import get_logger
from knack.util import CLIError
-import six
logger = get_logger(__name__)
@@ -76,6 +77,9 @@ def get_progress_controller(self, det=False):
self.progress_controller.init_progress(progress.get_progress_view(det))
return self.progress_controller
+ def get_cli_version(self):
+ return __version__
+
def show_version(self):
from azure.cli.core.util import get_az_version_string
print(get_az_version_string())
@@ -126,10 +130,11 @@ def _update_command_table_from_modules(args):
for mod in [m for m in installed_command_modules if m not in BLACKLISTED_MODS]:
try:
start_time = timeit.default_timer()
- module_command_table = _load_module_command_loader(self, args, mod)
+ module_command_table, module_group_table = _load_module_command_loader(self, args, mod)
for cmd in module_command_table.values():
cmd.command_source = mod
self.command_table.update(module_command_table)
+ self.command_group_table.update(module_group_table)
elapsed_time = timeit.default_timer() - start_time
logger.debug("Loaded module '%s' in %.3f seconds.", mod, elapsed_time)
cumulative_elapsed_time += elapsed_time
@@ -173,7 +178,8 @@ def _handle_extension_suppressions(extensions):
# from an extension requires this map to be up-to-date.
# self._mod_to_ext_map[ext_mod] = ext_name
start_time = timeit.default_timer()
- extension_command_table = _load_extension_command_loader(self, args, ext_mod)
+ extension_command_table, extension_group_table = \
+ _load_extension_command_loader(self, args, ext_mod)
for cmd_name, cmd in extension_command_table.items():
cmd.command_source = ExtensionCommandSource(
@@ -182,6 +188,7 @@ def _handle_extension_suppressions(extensions):
preview=ext.preview)
self.command_table.update(extension_command_table)
+ self.command_group_table.update(extension_group_table)
elapsed_time = timeit.default_timer() - start_time
logger.debug("Loaded extension '%s' in %.3f seconds.", ext_name, elapsed_time)
except Exception: # pylint: disable=broad-except
@@ -384,6 +391,8 @@ def get_models(self, *attr_args, **kwargs):
def command_group(self, group_name, command_type=None, **kwargs):
if command_type:
kwargs['command_type'] = command_type
+ if 'deprecate_info' in kwargs:
+ kwargs['deprecate_info'].target = group_name
return self._command_group_cls(self, group_name, **kwargs)
def argument_context(self, scope, **kwargs):
@@ -391,6 +400,10 @@ def argument_context(self, scope, **kwargs):
def _cli_command(self, name, operation=None, handler=None, argument_loader=None, description_loader=None, **kwargs):
+ from knack.deprecation import Deprecated
+
+ kwargs['deprecate_info'] = Deprecated.ensure_new_style_deprecation(self.cli_ctx, kwargs, 'command')
+
if operation and not isinstance(operation, six.string_types):
raise TypeError("Operation must be a string. Got '{}'".format(operation))
if handler and not callable(handler):
@@ -439,6 +452,7 @@ def default_description_loader():
min_api=kwargs.get('min_api'),
max_api=kwargs.get('max_api'),
operation_group=kwargs.get('operation_group')):
+ self._populate_command_group_table_with_subgroups(' '.join(name.split()[:-1]))
self.command_table[name] = self.command_cls(self, name,
handler or default_command_handler,
**kwargs)
diff --git a/src/azure-cli-core/azure/cli/core/_help.py b/src/azure-cli-core/azure/cli/core/_help.py
index e742415d9e8..8046198764a 100644
--- a/src/azure-cli-core/azure/cli/core/_help.py
+++ b/src/azure-cli-core/azure/cli/core/_help.py
@@ -7,6 +7,7 @@
from knack.help import (HelpExample,
HelpFile as KnackHelpFile,
+ CommandHelpFile as KnackCommandHelpFile,
CLIHelp,
HelpParameter,
ArgumentGroupRegistry as KnackArgumentGroupRegistry)
@@ -48,8 +49,27 @@
class AzCliHelp(CLIHelp):
def __init__(self, cli_ctx):
- self.cli_ctx = cli_ctx
- super(AzCliHelp, self).__init__(cli_ctx, PRIVACY_STATEMENT, WELCOME_MESSAGE)
+ super(AzCliHelp, self).__init__(cli_ctx,
+ privacy_statement=PRIVACY_STATEMENT,
+ welcome_message=WELCOME_MESSAGE,
+ command_help_cls=CliCommandHelpFile,
+ help_cls=CliHelpFile)
+ from knack.help import HelpObject
+
+ # TODO: This workaround is used to avoid a bizarre bug in Python 2.7. It
+ # essentially reassigns Knack's HelpObject._normalize_text implementation
+ # with an identical implemenation in Az. For whatever reason, this fixes
+ # the bug in Python 2.7.
+ @staticmethod
+ def new_normalize_text(s):
+ if not s or len(s) < 2:
+ return s or ''
+ s = s.strip()
+ initial_upper = s[0].upper() + s[1:]
+ trailing_period = '' if s[-1] in '.!?' else '.'
+ return initial_upper + trailing_period
+
+ HelpObject._normalize_text = new_normalize_text # pylint: disable=protected-access
@staticmethod
def _print_extensions_msg(help_file):
@@ -60,28 +80,13 @@ def _print_extensions_msg(help_file):
if help_file.command_source.preview:
logger.warning(help_file.command_source.get_preview_warn_msg())
- @classmethod
- def print_detailed_help(cls, cli_name, help_file):
- cls._print_extensions_msg(help_file)
- cls._print_detailed_help(cli_name, help_file)
-
- @classmethod
- def show_help(cls, cli_name, nouns, parser, is_group):
- from knack.help import GroupHelpFile
- delimiters = ' '.join(nouns)
- help_file = CliCommandHelpFile(delimiters, parser) if not is_group else GroupHelpFile(delimiters, parser)
- help_file.load(parser)
- if not nouns:
- help_file.command = ''
- cls.print_detailed_help(cli_name, help_file)
+ def print_detailed_help(self, cli_name, help_file):
+ AzCliHelp._print_extensions_msg(help_file)
+ self._print_detailed_help(cli_name, help_file)
class CliHelpFile(KnackHelpFile):
- def __init__(self, cli_ctx, delimiters):
- super(CliHelpFile, self).__init__(delimiters)
- self.cli_ctx = cli_ctx
-
def _should_include_example(self, ex):
min_profile = ex.get('min_profile')
max_profile = ex.get('max_profile')
@@ -90,7 +95,7 @@ def _should_include_example(self, ex):
# yaml will load this as a datetime if it's a date, we need a string.
min_profile = str(min_profile) if min_profile else None
max_profile = str(max_profile) if max_profile else None
- return supported_api_version(self.cli_ctx, resource_type=PROFILE_TYPE,
+ return supported_api_version(self.help_ctx.cli_ctx, resource_type=PROFILE_TYPE,
min_api=min_profile, max_api=max_profile)
return True
@@ -118,10 +123,10 @@ def _load_from_data(self, data):
self.examples.append(HelpExample(d))
-class CliCommandHelpFile(CliHelpFile):
+class CliCommandHelpFile(KnackCommandHelpFile, CliHelpFile):
- def __init__(self, delimiters, parser):
- super(CliCommandHelpFile, self).__init__(parser.cli_ctx, delimiters)
+ def __init__(self, help_ctx, delimiters, parser):
+ super(CliCommandHelpFile, self).__init__(help_ctx, delimiters, parser)
import argparse
self.type = 'command'
self.command_source = getattr(parser, 'command_source', None)
@@ -130,19 +135,19 @@ def __init__(self, delimiters, parser):
for action in [a for a in parser._actions if a.help != argparse.SUPPRESS]: # pylint: disable=protected-access
if action.option_strings:
- self.parameters.append(HelpParameter(' '.join(sorted(action.option_strings)),
- action.help,
- required=action.required,
- choices=action.choices,
- default=action.default,
- group_name=action.container.description))
+ self._add_parameter_help(action)
else:
- self.parameters.append(HelpParameter(action.metavar,
- action.help,
- required=False,
- choices=action.choices,
- default=None,
- group_name='Positional Arguments'))
+ # use metavar for positional parameters
+ param_kwargs = {
+ 'name_source': [action.metavar or action.dest],
+ 'deprecate_info': getattr(action, 'deprecate_info', None),
+ 'description': action.help,
+ 'choices': action.choices,
+ 'required': False,
+ 'default': None,
+ 'group_name': 'Positional'
+ }
+ self.parameters.append(HelpParameter(**param_kwargs))
help_param = next(p for p in self.parameters if p.name == '--help -h')
help_param.group_name = 'Global Arguments'
diff --git a/src/azure-cli-core/azure/cli/core/adal_authentication.py b/src/azure-cli-core/azure/cli/core/adal_authentication.py
index 4dc0c88873b..d39004da5a7 100644
--- a/src/azure-cli-core/azure/cli/core/adal_authentication.py
+++ b/src/azure-cli-core/azure/cli/core/adal_authentication.py
@@ -18,7 +18,7 @@ def __init__(self, token_retriever, external_tenant_token_retriever=None):
self._token_retriever = token_retriever
self._external_tenant_token_retriever = external_tenant_token_retriever
- def signed_session(self, session=None):
+ def signed_session(self, session=None): # pylint: disable=arguments-differ
session = session or super(AdalAuthentication, self).signed_session()
external_tenant_tokens = None
try:
diff --git a/src/azure-cli-core/azure/cli/core/commands/__init__.py b/src/azure-cli-core/azure/cli/core/commands/__init__.py
index 84c27b5829d..c2aa4779cdc 100644
--- a/src/azure-cli-core/azure/cli/core/commands/__init__.py
+++ b/src/azure-cli-core/azure/cli/core/commands/__init__.py
@@ -16,6 +16,7 @@
from knack.arguments import CLICommandArgument
from knack.commands import CLICommand, CommandGroup
+from knack.deprecation import ImplicitDeprecated, resolve_deprecate_info
from knack.invocation import CommandInvoker
from knack.log import get_logger
from knack.util import CLIError
@@ -167,7 +168,18 @@ def update_argument(self, param_name, argtype):
def __call__(self, *args, **kwargs):
if isinstance(self.command_source, ExtensionCommandSource) and self.command_source.overrides_command:
logger.warning(self.command_source.get_command_warn_msg())
- return super(AzCliCommand, self).__call__(*args, **kwargs)
+
+ cmd_args = args[0]
+
+ confirm = self.confirmation and not cmd_args.pop('yes', None) \
+ and not self.cli_ctx.config.getboolean('core', 'disable_confirm_prompt', fallback=False)
+
+ if confirm and not self._user_confirmed(self.confirmation, cmd_args):
+ from knack.events import EVENT_COMMAND_CANCELLED
+ self.cli_ctx.raise_event(EVENT_COMMAND_CANCELLED, command=self.name, command_args=cmd_args)
+ raise CLIError('Operation cancelled.')
+
+ return self.handler(*args, **kwargs)
def _merge_kwargs(self, kwargs, base_kwargs=None):
base = base_kwargs if base_kwargs is not None else getattr(self, 'command_kwargs')
@@ -251,7 +263,7 @@ def execute(self, args):
self.cli_ctx.raise_event(EVENT_INVOKER_POST_CMD_TBL_CREATE, cmd_tbl=self.commands_loader.command_table,
commands_loader=self.commands_loader)
self.parser.cli_ctx = self.cli_ctx
- self.parser.load_command_table(self.commands_loader.command_table)
+ self.parser.load_command_table(self.commands_loader)
self.cli_ctx.raise_event(EVENT_INVOKER_CMD_TBL_LOADED, cmd_tbl=self.commands_loader.command_table,
parser=self.parser)
@@ -307,6 +319,27 @@ def execute(self, args):
if extension_name:
self.data['command_extension_name'] = extension_name
+ deprecations = [] + getattr(expanded_arg, '_argument_deprecations', [])
+ if cmd.deprecate_info:
+ deprecations.append(cmd.deprecate_info)
+
+ # search for implicit deprecation
+ path_comps = cmd.name.split()[:-1]
+ implicit_deprecate_info = None
+ while path_comps and not implicit_deprecate_info:
+ implicit_deprecate_info = resolve_deprecate_info(self.cli_ctx, ' '.join(path_comps))
+ del path_comps[-1]
+
+ if implicit_deprecate_info:
+ deprecate_kwargs = implicit_deprecate_info.__dict__.copy()
+ deprecate_kwargs['object_type'] = 'command'
+ del deprecate_kwargs['_get_tag']
+ del deprecate_kwargs['_get_message']
+ deprecations.append(ImplicitDeprecated(**deprecate_kwargs))
+
+ for d in deprecations:
+ logger.warning(d.message)
+
try:
result = cmd(params)
if cmd.supports_no_wait and getattr(expanded_arg, 'no_wait', False):
@@ -575,7 +608,7 @@ def _load_command_loader(loader, args, name, prefix):
loader.cmd_to_loader_map[cmd] = [command_loader]
else:
logger.debug("Module '%s' is missing `COMMAND_LOADER_CLS` entry.", name)
- return command_table
+ return command_table, command_loader.command_group_table
def _load_extension_command_loader(loader, args, ext):
@@ -741,6 +774,8 @@ def command(self, name, method_name=None, **kwargs):
"""
self._check_stale()
merged_kwargs = self._flatten_kwargs(kwargs, 'command_type')
+ # don't inherit deprecation info from command group
+ merged_kwargs['deprecate_info'] = kwargs.get('deprecate_info', None)
operations_tmpl = merged_kwargs['operations_tmpl']
command_name = '{} {}'.format(self.group_name, name) if self.group_name else name
operation = operations_tmpl.format(method_name) if operations_tmpl else None
@@ -773,6 +808,9 @@ def custom_command(self, name, method_name, **kwargs):
"""
self._check_stale()
merged_kwargs = self._flatten_kwargs(kwargs, 'custom_command_type')
+ # don't inherit deprecation info from command group
+ merged_kwargs['deprecate_info'] = kwargs.get('deprecate_info', None)
+
operations_tmpl = merged_kwargs['operations_tmpl']
command_name = '{} {}'.format(self.group_name, name) if self.group_name else name
self.command_loader._cli_command(command_name, # pylint: disable=protected-access
@@ -817,12 +855,13 @@ def generic_update_command(self, name,
self._check_stale()
merged_kwargs = _merge_kwargs(kwargs, self.group_kwargs, CLI_COMMAND_KWARGS)
+ # don't inherit deprecation info from command group
+ merged_kwargs['deprecate_info'] = kwargs.get('deprecate_info', None)
getter_op = self._resolve_operation(merged_kwargs, getter_name, getter_type)
setter_op = self._resolve_operation(merged_kwargs, setter_name, setter_type)
custom_func_op = self._resolve_operation(merged_kwargs, custom_func_name, custom_func_type,
source_kwarg='custom_command_type') if custom_func_name else None
-
_cli_generic_update_command(
self.command_loader,
'{} {}'.format(self.group_name, name),
@@ -839,6 +878,9 @@ def generic_wait_command(self, name, getter_name='get', getter_type=None, **kwar
from azure.cli.core.commands.arm import _cli_generic_update_command, _cli_generic_wait_command
self._check_stale()
merged_kwargs = _merge_kwargs(kwargs, self.group_kwargs, CLI_COMMAND_KWARGS)
+ # don't inherit deprecation info from command group
+ merged_kwargs['deprecate_info'] = kwargs.get('deprecate_info', None)
+
if getter_type:
merged_kwargs = _merge_kwargs(getter_type.settings, merged_kwargs, CLI_COMMAND_KWARGS)
getter_op = self._resolve_operation(merged_kwargs, getter_name, getter_type)
diff --git a/src/azure-cli-core/azure/cli/core/commands/constants.py b/src/azure-cli-core/azure/cli/core/commands/constants.py
index 63089880336..0046f641d5d 100644
--- a/src/azure-cli-core/azure/cli/core/commands/constants.py
+++ b/src/azure-cli-core/azure/cli/core/commands/constants.py
@@ -13,7 +13,8 @@
'client_factory', 'operations_tmpl', 'no_wait_param', 'supports_no_wait', 'validator',
'client_arg_name', 'doc_string_source', 'deprecate_info'] + CLI_COMMON_KWARGS
CLI_PARAM_KWARGS = \
- ['id_part', 'completer', 'validator', 'options_list', 'configured_default', 'arg_group', 'arg_type'] \
+ ['id_part', 'completer', 'validator', 'options_list', 'configured_default', 'arg_group', 'arg_type',
+ 'deprecate_info'] \
+ CLI_COMMON_KWARGS + ARGPARSE_SUPPORTED_KWARGS
CLI_POSITIONAL_PARAM_KWARGS = \
diff --git a/src/azure-cli-core/azure/cli/core/commands/parameters.py b/src/azure-cli-core/azure/cli/core/commands/parameters.py
index 3f4baaa005f..8e539775902 100644
--- a/src/azure-cli-core/azure/cli/core/commands/parameters.py
+++ b/src/azure-cli-core/azure/cli/core/commands/parameters.py
@@ -339,18 +339,18 @@ def _check_stale(self):
logger.error(message)
raise CLIError(message)
- def _flatten_kwargs(self, kwargs, arg_type, supported_kwargs=None):
- merged_kwargs = self._merge_kwargs(kwargs, supported_kwargs=supported_kwargs)
+ def _flatten_kwargs(self, kwargs, arg_type):
+ merged_kwargs = self._merge_kwargs(kwargs)
if arg_type:
arg_type_copy = arg_type.settings.copy()
arg_type_copy.update(merged_kwargs)
return arg_type_copy
return merged_kwargs
- def _merge_kwargs(self, kwargs, base_kwargs=None, supported_kwargs=None):
+ def _merge_kwargs(self, kwargs, base_kwargs=None):
from azure.cli.core.commands import _merge_kwargs as merge_kwargs
base = base_kwargs if base_kwargs is not None else getattr(self, 'group_kwargs')
- return merge_kwargs(kwargs, base, supported_kwargs or CLI_PARAM_KWARGS)
+ return merge_kwargs(kwargs, base, CLI_PARAM_KWARGS)
# pylint: disable=arguments-differ
def argument(self, dest, arg_type=None, **kwargs):
@@ -363,8 +363,10 @@ def argument(self, dest, arg_type=None, **kwargs):
min_api = merged_kwargs.get('min_api', None)
max_api = merged_kwargs.get('max_api', None)
operation_group = merged_kwargs.get('operation_group', None)
- if merged_kwargs.get('options_list') == []:
+
+ if merged_kwargs.get('options_list', None) == []:
del merged_kwargs['options_list']
+
if self.command_loader.supported_api_version(resource_type=resource_type,
min_api=min_api,
max_api=max_api,
@@ -390,7 +392,7 @@ def positional(self, dest, arg_type=None, **kwargs):
raise CLIError("command authoring error: commands may have, at most, one positional argument. '{}' already "
"has positional argument: {}.".format(self.scope, ' '.join(positional_args.keys())))
- merged_kwargs = self._flatten_kwargs(kwargs, arg_type, supported_kwargs=CLI_POSITIONAL_PARAM_KWARGS)
+ merged_kwargs = self._flatten_kwargs(kwargs, arg_type)
merged_kwargs = {k: v for k, v in merged_kwargs.items() if k in CLI_POSITIONAL_PARAM_KWARGS}
merged_kwargs['options_list'] = []
diff --git a/src/azure-cli-core/azure/cli/core/file_util.py b/src/azure-cli-core/azure/cli/core/file_util.py
index 4af8083cbc0..4902879b3e7 100644
--- a/src/azure-cli-core/azure/cli/core/file_util.py
+++ b/src/azure-cli-core/azure/cli/core/file_util.py
@@ -6,12 +6,14 @@
from __future__ import print_function
from knack.util import CLIError
from knack.help import GroupHelpFile
+
from azure.cli.core._help import CliCommandHelpFile
from azure.cli.core.commands.arm import add_id_parameters
def get_all_help(cli_ctx):
invoker = cli_ctx.invocation
+ help_ctx = cli_ctx.help_cls(cli_ctx)
if not invoker:
raise CLIError("CLI context does not contain invocation.")
@@ -27,7 +29,8 @@ def get_all_help(cli_ctx):
help_files = []
for cmd, parser in zip(sub_parser_keys, sub_parser_values):
try:
- help_file = GroupHelpFile(cmd, parser) if _is_group(parser) else CliCommandHelpFile(cmd, parser)
+ help_file = GroupHelpFile(help_ctx, cmd, parser) if _is_group(parser) \
+ else CliCommandHelpFile(help_ctx, cmd, parser)
help_file.load(parser)
help_files.append(help_file)
except Exception as ex: # pylint: disable=broad-except
@@ -43,7 +46,7 @@ def create_invoker_and_load_cmds_and_args(cli_ctx):
cmd_table = invoker.commands_loader.load_command_table(None)
for command in cmd_table:
invoker.commands_loader.load_arguments(command)
- invoker.parser.load_command_table(invoker.commands_loader.command_table)
+ invoker.parser.load_command_table(invoker.commands_loader)
add_id_parameters(None, cmd_tbl=cmd_table)
diff --git a/src/azure-cli-core/azure/cli/core/parser.py b/src/azure-cli-core/azure/cli/core/parser.py
index 5cf22943210..8f606c7998c 100644
--- a/src/azure-cli-core/azure/cli/core/parser.py
+++ b/src/azure-cli-core/azure/cli/core/parser.py
@@ -11,6 +11,7 @@
import argparse
import argcomplete
+from knack.deprecation import Deprecated
from knack.log import get_logger
from knack.parser import CLICommandParser
from knack.util import CLIError
@@ -55,17 +56,23 @@ def __init__(self, cli_ctx=None, cli_help=None, **kwargs):
self.command_source = kwargs.pop('_command_source', None)
super(AzCliCommandParser, self).__init__(cli_ctx, cli_help=cli_help, **kwargs)
- def load_command_table(self, cmd_tbl):
+ def load_command_table(self, command_loader):
"""Load a command table into our parser."""
# If we haven't already added a subparser, we
# better do it.
+ cmd_tbl = command_loader.command_table
+ grp_tbl = command_loader.command_group_table
if not self.subparsers:
sp = self.add_subparsers(dest='_command_package')
sp.required = True
self.subparsers = {(): sp}
for command_name, metadata in cmd_tbl.items():
- subparser = self._get_subparser(command_name.split())
+ subparser = self._get_subparser(command_name.split(), grp_tbl)
+ deprecate_info = metadata.deprecate_info
+ if not subparser or (deprecate_info and deprecate_info.expired()):
+ continue
+
command_verb = command_name.split()[-1]
# To work around http://bugs.python.org/issue9253, we artificially add any new
# parsers we add to the "choices" section of the subparser.
@@ -87,6 +94,11 @@ def load_command_table(self, cmd_tbl):
argument_validators = []
argument_groups = {}
for _, arg in metadata.arguments.items():
+ # don't add deprecated arguments to the parser
+ deprecate_info = arg.type.settings.get('deprecate_info', None)
+ if deprecate_info and deprecate_info.expired():
+ continue
+
if arg.validator:
argument_validators.append(arg.validator)
try:
@@ -105,6 +117,7 @@ def load_command_table(self, cmd_tbl):
raise CLIError("command authoring error for '{}': '{}' {}".format(
command_name, ex.args[0].dest, ex.message)) # pylint: disable=no-member
param.completer = arg.completer
+ param.deprecate_info = arg.deprecate_info
command_parser.set_defaults(
func=metadata,
command=command_name,
@@ -179,10 +192,27 @@ def _add_argument(obj, arg):
""" Only pass valid argparse kwargs to argparse.ArgumentParser.add_argument """
from knack.parser import ARGPARSE_SUPPORTED_KWARGS
- options_list = arg.options_list
argparse_options = {name: value for name, value in arg.options.items() if name in ARGPARSE_SUPPORTED_KWARGS}
- if options_list:
- return obj.add_argument(*options_list, **argparse_options)
+ if arg.options_list:
+
+ scrubbed_options_list = []
+ for item in arg.options_list:
+
+ if isinstance(item, Deprecated):
+ # don't add expired options to the parser
+ if item.expired():
+ continue
+
+ class _DeprecatedOption(str):
+ def __new__(cls, *args, **kwargs):
+ instance = str.__new__(cls, *args, **kwargs)
+ return instance
+
+ option = _DeprecatedOption(item.target)
+ setattr(option, 'deprecate_info', item)
+ item = option
+ scrubbed_options_list.append(item)
+ return obj.add_argument(*scrubbed_options_list, **argparse_options)
else:
if 'required' in argparse_options:
del argparse_options['required']
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_command_registration.py b/src/azure-cli-core/azure/cli/core/tests/test_command_registration.py
index 60529900532..80ecbd06c7c 100644
--- a/src/azure-cli-core/azure/cli/core/tests/test_command_registration.py
+++ b/src/azure-cli-core/azure/cli/core/tests/test_command_registration.py
@@ -196,7 +196,7 @@ def load_command_table(self, args):
if command_table:
module_command_table.update(command_table)
loader.loaders.append(command_loader) # this will be used later by the load_arguments method
- return module_command_table
+ return module_command_table, {}
@mock.patch('importlib.import_module', _mock_import_lib)
@mock.patch('pkgutil.iter_modules', _mock_iter_modules)
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_help.py b/src/azure-cli-core/azure/cli/core/tests/test_help.py
index a507bf0e0de..7cd2d807cd5 100644
--- a/src/azure-cli-core/azure/cli/core/tests/test_help.py
+++ b/src/azure-cli-core/azure/cli/core/tests/test_help.py
@@ -31,12 +31,13 @@ def test_help_loads(self):
cli = TestCli()
parser_dict = {}
cli = TestCli()
+ help_ctx = cli.help_cls(cli)
try:
cli.invoke(['-h'])
except SystemExit:
pass
cmd_tbl = cli.invocation.commands_loader.command_table
- cli.invocation.parser.load_command_table(cmd_tbl)
+ cli.invocation.parser.load_command_table(cli.invocation.commands_loader)
for cmd in cmd_tbl:
try:
cmd_tbl[cmd].loader.command_name = cmd
@@ -45,12 +46,13 @@ def test_help_loads(self):
pass
cli.register_event(events.EVENT_INVOKER_CMD_TBL_LOADED, add_id_parameters)
cli.raise_event(events.EVENT_INVOKER_CMD_TBL_LOADED, command_table=cmd_tbl)
- cli.invocation.parser.load_command_table(cmd_tbl)
+ cli.invocation.parser.load_command_table(cli.invocation.commands_loader)
_store_parsers(cli.invocation.parser, parser_dict)
for name, parser in parser_dict.items():
try:
- help_file = GroupHelpFile(name, parser) if _is_group(parser) else CliCommandHelpFile(name, parser)
+ help_file = GroupHelpFile(help_ctx, name, parser) if _is_group(parser) \
+ else CliCommandHelpFile(help_ctx, name, parser)
help_file.load(parser)
except Exception as ex:
raise HelpAuthoringException('{}, {}'.format(name, ex))
diff --git a/src/azure-cli-core/azure/cli/core/tests/test_parser.py b/src/azure-cli-core/azure/cli/core/tests/test_parser.py
index 301a612d89a..e387729b784 100644
--- a/src/azure-cli-core/azure/cli/core/tests/test_parser.py
+++ b/src/azure-cli-core/azure/cli/core/tests/test_parser.py
@@ -39,9 +39,10 @@ def test_handler2():
command = AzCliCommand(cli.loader, 'command the-name', test_handler1)
command2 = AzCliCommand(cli.loader, 'sub-command the-second-name', test_handler2)
cmd_table = {'command the-name': command, 'sub-command the-second-name': command2}
+ cli.commands_loader.command_table = cmd_table
parser = AzCliCommandParser(cli)
- parser.load_command_table(cmd_table)
+ parser.load_command_table(cli.commands_loader)
args = parser.parse_args('command the-name'.split())
self.assertIs(args.func, command)
@@ -63,9 +64,10 @@ def test_handler(args): # pylint: disable=unused-argument
command = AzCliCommand(cli.loader, 'test command', test_handler)
command.add_argument('req', '--req', required=True)
cmd_table = {'test command': command}
+ cli.commands_loader.command_table = cmd_table
parser = AzCliCommandParser(cli)
- parser.load_command_table(cmd_table)
+ parser.load_command_table(cli.commands_loader)
args = parser.parse_args('test command --req yep'.split())
self.assertIs(args.func, command)
@@ -85,9 +87,10 @@ def test_handler():
command = AzCliCommand(cli.loader, 'test command', test_handler)
command.add_argument('req', '--req', required=True, nargs=2)
cmd_table = {'test command': command}
+ cli.commands_loader.command_table = cmd_table
parser = AzCliCommandParser(cli)
- parser.load_command_table(cmd_table)
+ parser.load_command_table(cli.commands_loader)
args = parser.parse_args('test command --req yep nope'.split())
self.assertIs(args.func, command)
@@ -115,9 +118,10 @@ def test_handler():
command = AzCliCommand(cli.loader, 'test command', test_handler)
command.add_argument('opt', '--opt', required=True, **enum_choice_list(TestEnum))
cmd_table = {'test command': command}
+ cli.commands_loader.command_table = cmd_table
parser = AzCliCommandParser(cli)
- parser.load_command_table(cmd_table)
+ parser.load_command_table(cli.commands_loader)
args = parser.parse_args('test command --opt alL_cAps'.split())
self.assertEqual(args.opt, 'ALL_CAPS')
@@ -184,7 +188,7 @@ def load_command_table(self, args):
if command_table:
module_command_table.update(command_table)
loader.loaders.append(command_loader) # this will be used later by the load_arguments method
- return module_command_table
+ return module_command_table, command_loader.command_group_table
@mock.patch('importlib.import_module', _mock_import_lib)
@mock.patch('pkgutil.iter_modules', _mock_iter_modules)
@@ -196,10 +200,10 @@ def test_parser_error_spellchecker(self):
main_loader = MainCommandsLoader(cli)
cli.loader = main_loader
- cmd_tbl = cli.loader.load_command_table(None)
+ cli.loader.load_command_table(None)
parser = cli.parser_cls(cli)
- parser.load_command_table(cmd_tbl)
+ parser.load_command_table(cli.loader)
logger_msgs = []
choice_lists = []
diff --git a/src/azure-cli-core/setup.py b/src/azure-cli-core/setup.py
index 1fa3a9e98f2..8ce2e8b9d3a 100644
--- a/src/azure-cli-core/setup.py
+++ b/src/azure-cli-core/setup.py
@@ -15,7 +15,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.40"
+VERSION = "2.0.41"
# If we have source, validate that our version numbers match
# This should prevent uploading releases with mismatched versions.
try:
@@ -55,7 +55,7 @@
'colorama>=0.3.9',
'humanfriendly>=4.7',
'jmespath',
- 'knack==0.3.3',
+ 'knack==0.4.1',
'msrest>=0.4.4',
'msrestazure>=0.4.25',
'paramiko',
diff --git a/src/azure-cli-nspkg/HISTORY.rst b/src/azure-cli-nspkg/HISTORY.rst
index 4c74ff1f754..cca0c1d51f9 100644
--- a/src/azure-cli-nspkg/HISTORY.rst
+++ b/src/azure-cli-nspkg/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+3.0.3
+++++++
+* Minor fixes.
+
3.0.2
+++++
* minor fixes
diff --git a/src/azure-cli-nspkg/setup.py b/src/azure-cli-nspkg/setup.py
index 048014dd70d..d61daf1ce52 100644
--- a/src/azure-cli-nspkg/setup.py
+++ b/src/azure-cli-nspkg/setup.py
@@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup
-VERSION = "3.0.2"
+VERSION = "3.0.3"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
diff --git a/src/azure-cli-testsdk/HISTORY.rst b/src/azure-cli-testsdk/HISTORY.rst
index 8717b2fcab7..344d279b15c 100644
--- a/src/azure-cli-testsdk/HISTORY.rst
+++ b/src/azure-cli-testsdk/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+0.1.4
+++++++
+* Minor fixes.
+
0.1.3
+++++
* Update azure-devtools to 1.0.0
diff --git a/src/azure-cli-testsdk/azure/cli/testsdk/__init__.py b/src/azure-cli-testsdk/azure/cli/testsdk/__init__.py
index b437a70c8d2..c78ee64fa71 100644
--- a/src/azure-cli-testsdk/azure/cli/testsdk/__init__.py
+++ b/src/azure-cli-testsdk/azure/cli/testsdk/__init__.py
@@ -51,6 +51,10 @@ def __init__(self, commands_loader_cls=None, **kwargs):
self.data['command'] = 'unknown'
self.data['completer_active'] = ARGCOMPLETE_ENV_NAME in os.environ
self.data['query_active'] = False
+
+ loader = self.commands_loader_cls(self)
+ setattr(self, 'commands_loader', loader)
+
self.cloud = get_active_cloud(self)
def get_cli_version(self):
diff --git a/src/azure-cli-testsdk/setup.py b/src/azure-cli-testsdk/setup.py
index 94e2365c62f..55979fc5913 100644
--- a/src/azure-cli-testsdk/setup.py
+++ b/src/azure-cli-testsdk/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.3"
+VERSION = "0.1.4"
CLASSIFIERS = [
'Development Status :: 3 - Alpha',
diff --git a/src/azure-cli/HISTORY.rst b/src/azure-cli/HISTORY.rst
index 47455a47280..ad59e41710a 100644
--- a/src/azure-cli/HISTORY.rst
+++ b/src/azure-cli/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.0.41
+++++++
+* Minor fixes
+
2.0.40
++++++
* Minor fixes
diff --git a/src/azure-cli/azure/cli/__init__.py b/src/azure-cli/azure/cli/__init__.py
index 93fc1387da5..25f4c667c3e 100644
--- a/src/azure-cli/azure/cli/__init__.py
+++ b/src/azure-cli/azure/cli/__init__.py
@@ -11,4 +11,4 @@
pkg_resources.declare_namespace(__name__)
__author__ = "Microsoft Corporation "
-__version__ = "2.0.40"
+__version__ = "2.0.41"
diff --git a/src/azure-cli/setup.py b/src/azure-cli/setup.py
index 8e7da124da9..936f4558c4f 100644
--- a/src/azure-cli/setup.py
+++ b/src/azure-cli/setup.py
@@ -15,7 +15,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.40"
+VERSION = "2.0.41"
# If we have source, validate that our version numbers match
# This should prevent uploading releases with mismatched versions.
try:
diff --git a/src/command_modules/azure-cli-acr/HISTORY.rst b/src/command_modules/azure-cli-acr/HISTORY.rst
index 81e3ad00da9..a35a40d5ed5 100644
--- a/src/command_modules/azure-cli-acr/HISTORY.rst
+++ b/src/command_modules/azure-cli-acr/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.0.29
+++++++
+* Minor fixes
+
2.0.28
++++++
* Add polling build status.
diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py
index 201c5093ac0..aa9cb5455da 100644
--- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py
+++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-acr/setup.py b/src/command_modules/azure-cli-acr/setup.py
index 9142dd2bf75..80c75e6c805 100644
--- a/src/command_modules/azure-cli-acr/setup.py
+++ b/src/command_modules/azure-cli-acr/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.28"
+VERSION = "2.0.29"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-acs/HISTORY.rst b/src/command_modules/azure-cli-acs/HISTORY.rst
index ba4156d91b6..63e076f459e 100644
--- a/src/command_modules/azure-cli-acs/HISTORY.rst
+++ b/src/command_modules/azure-cli-acs/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.1.3
++++++
+* Minor fixes
+
2.1.2
+++++
* Breaking change: Enable Kubernetes role-based access control by default.
diff --git a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py
index 6a2d2f2ef71..75012953879 100644
--- a/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py
+++ b/src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-acs/setup.py b/src/command_modules/azure-cli-acs/setup.py
index c36cbe44049..28b855a800c 100644
--- a/src/command_modules/azure-cli-acs/setup.py
+++ b/src/command_modules/azure-cli-acs/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.1.2"
+VERSION = "2.1.3"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-advisor/HISTORY.rst b/src/command_modules/azure-cli-advisor/HISTORY.rst
index d2ce804240b..add2c80651b 100644
--- a/src/command_modules/azure-cli-advisor/HISTORY.rst
+++ b/src/command_modules/azure-cli-advisor/HISTORY.rst
@@ -3,9 +3,16 @@
Release History
===============
-0.5.1
+0.5.3
+++++
+* Minor fixes
+
+0.5.2
+++++++
+* Minor fixes.
+0.5.1
++++++
* `sdist` is now compatible with wheel 0.31.0
0.5.0
diff --git a/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/_help.py b/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/_help.py
index d5e353136db..556d176ddf8 100644
--- a/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/_help.py
+++ b/src/command_modules/azure-cli-advisor/azure/cli/command_modules/advisor/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-advisor/setup.py b/src/command_modules/azure-cli-advisor/setup.py
index 47da9cff442..af4ca99c50e 100644
--- a/src/command_modules/azure-cli-advisor/setup.py
+++ b/src/command_modules/azure-cli-advisor/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.5.1"
+VERSION = "0.5.3"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
diff --git a/src/command_modules/azure-cli-ams/HISTORY.rst b/src/command_modules/azure-cli-ams/HISTORY.rst
index c1fcb9240dd..25750dbd45a 100644
--- a/src/command_modules/azure-cli-ams/HISTORY.rst
+++ b/src/command_modules/azure-cli-ams/HISTORY.rst
@@ -2,11 +2,19 @@
Release History
===============
+
+0.1.3
++++++
+* Minor fixes
+
+0.1.2
+++++++
+* Minor fixes.
+
0.1.1
+++++
* Minor changes
0.1.0
+++++
-
* Initial release of module.
diff --git a/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/_help.py b/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/_help.py
index 40847028908..1d966500aa4 100644
--- a/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/_help.py
+++ b/src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-ams/setup.py b/src/command_modules/azure-cli-ams/setup.py
index 8d25e1c71d0..f7fc9afc997 100644
--- a/src/command_modules/azure-cli-ams/setup.py
+++ b/src/command_modules/azure-cli-ams/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.1"
+VERSION = "0.1.3"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
diff --git a/src/command_modules/azure-cli-appservice/HISTORY.rst b/src/command_modules/azure-cli-appservice/HISTORY.rst
index f0d5fc45d88..774c32118fe 100644
--- a/src/command_modules/azure-cli-appservice/HISTORY.rst
+++ b/src/command_modules/azure-cli-appservice/HISTORY.rst
@@ -2,9 +2,13 @@
Release History
===============
-0.1.36
+
+0.1.37
++++++
* Minor fixes
+
+0.1.36
+++++++
* webapp/functionapp: Adding support for disabling identity az webapp identity remove. Preview tag removed for Identity feature.
0.1.35
diff --git a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py
index 12a5c01c048..d8caac7729f 100644
--- a/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py
+++ b/src/command_modules/azure-cli-appservice/azure/cli/command_modules/appservice/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-appservice/linter_exclusions.yml b/src/command_modules/azure-cli-appservice/linter_exclusions.yml
index 3f12ec4d9ee..d144897defb 100644
--- a/src/command_modules/azure-cli-appservice/linter_exclusions.yml
+++ b/src/command_modules/azure-cli-appservice/linter_exclusions.yml
@@ -5,11 +5,11 @@ webapp auth update:
parameters:
action:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
enabled:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
webapp deployment slot list:
rule_exclusions:
- - no_ids_for_list_commands_rule
+ - no_ids_for_list_commands
...
diff --git a/src/command_modules/azure-cli-appservice/setup.py b/src/command_modules/azure-cli-appservice/setup.py
index 85371b4c6e4..a1729c17266 100644
--- a/src/command_modules/azure-cli-appservice/setup.py
+++ b/src/command_modules/azure-cli-appservice/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.36"
+VERSION = "0.1.37"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-backup/HISTORY.rst b/src/command_modules/azure-cli-backup/HISTORY.rst
index c18b2d0fb1d..7db2fcb5fe2 100644
--- a/src/command_modules/azure-cli-backup/HISTORY.rst
+++ b/src/command_modules/azure-cli-backup/HISTORY.rst
@@ -3,14 +3,16 @@
Release History
===============
-1.1.2
+1.1.3
+++++
+* Minor fixes
-* Updated module definition.
+1.1.2
+++++++
+* Minor fixes.
1.1.1
+++++
-
* `sdist` is now compatible with wheel 0.31.0
1.1.0
diff --git a/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/_help.py b/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/_help.py
index a67cb14250c..ee459598a25 100644
--- a/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/_help.py
+++ b/src/command_modules/azure-cli-backup/azure/cli/command_modules/backup/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-backup/setup.py b/src/command_modules/azure-cli-backup/setup.py
index e516bd752b9..0a7ec4e117a 100644
--- a/src/command_modules/azure-cli-backup/setup.py
+++ b/src/command_modules/azure-cli-backup/setup.py
@@ -13,7 +13,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "1.1.2"
+VERSION = "1.1.3"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
diff --git a/src/command_modules/azure-cli-batch/HISTORY.rst b/src/command_modules/azure-cli-batch/HISTORY.rst
index a4cf2b0de95..0a70c8b4074 100644
--- a/src/command_modules/azure-cli-batch/HISTORY.rst
+++ b/src/command_modules/azure-cli-batch/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+3.2.6
++++++
+* Minor fixes
+
+3.2.5
++++++
+* Minor fixes
+
3.2.4
+++++
* Remove azure-batch-extensions dependency.
diff --git a/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_help.py b/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_help.py
index e5d8364e6ff..45bbc9399a4 100644
--- a/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_help.py
+++ b/src/command_modules/azure-cli-batch/azure/cli/command_modules/batch/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-batch/setup.py b/src/command_modules/azure-cli-batch/setup.py
index 0705da0298d..c8940144f87 100644
--- a/src/command_modules/azure-cli-batch/setup.py
+++ b/src/command_modules/azure-cli-batch/setup.py
@@ -15,7 +15,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "3.2.4"
+VERSION = "3.2.6"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-batchai/HISTORY.rst b/src/command_modules/azure-cli-batchai/HISTORY.rst
index fb40767c0cf..19d47136ead 100644
--- a/src/command_modules/azure-cli-batchai/HISTORY.rst
+++ b/src/command_modules/azure-cli-batchai/HISTORY.rst
@@ -2,6 +2,11 @@
Release History
===============
+
+0.3.2
++++++
+* Minor fixes
+
0.3.1
+++++
* Fixed `-o table` option for `az batchai cluster node list` and `az batchai job node list` commands.
diff --git a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/_help.py b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/_help.py
index 398ad64f9a9..311a1223f61 100644
--- a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/_help.py
+++ b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-batchai/setup.py b/src/command_modules/azure-cli-batchai/setup.py
index b476f63d3f4..acef6eb139a 100644
--- a/src/command_modules/azure-cli-batchai/setup.py
+++ b/src/command_modules/azure-cli-batchai/setup.py
@@ -13,7 +13,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.3.1"
+VERSION = "0.3.2"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-billing/HISTORY.rst b/src/command_modules/azure-cli-billing/HISTORY.rst
index 103e1942915..35235dcb12e 100644
--- a/src/command_modules/azure-cli-billing/HISTORY.rst
+++ b/src/command_modules/azure-cli-billing/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+0.1.10
+++++++
+* Minor fixes
+
+0.1.9
+++++++
+* Minor fixes.
+
0.1.8
++++++
* Add enrollment account commands
diff --git a/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/_help.py b/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/_help.py
index 7feec63ec05..d0bc00a7038 100644
--- a/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/_help.py
+++ b/src/command_modules/azure-cli-billing/azure/cli/command_modules/billing/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-billing/setup.py b/src/command_modules/azure-cli-billing/setup.py
index 7b7d1459f99..cb5b6ddf41d 100644
--- a/src/command_modules/azure-cli-billing/setup.py
+++ b/src/command_modules/azure-cli-billing/setup.py
@@ -16,7 +16,7 @@
cmdclass = {}
-VERSION = "0.1.8"
+VERSION = "0.1.10"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-cdn/HISTORY.rst b/src/command_modules/azure-cli-cdn/HISTORY.rst
index e6914a8ea83..099324e9ca2 100644
--- a/src/command_modules/azure-cli-cdn/HISTORY.rst
+++ b/src/command_modules/azure-cli-cdn/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+0.1.0
+++++++
+* Minor fixes
+
+0.0.15
+++++++
+* Minor fixes.
+
0.0.14
++++++
* Minor fixes.
diff --git a/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/_help.py b/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/_help.py
index 70eea68522c..e293f46fb61 100644
--- a/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/_help.py
+++ b/src/command_modules/azure-cli-cdn/azure/cli/command_modules/cdn/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-cdn/setup.py b/src/command_modules/azure-cli-cdn/setup.py
index 172db5796eb..095e0d5a0c4 100644
--- a/src/command_modules/azure-cli-cdn/setup.py
+++ b/src/command_modules/azure-cli-cdn/setup.py
@@ -16,7 +16,7 @@
cmdclass = {}
-VERSION = "0.0.14"
+VERSION = "0.1.0"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-cloud/HISTORY.rst b/src/command_modules/azure-cli-cloud/HISTORY.rst
index 36ea2ce2808..e9c20d27575 100644
--- a/src/command_modules/azure-cli-cloud/HISTORY.rst
+++ b/src/command_modules/azure-cli-cloud/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.0.16
+++++++
+* Minor fixes
+
2.0.15
++++++
* Add acr login server suffix to cloud config.
diff --git a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/_help.py b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/_help.py
index e68d51b496c..55635459518 100644
--- a/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/_help.py
+++ b/src/command_modules/azure-cli-cloud/azure/cli/command_modules/cloud/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-cloud/setup.py b/src/command_modules/azure-cli-cloud/setup.py
index 0a46d8e066f..346f2a5d570 100644
--- a/src/command_modules/azure-cli-cloud/setup.py
+++ b/src/command_modules/azure-cli-cloud/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.15"
+VERSION = "2.0.16"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-cognitiveservices/HISTORY.rst b/src/command_modules/azure-cli-cognitiveservices/HISTORY.rst
index cd080689976..b52e89fb0e3 100644
--- a/src/command_modules/azure-cli-cognitiveservices/HISTORY.rst
+++ b/src/command_modules/azure-cli-cognitiveservices/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+0.1.15
+++++++
+* Minor fixes
+
+0.1.14
+++++++
+* Minor fixes.
+
0.1.13
++++++
* Fix typo with example for `az cognitiveservices account create` [#5603](https://github.com/Azure/azure-cli/issues/5603)
diff --git a/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/_help.py b/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/_help.py
index 7326b55d5cd..7b7f08df48a 100644
--- a/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/_help.py
+++ b/src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-cognitiveservices/setup.py b/src/command_modules/azure-cli-cognitiveservices/setup.py
index 4ca21549e8f..10e96ce437f 100644
--- a/src/command_modules/azure-cli-cognitiveservices/setup.py
+++ b/src/command_modules/azure-cli-cognitiveservices/setup.py
@@ -13,7 +13,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.13"
+VERSION = "0.1.15"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-configure/HISTORY.rst b/src/command_modules/azure-cli-configure/HISTORY.rst
index 4743cb5acb8..a2e5c6f54a5 100644
--- a/src/command_modules/azure-cli-configure/HISTORY.rst
+++ b/src/command_modules/azure-cli-configure/HISTORY.rst
@@ -3,10 +3,13 @@
Release History
===============
-2.0.17
+2.0.18
++++++
+* Minor fixes
-* Updated module definition.
+2.0.17
+++++++
+* Minor fixes.
2.0.16
++++++
diff --git a/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/_help.py b/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/_help.py
index 94291776e23..6dca36682c4 100644
--- a/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/_help.py
+++ b/src/command_modules/azure-cli-configure/azure/cli/command_modules/configure/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-configure/setup.py b/src/command_modules/azure-cli-configure/setup.py
index f375c20580b..d07e990eea9 100644
--- a/src/command_modules/azure-cli-configure/setup.py
+++ b/src/command_modules/azure-cli-configure/setup.py
@@ -15,7 +15,7 @@
cmdclass = {}
-VERSION = "2.0.17"
+VERSION = "2.0.18"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-consumption/HISTORY.rst b/src/command_modules/azure-cli-consumption/HISTORY.rst
index f6348feaa1a..2181b60b44e 100644
--- a/src/command_modules/azure-cli-consumption/HISTORY.rst
+++ b/src/command_modules/azure-cli-consumption/HISTORY.rst
@@ -2,6 +2,15 @@
Release History
===============
+
+0.3.3
+++++++
+* Minor fixes
+
+0.3.2
+++++++
+* Minor fixes.
+
0.3.1
+++++
* Added new commands for budget API.
diff --git a/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/_help.py b/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/_help.py
index 73fca130581..63a8487f77f 100644
--- a/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/_help.py
+++ b/src/command_modules/azure-cli-consumption/azure/cli/command_modules/consumption/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-consumption/setup.py b/src/command_modules/azure-cli-consumption/setup.py
index 73bd07a9583..627ba4d96c7 100644
--- a/src/command_modules/azure-cli-consumption/setup.py
+++ b/src/command_modules/azure-cli-consumption/setup.py
@@ -16,7 +16,7 @@
cmdclass = {}
-VERSION = "0.3.1"
+VERSION = "0.3.3"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst
index 985d53965be..cc719d83746 100644
--- a/src/command_modules/azure-cli-container/HISTORY.rst
+++ b/src/command_modules/azure-cli-container/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+0.2.1
+++++++
+* Minor fixes
+
0.2.0
+++++
* Default to long running operation for `az container create`
diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py
index 82274b98ccb..a7aac70311f 100644
--- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py
+++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-container/setup.py b/src/command_modules/azure-cli-container/setup.py
index 3b17093b030..40dbe9ae16c 100644
--- a/src/command_modules/azure-cli-container/setup.py
+++ b/src/command_modules/azure-cli-container/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.2.0"
+VERSION = "0.2.1"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
diff --git a/src/command_modules/azure-cli-cosmosdb/HISTORY.rst b/src/command_modules/azure-cli-cosmosdb/HISTORY.rst
index 2fa7d2f4b90..5c3ea8c2d3a 100644
--- a/src/command_modules/azure-cli-cosmosdb/HISTORY.rst
+++ b/src/command_modules/azure-cli-cosmosdb/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+0.1.23
+++++++
+* Minor fixes
+
+0.1.22
+++++++
+* Minor fixes.
+
0.1.21
++++++
* Introducing VNET support for Azure CLI - Cosmos DB
diff --git a/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/_help.py b/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/_help.py
index 51b19547388..27b2eb9fa3e 100644
--- a/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/_help.py
+++ b/src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-cosmosdb/setup.py b/src/command_modules/azure-cli-cosmosdb/setup.py
index 5d5046ac8be..0a4179b91b7 100644
--- a/src/command_modules/azure-cli-cosmosdb/setup.py
+++ b/src/command_modules/azure-cli-cosmosdb/setup.py
@@ -16,7 +16,7 @@
cmdclass = {}
-VERSION = "0.1.21"
+VERSION = "0.1.23"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-dla/HISTORY.rst b/src/command_modules/azure-cli-dla/HISTORY.rst
index 4d744f401b4..777a3027cdd 100644
--- a/src/command_modules/azure-cli-dla/HISTORY.rst
+++ b/src/command_modules/azure-cli-dla/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+0.1.2
++++++
+* Minor fixes
+
+0.1.1
+++++++
+* Minor fixes.
+
0.1.0
+++++
* Minor fixes.
diff --git a/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/_help.py b/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/_help.py
index 71acfba6527..15e40c079f9 100644
--- a/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/_help.py
+++ b/src/command_modules/azure-cli-dla/azure/cli/command_modules/dla/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-dla/setup.py b/src/command_modules/azure-cli-dla/setup.py
index bb58f9a05ba..8e2738f3507 100644
--- a/src/command_modules/azure-cli-dla/setup.py
+++ b/src/command_modules/azure-cli-dla/setup.py
@@ -16,7 +16,7 @@
cmdclass = {}
-VERSION = "0.1.0"
+VERSION = "0.1.2"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-dls/HISTORY.rst b/src/command_modules/azure-cli-dls/HISTORY.rst
index 746030bc683..86ae496e465 100644
--- a/src/command_modules/azure-cli-dls/HISTORY.rst
+++ b/src/command_modules/azure-cli-dls/HISTORY.rst
@@ -3,9 +3,17 @@
Release History
===============
+0.1.0
+++++++
+* Minor fixes
+
+0.0.23
+++++++
+* Minor fixes.
+
0.0.22
++++++
-* Updated the ADLS version to latest.
+* Minor fixes.
0.0.21
++++++
diff --git a/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/_help.py b/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/_help.py
index c78f1778a45..4adb0542627 100644
--- a/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/_help.py
+++ b/src/command_modules/azure-cli-dls/azure/cli/command_modules/dls/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-dls/setup.py b/src/command_modules/azure-cli-dls/setup.py
index 9a8352f3bc2..10ac72607d7 100644
--- a/src/command_modules/azure-cli-dls/setup.py
+++ b/src/command_modules/azure-cli-dls/setup.py
@@ -16,7 +16,7 @@
cmdclass = {}
-VERSION = "0.0.22"
+VERSION = "0.1.0"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-dms/HISTORY.rst b/src/command_modules/azure-cli-dms/HISTORY.rst
index 1a1737a346e..8e6492da592 100644
--- a/src/command_modules/azure-cli-dms/HISTORY.rst
+++ b/src/command_modules/azure-cli-dms/HISTORY.rst
@@ -3,7 +3,14 @@
Release History
===============
-0.0.1
-+++++++++++++++++++++
+0.1.0
+++++++
+* Minor fixes
+
+0.0.2
++++++
+* Minor fixes.
+0.0.1
++++++
* Initial release. Adds support for the SQL to Azure SQL migration scenario.
diff --git a/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/_help.py b/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/_help.py
index 9a07369f04e..0a6cff3b24d 100644
--- a/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/_help.py
+++ b/src/command_modules/azure-cli-dms/azure/cli/command_modules/dms/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-dms/setup.py b/src/command_modules/azure-cli-dms/setup.py
index b6f313864ec..32a2b19aaf7 100644
--- a/src/command_modules/azure-cli-dms/setup.py
+++ b/src/command_modules/azure-cli-dms/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.0.1"
+VERSION = "0.1.0"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-eventgrid/HISTORY.rst b/src/command_modules/azure-cli-eventgrid/HISTORY.rst
index ed23815c599..f4796157e22 100644
--- a/src/command_modules/azure-cli-eventgrid/HISTORY.rst
+++ b/src/command_modules/azure-cli-eventgrid/HISTORY.rst
@@ -3,9 +3,16 @@
Release History
===============
-0.1.12
+0.1.14
+++++++
+* Minor fixes
+
+0.1.13
++++++
+* Minor fixes.
+0.1.12
+++++++
* `sdist` is now compatible with wheel 0.31.0
0.1.11
diff --git a/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/_help.py b/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/_help.py
index dba37bb38ec..897287060c8 100644
--- a/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/_help.py
+++ b/src/command_modules/azure-cli-eventgrid/azure/cli/command_modules/eventgrid/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-eventgrid/setup.py b/src/command_modules/azure-cli-eventgrid/setup.py
index 8d5218107d1..4e7fc4de690 100644
--- a/src/command_modules/azure-cli-eventgrid/setup.py
+++ b/src/command_modules/azure-cli-eventgrid/setup.py
@@ -13,7 +13,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.12"
+VERSION = "0.1.14"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
diff --git a/src/command_modules/azure-cli-eventhubs/HISTORY.rst b/src/command_modules/azure-cli-eventhubs/HISTORY.rst
index 41d3db1f69b..d5d12427dfb 100644
--- a/src/command_modules/azure-cli-eventhubs/HISTORY.rst
+++ b/src/command_modules/azure-cli-eventhubs/HISTORY.rst
@@ -3,24 +3,28 @@
Release History
===============
-0.1.3
+0.1.5
+++++
+* Minor fixes
+0.1.4
+++++++
+* Minor fixes.
+
+0.1.3
++++++
* Minor fixes
0.1.2
++++++
-
* Fix package wheel
* `sdist` is now compatible with wheel 0.31.0
0.1.1
+++++
-
* Suppress the eventhubs extension from being loaded now.
0.1.0
+++++
-
* Initial release.
diff --git a/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/_help.py b/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/_help.py
index dc376a11f6d..75407c026c8 100644
--- a/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/_help.py
+++ b/src/command_modules/azure-cli-eventhubs/azure/cli/command_modules/eventhubs/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-eventhubs/setup.py b/src/command_modules/azure-cli-eventhubs/setup.py
index d7c041fbef4..c2ff0d2c73f 100644
--- a/src/command_modules/azure-cli-eventhubs/setup.py
+++ b/src/command_modules/azure-cli-eventhubs/setup.py
@@ -13,7 +13,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.3"
+VERSION = "0.1.5"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
diff --git a/src/command_modules/azure-cli-extension/HISTORY.rst b/src/command_modules/azure-cli-extension/HISTORY.rst
index 74677091d39..d8d6e180308 100644
--- a/src/command_modules/azure-cli-extension/HISTORY.rst
+++ b/src/command_modules/azure-cli-extension/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+0.1.1
++++++
+* Minor fixes
+
0.1.0
+++++
* `extension list-available` will only show extensions compatible with CLI version.
diff --git a/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/_help.py b/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/_help.py
index 8bb98778e49..b9f57146c2e 100644
--- a/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/_help.py
+++ b/src/command_modules/azure-cli-extension/azure/cli/command_modules/extension/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-extension/setup.py b/src/command_modules/azure-cli-extension/setup.py
index 926ae40be75..fba731e0c84 100644
--- a/src/command_modules/azure-cli-extension/setup.py
+++ b/src/command_modules/azure-cli-extension/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.0"
+VERSION = "0.1.1"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
diff --git a/src/command_modules/azure-cli-feedback/HISTORY.rst b/src/command_modules/azure-cli-feedback/HISTORY.rst
index 703cdfa3bb1..cda8f8de1e4 100644
--- a/src/command_modules/azure-cli-feedback/HISTORY.rst
+++ b/src/command_modules/azure-cli-feedback/HISTORY.rst
@@ -3,10 +3,13 @@
Release History
===============
-2.1.3
+2.1.4
+++++
+* Minor fixes
-* Updated module definition.
+2.1.3
+++++++
+* Minor fixes
2.1.2
++++++
diff --git a/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/_help.py b/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/_help.py
index 07f40add19c..ba5dc016b9b 100644
--- a/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/_help.py
+++ b/src/command_modules/azure-cli-feedback/azure/cli/command_modules/feedback/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-feedback/setup.py b/src/command_modules/azure-cli-feedback/setup.py
index d3fb409f520..eb8d52d4e94 100644
--- a/src/command_modules/azure-cli-feedback/setup.py
+++ b/src/command_modules/azure-cli-feedback/setup.py
@@ -15,7 +15,7 @@
cmdclass = {}
-VERSION = "2.1.3"
+VERSION = "2.1.4"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-find/HISTORY.rst b/src/command_modules/azure-cli-find/HISTORY.rst
index 912f5dbffa3..128dd885c77 100644
--- a/src/command_modules/azure-cli-find/HISTORY.rst
+++ b/src/command_modules/azure-cli-find/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+0.2.12
+++++++
+* Minor fixes
+
0.2.11
++++++
* Minor fixes
diff --git a/src/command_modules/azure-cli-find/azure/cli/command_modules/find/_gather_commands.py b/src/command_modules/azure-cli-find/azure/cli/command_modules/find/_gather_commands.py
index 2ce5dc88779..dd6b68a20ae 100644
--- a/src/command_modules/azure-cli-find/azure/cli/command_modules/find/_gather_commands.py
+++ b/src/command_modules/azure-cli-find/azure/cli/command_modules/find/_gather_commands.py
@@ -5,6 +5,7 @@
import yaml
+from knack.help import REQUIRED_TAG
from knack.help_files import helps
@@ -27,7 +28,7 @@ def build_command_table(cli_ctx):
required = ''
help_desc = ''
if cmd_table[command].arguments[key].type.settings.get('required'):
- required = '[REQUIRED]'
+ required = REQUIRED_TAG
if cmd_table[command].arguments[key].type.settings.get('help'):
help_desc = cmd_table[command].arguments[key].type.settings.get('help')
diff --git a/src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py b/src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
index 86832dc11c5..2ce8588f5b4 100644
--- a/src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
+++ b/src/command_modules/azure-cli-find/azure/cli/command_modules/find/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-find/setup.py b/src/command_modules/azure-cli-find/setup.py
index 4867c3497d8..347cd0d9a69 100644
--- a/src/command_modules/azure-cli-find/setup.py
+++ b/src/command_modules/azure-cli-find/setup.py
@@ -15,7 +15,7 @@
cmdclass = {}
-VERSION = "0.2.11"
+VERSION = "0.2.12"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-interactive/HISTORY.rst b/src/command_modules/azure-cli-interactive/HISTORY.rst
index b3bc687d836..57ca2e7b4b6 100644
--- a/src/command_modules/azure-cli-interactive/HISTORY.rst
+++ b/src/command_modules/azure-cli-interactive/HISTORY.rst
@@ -13,7 +13,7 @@ Release History
0.3.22
++++++
-* Cap the dependencies
+* Fix dependency versions.
0.3.21
++++++
diff --git a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/__init__.py b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/__init__.py
index b063847029f..ba503827c6c 100644
--- a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/__init__.py
+++ b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/__init__.py
@@ -3,4 +3,4 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
-__version__ = '0.3.19'
+__version__ = '0.3.24'
diff --git a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/_dump_commands.py b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/_dump_commands.py
index bd1955fcbbe..44e8e2ca2cd 100644
--- a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/_dump_commands.py
+++ b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/_dump_commands.py
@@ -7,6 +7,7 @@
import os
import yaml
+from knack.help import REQUIRED_TAG
from knack.help_files import helps
from knack.log import get_logger
from azure.cli.core import MainCommandsLoader
@@ -68,7 +69,7 @@ class FreshTable(object):
this class generates and dumps the fresh command table into a file
as well as installs all the modules
"""
- command_table = None
+ loader = None
def __init__(self, shell_ctx):
self.shell_ctx = shell_ctx
@@ -96,15 +97,15 @@ def dump_command_table(self, shell_ctx=None):
# checking all the parameters for a single command
parameter_metadata = {}
- for key in cmd.arguments:
+ for arg in cmd.arguments.values():
options = {
- 'name': [name for name in cmd.arguments[key].options_list],
- 'required': '[REQUIRED]' if cmd.arguments[key].type.settings.get('required') else '',
- 'help': cmd.arguments[key].type.settings.get('help') or ''
+ 'name': [name for name in arg.options_list],
+ 'required': REQUIRED_TAG if arg.type.settings.get('required') else '',
+ 'help': arg.type.settings.get('help') or ''
}
# the key is the first alias option
- if cmd.arguments[key].options_list:
- parameter_metadata[cmd.arguments[key].options_list[0]] = options
+ if arg.options_list:
+ parameter_metadata[arg.options_list[0]] = options
cmd_table_data[command_name] = {
'parameters': parameter_metadata,
@@ -117,7 +118,7 @@ def dump_command_table(self, shell_ctx=None):
load_help_files(cmd_table_data)
elapsed = timeit.default_timer() - start_time
logger.debug('Command table dumped: %s sec', elapsed)
- FreshTable.command_table = main_loader.command_table
+ FreshTable.loader = main_loader
# dump into the cache file
command_file = shell_ctx.config.get_help_files()
diff --git a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/az_completer.py b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/az_completer.py
index 65d4a66d8a7..4e3da9ee541 100644
--- a/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/az_completer.py
+++ b/src/command_modules/azure-cli-interactive/azure/cli/command_modules/interactive/azclishell/az_completer.py
@@ -33,11 +33,12 @@ def _check_value_muted(_, action, value):
def sort_completions(completions_gen):
""" sorts the completions """
+ from knack.help import REQUIRED_TAG
def _get_weight(val):
""" weights the completions with required things first the lexicographically"""
priority = ''
- if val.display_meta and val.display_meta.startswith('[REQUIRED]'):
+ if val.display_meta and val.display_meta.startswith(REQUIRED_TAG):
priority = ' ' # a space has the lowest ordinance
return priority + val.text
@@ -107,9 +108,10 @@ def start(self, commands, global_params=True):
def initialize_command_table_attributes(self):
from ._dump_commands import FreshTable
- self.cmdtab = FreshTable(self.shell_ctx).command_table
- if self.cmdtab:
- self.parser.load_command_table(self.cmdtab)
+ loader = FreshTable(self.shell_ctx).loader
+ if loader and loader.command_table:
+ self.cmdtab = loader.command_table
+ self.parser.load_command_table(loader)
self.argsfinder = ArgsFinder(self.parser)
def validate_param_completion(self, param, leftover_args):
diff --git a/src/command_modules/azure-cli-iot/HISTORY.rst b/src/command_modules/azure-cli-iot/HISTORY.rst
index 53e5b55401a..e8cd636b616 100644
--- a/src/command_modules/azure-cli-iot/HISTORY.rst
+++ b/src/command_modules/azure-cli-iot/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+0.1.23
+++++++
+* Minor fixes
+
+0.1.22
+++++++
+* Minor fixes.
+
0.1.21
++++++
diff --git a/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py b/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py
index 0d3e214951a..7079a5472e9 100644
--- a/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py
+++ b/src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-iot/setup.py b/src/command_modules/azure-cli-iot/setup.py
index faec6f85d26..444c49892cd 100644
--- a/src/command_modules/azure-cli-iot/setup.py
+++ b/src/command_modules/azure-cli-iot/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.21"
+VERSION = "0.1.23"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-keyvault/HISTORY.rst b/src/command_modules/azure-cli-keyvault/HISTORY.rst
index 96e1a175591..d5da61a5e75 100644
--- a/src/command_modules/azure-cli-keyvault/HISTORY.rst
+++ b/src/command_modules/azure-cli-keyvault/HISTORY.rst
@@ -3,10 +3,13 @@
Release History
===============
-2.0.23
+2.0.24
++++++
+* Minor fixes
-* Updated module definition.
+2.0.23
+++++++
+* Minor fixes.
2.0.22
++++++
diff --git a/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/_help.py b/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/_help.py
index 17180b080a2..c399de03406 100644
--- a/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/_help.py
+++ b/src/command_modules/azure-cli-keyvault/azure/cli/command_modules/keyvault/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-keyvault/setup.py b/src/command_modules/azure-cli-keyvault/setup.py
index 088ff597d06..5169a81a2ef 100644
--- a/src/command_modules/azure-cli-keyvault/setup.py
+++ b/src/command_modules/azure-cli-keyvault/setup.py
@@ -15,7 +15,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.23"
+VERSION = "2.0.24"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
diff --git a/src/command_modules/azure-cli-lab/HISTORY.rst b/src/command_modules/azure-cli-lab/HISTORY.rst
index da1ed3f6828..19909acfc5f 100644
--- a/src/command_modules/azure-cli-lab/HISTORY.rst
+++ b/src/command_modules/azure-cli-lab/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+0.1.0
++++++
+* Minor fixes
+
+0.0.23
+++++++
+* Minor fixes.
+
0.0.22
++++++
* Fix regression from knack conversion that replaced table_transformers with transforms.
diff --git a/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/_help.py b/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/_help.py
index 0ae3c9b7e3f..459c17e7c0a 100644
--- a/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/_help.py
+++ b/src/command_modules/azure-cli-lab/azure/cli/command_modules/lab/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-lab/setup.py b/src/command_modules/azure-cli-lab/setup.py
index 519f621d8cd..a194ea19a50 100644
--- a/src/command_modules/azure-cli-lab/setup.py
+++ b/src/command_modules/azure-cli-lab/setup.py
@@ -12,7 +12,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.0.22"
+VERSION = "0.1.0"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-monitor/HISTORY.rst b/src/command_modules/azure-cli-monitor/HISTORY.rst
index fe112a09092..e331bce6266 100644
--- a/src/command_modules/azure-cli-monitor/HISTORY.rst
+++ b/src/command_modules/azure-cli-monitor/HISTORY.rst
@@ -3,8 +3,12 @@
Release History
===============
-0.1.8
+0.1.9
+++++
+* Minor fixes
+
+0.1.8
+++++++
* Minor fixes.
0.1.7
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py
index aa3c0090ada..3686214772e 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
@@ -493,7 +494,7 @@
helps['monitor autoscale-settings'] = """
type: group
- short-summary: (DEPRECATED) Manage autoscale settings.
+ short-summary: Manage autoscale settings.
"""
helps['monitor autoscale-settings update'] = """
type: command
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py
index a23660abbba..5b0ce957fc4 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py
@@ -155,7 +155,8 @@ def load_command_table(self, _):
g.custom_command('delete', 'autoscale_rule_delete')
g.custom_command('copy', 'autoscale_rule_copy')
- with self.command_group('monitor autoscale-settings', autoscale_sdk, custom_command_type=autoscale_custom) as g:
+ with self.command_group('monitor autoscale-settings', autoscale_sdk, custom_command_type=autoscale_custom,
+ deprecate_info=self.deprecate(redirect='monitor autoscale', hide='2.0.34')) as g:
g.command('create', 'create_or_update', deprecate_info='az monitor autoscale create')
g.command('delete', 'delete', deprecate_info='az monitor autoscale delete')
g.command('show', 'get', deprecate_info='az monitor autoscale show')
diff --git a/src/command_modules/azure-cli-monitor/linter_exclusions.yml b/src/command_modules/azure-cli-monitor/linter_exclusions.yml
index c6c89090f99..0e7140db9a8 100644
--- a/src/command_modules/azure-cli-monitor/linter_exclusions.yml
+++ b/src/command_modules/azure-cli-monitor/linter_exclusions.yml
@@ -3,10 +3,10 @@ monitor activity-log alert update:
parameters:
enabled:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
monitor alert update:
parameters:
enabled:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
...
\ No newline at end of file
diff --git a/src/command_modules/azure-cli-monitor/setup.py b/src/command_modules/azure-cli-monitor/setup.py
index 8f887868710..12e39d9378c 100644
--- a/src/command_modules/azure-cli-monitor/setup.py
+++ b/src/command_modules/azure-cli-monitor/setup.py
@@ -12,7 +12,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.8"
+VERSION = "0.1.9"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-network/HISTORY.rst b/src/command_modules/azure-cli-network/HISTORY.rst
index a760a010b6f..91547dcdb60 100644
--- a/src/command_modules/azure-cli-network/HISTORY.rst
+++ b/src/command_modules/azure-cli-network/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.1.6
++++++
+* Minor fixes
+
2.1.5
++++++
* `network dns zone import`: Fix issue where record types were case-sensitive. [#6602](https://github.com/Azure/azure-cli/issues/6602)
diff --git a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py
index 615e94e92d7..31609347c11 100644
--- a/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py
+++ b/src/command_modules/azure-cli-network/azure/cli/command_modules/network/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-network/linter_exclusions.yml b/src/command_modules/azure-cli-network/linter_exclusions.yml
index fdc4f9fd9b3..d268b8031b3 100644
--- a/src/command_modules/azure-cli-network/linter_exclusions.yml
+++ b/src/command_modules/azure-cli-network/linter_exclusions.yml
@@ -3,32 +3,32 @@ network nic ip-config create:
parameters:
private_ip_address_version:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
network nic ip-config update:
parameters:
private_ip_address_version:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
network nsg rule create:
parameters:
access:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
direction:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
network nsg rule update:
parameters:
access:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
direction:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
network vnet peering list:
rule_exclusions:
- - no_ids_for_list_commands_rule
+ - no_ids_for_list_commands
network vnet subnet list:
rule_exclusions:
- - no_ids_for_list_commands_rule
+ - no_ids_for_list_commands
...
\ No newline at end of file
diff --git a/src/command_modules/azure-cli-network/setup.py b/src/command_modules/azure-cli-network/setup.py
index 1d2fd69e361..41df69af19d 100644
--- a/src/command_modules/azure-cli-network/setup.py
+++ b/src/command_modules/azure-cli-network/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.1.5"
+VERSION = "2.1.6"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-profile/HISTORY.rst b/src/command_modules/azure-cli-profile/HISTORY.rst
index ef587e76b2f..b1c9ea36a7b 100644
--- a/src/command_modules/azure-cli-profile/HISTORY.rst
+++ b/src/command_modules/azure-cli-profile/HISTORY.rst
@@ -2,6 +2,11 @@
Release History
===============
+
+2.0.28
+++++++
+* Minor fixes
+
2.0.27
++++++
* login: use browser for interactive login
diff --git a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_help.py b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_help.py
index b79eac55045..5679ee9b4db 100644
--- a/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_help.py
+++ b/src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-profile/setup.py b/src/command_modules/azure-cli-profile/setup.py
index 805892cdf36..1b2d6438b77 100644
--- a/src/command_modules/azure-cli-profile/setup.py
+++ b/src/command_modules/azure-cli-profile/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.27"
+VERSION = "2.0.28"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-rdbms/HISTORY.rst b/src/command_modules/azure-cli-rdbms/HISTORY.rst
index 23e6c246479..e3c19444927 100644
--- a/src/command_modules/azure-cli-rdbms/HISTORY.rst
+++ b/src/command_modules/azure-cli-rdbms/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+0.2.6
++++++
+* Minor fixes
+
0.2.5
+++++
* Added 'postgres/myql server vnet-rule' commands.
diff --git a/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/_help.py b/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/_help.py
index e3292503edc..41c8113c31d 100644
--- a/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/_help.py
+++ b/src/command_modules/azure-cli-rdbms/azure/cli/command_modules/rdbms/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-rdbms/setup.py b/src/command_modules/azure-cli-rdbms/setup.py
index a9c6d4dce49..f90f79a8af4 100644
--- a/src/command_modules/azure-cli-rdbms/setup.py
+++ b/src/command_modules/azure-cli-rdbms/setup.py
@@ -12,7 +12,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.2.5"
+VERSION = "0.2.6"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-redis/HISTORY.rst b/src/command_modules/azure-cli-redis/HISTORY.rst
index 18e3b0c5f6f..dfc44d434df 100644
--- a/src/command_modules/azure-cli-redis/HISTORY.rst
+++ b/src/command_modules/azure-cli-redis/HISTORY.rst
@@ -3,11 +3,13 @@
Release History
===============
+0.2.15
+++++++
+* Minor fixes
0.2.14
++++++
-
-* Updated module definition.
+* Minor fixes.
0.2.13
++++++
diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_help.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_help.py
index 48a9bc86feb..49f0f92efdd 100644
--- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_help.py
+++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
@@ -23,7 +24,7 @@
helps['redis import-method'] = """
type: command
- short-summary: (DEPRECATED) Import data into a Redis cache.
+ short-summary: Import data into a Redis cache.
"""
helps['redis list'] = """
@@ -33,14 +34,12 @@
helps['redis list-all'] = """
type: command
- short-summary: (DEPRECATED) Gets all Redis caches in the specified subscription.
+ short-summary: Gets all Redis caches in the specified subscription.
"""
helps['redis update-settings'] = """
type: command
- short-summary: (DEPRECATED) Update the settings of a Redis cache.
- long-summary: |
- WARNING: This command is deprecated. Instead, use the `update` command.
+ short-summary: Update the settings of a Redis cache.
"""
helps['redis update'] = """
@@ -52,9 +51,3 @@
type: group
short-summary: Manage Redis patch schedules.
"""
-
-helps['redis patch-schedule patch-schedule'] = """
- type: group
- short-summary: This group is deprecated and will be removed in CLI version 2.0.36.
- The command, `redis patch-schedule patch-schedule show`, will be replaced with `redis patch-schedule show`'
-"""
diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py
index ebd8fceffdb..0aa79ec0cd8 100644
--- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py
+++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/commands.py
@@ -25,14 +25,16 @@ def load_command_table(self, _):
g.command('delete', 'delete')
g.custom_command('export', 'cli_redis_export')
g.command('force-reboot', 'force_reboot')
- g.custom_command('import-method', 'cli_redis_import_method', deprecate_info='az redis import')
+ g.custom_command('import-method', 'cli_redis_import_method',
+ deprecate_info=g.deprecate(redirect='redis import', hide='2.0.34'))
g.custom_command('import', 'cli_redis_import_method')
g.custom_command('list', 'cli_redis_list')
- g.command('list-all', 'list', deprecate_info='az redis list')
+ g.command('list-all', 'list', deprecate_info=g.deprecate(redirect='redis list', hide='2.0.34'))
g.command('list-keys', 'list_keys')
g.command('regenerate-keys', 'regenerate_key')
g.command('show', 'get')
- g.custom_command('update-settings', 'cli_redis_update_settings', deprecate_info='az redis update')
+ g.custom_command('update-settings', 'cli_redis_update_settings',
+ deprecate_info=g.deprecate(redirect='redis update', hide='2.0.34'))
g.generic_update_command('update', exception_handler=wrong_vmsize_argument_exception_handler,
setter_name='update', custom_func_name='cli_redis_update')
@@ -40,4 +42,3 @@ def load_command_table(self, _):
g.command('set', 'create_or_update')
g.command('delete', 'delete')
g.command('show', 'get')
- g.command('patch-schedule show', 'get', deprecate_info="az redis patch-schedule show")
diff --git a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/custom.py b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/custom.py
index 33abc96fcb8..70a33cad653 100644
--- a/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/custom.py
+++ b/src/command_modules/azure-cli-redis/azure/cli/command_modules/redis/custom.py
@@ -50,7 +50,6 @@ def cli_redis_list(cmd, client, resource_group_name=None):
# pylint: disable=unused-argument
def cli_redis_update_settings(cmd, client, resource_group_name, name, redis_configuration):
from azure.mgmt.redis.models import RedisUpdateParameters
- logger.warning('This command is getting deprecated. Please use "redis update" command')
existing = client.get(resource_group_name, name)
existing.redis_configuration.update(redis_configuration)
diff --git a/src/command_modules/azure-cli-redis/setup.py b/src/command_modules/azure-cli-redis/setup.py
index 693622abb2c..6048aad1164 100644
--- a/src/command_modules/azure-cli-redis/setup.py
+++ b/src/command_modules/azure-cli-redis/setup.py
@@ -15,7 +15,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.2.14"
+VERSION = "0.2.15"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-reservations/HISTORY.rst b/src/command_modules/azure-cli-reservations/HISTORY.rst
index e1dcb1d058f..2c0eb18aa3f 100644
--- a/src/command_modules/azure-cli-reservations/HISTORY.rst
+++ b/src/command_modules/azure-cli-reservations/HISTORY.rst
@@ -3,8 +3,12 @@
Release History
===============
+0.2.2
++++++
+* Minor fixes
+
0.2.1
-++++++
++++++
* Minor fixes.
0.2.0
diff --git a/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/_help.py b/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/_help.py
index a7385653a33..831967815df 100644
--- a/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/_help.py
+++ b/src/command_modules/azure-cli-reservations/azure/cli/command_modules/reservations/_help.py
@@ -1,4 +1,5 @@
-# --------------------------------------------------------------------------------------------
+# coding=utf-8
+# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
diff --git a/src/command_modules/azure-cli-reservations/setup.py b/src/command_modules/azure-cli-reservations/setup.py
index 2dafb504afd..000e043fdd0 100644
--- a/src/command_modules/azure-cli-reservations/setup.py
+++ b/src/command_modules/azure-cli-reservations/setup.py
@@ -15,7 +15,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.2.1"
+VERSION = "0.2.2"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [
diff --git a/src/command_modules/azure-cli-resource/HISTORY.rst b/src/command_modules/azure-cli-resource/HISTORY.rst
index 996742d99dd..b8ea9f815bf 100644
--- a/src/command_modules/azure-cli-resource/HISTORY.rst
+++ b/src/command_modules/azure-cli-resource/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.0.33
+++++++
+* Minor fixes
+
2.0.32
++++++
* Support deployment at subscription scope: new operation group `deployment`.
diff --git a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py
index 08626e5f285..e0810ebbe0c 100644
--- a/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py
+++ b/src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-resource/setup.py b/src/command_modules/azure-cli-resource/setup.py
index 30443b8f5a8..bde3a05ecc2 100644
--- a/src/command_modules/azure-cli-resource/setup.py
+++ b/src/command_modules/azure-cli-resource/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.32"
+VERSION = "2.0.33"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
diff --git a/src/command_modules/azure-cli-role/HISTORY.rst b/src/command_modules/azure-cli-role/HISTORY.rst
index d0bda825e68..29954c92fe2 100644
--- a/src/command_modules/azure-cli-role/HISTORY.rst
+++ b/src/command_modules/azure-cli-role/HISTORY.rst
@@ -2,6 +2,15 @@
Release History
===============
+
+2.0.28
+++++++
+* Minor fixes
+
+2.0.27
+++++++
+* Minor fixes.
+
2.0.26
++++++
* Minor fixes.
@@ -11,6 +20,10 @@ Release History
* ad: remove stack traces from graph exceptions before surface to users
* ad sp create: do not throw if CLI can't resolve app id
+2.0.25
+++++++
+* Minor fixes.
+
2.0.24
++++++
* ad app update: add generic update support
diff --git a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py
index 19933c7fa7d..850c2e4f48b 100644
--- a/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py
+++ b/src/command_modules/azure-cli-role/azure/cli/command_modules/role/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-role/setup.py b/src/command_modules/azure-cli-role/setup.py
index 4190feeaead..4aef4ce3a36 100644
--- a/src/command_modules/azure-cli-role/setup.py
+++ b/src/command_modules/azure-cli-role/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.26"
+VERSION = "2.0.28"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-servicebus/HISTORY.rst b/src/command_modules/azure-cli-servicebus/HISTORY.rst
index f82da5a9c3a..33ea437367b 100644
--- a/src/command_modules/azure-cli-servicebus/HISTORY.rst
+++ b/src/command_modules/azure-cli-servicebus/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+0.1.4
++++++
+* Minor fixes
+
+0.1.3
+++++++
+* Minor fixes.
+
0.1.2
++++++
diff --git a/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/_help.py b/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/_help.py
index 705470ad8e8..dd6ca1aedbf 100644
--- a/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/_help.py
+++ b/src/command_modules/azure-cli-servicebus/azure/cli/command_modules/servicebus/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-servicebus/setup.py b/src/command_modules/azure-cli-servicebus/setup.py
index 91d433bc024..6c7a31f2d87 100644
--- a/src/command_modules/azure-cli-servicebus/setup.py
+++ b/src/command_modules/azure-cli-servicebus/setup.py
@@ -13,7 +13,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.1.2"
+VERSION = "0.1.4"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
diff --git a/src/command_modules/azure-cli-servicefabric/HISTORY.rst b/src/command_modules/azure-cli-servicefabric/HISTORY.rst
index 3a149a45180..155fb11167d 100644
--- a/src/command_modules/azure-cli-servicefabric/HISTORY.rst
+++ b/src/command_modules/azure-cli-servicefabric/HISTORY.rst
@@ -3,9 +3,16 @@
Release History
===============
-0.0.12
+0.1.0
++++++
+* Minor fixes
+
+0.0.13
++++++
+* Minor fixes.
+0.0.12
+++++++
* `sdist` is now compatible with wheel 0.31.0
0.0.11
diff --git a/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/_help.py b/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/_help.py
index ee3dd90fdb6..049decd35c6 100644
--- a/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/_help.py
+++ b/src/command_modules/azure-cli-servicefabric/azure/cli/command_modules/servicefabric/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-servicefabric/setup.py b/src/command_modules/azure-cli-servicefabric/setup.py
index 446d245b798..2550aaeca09 100644
--- a/src/command_modules/azure-cli-servicefabric/setup.py
+++ b/src/command_modules/azure-cli-servicefabric/setup.py
@@ -16,7 +16,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "0.0.12"
+VERSION = "0.1.0"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
diff --git a/src/command_modules/azure-cli-sql/HISTORY.rst b/src/command_modules/azure-cli-sql/HISTORY.rst
index 512687e1cd1..ebe0d39884c 100644
--- a/src/command_modules/azure-cli-sql/HISTORY.rst
+++ b/src/command_modules/azure-cli-sql/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+2.0.29
+++++++
+* Minor fixes
+
+2.0.28
+++++++
+* Minor fixes.
+
2.0.27
++++++
* Added new Managed instance and Managed database CRUD commands.
diff --git a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_help.py b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_help.py
index c86e9d772bf..50cd5a23a94 100644
--- a/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_help.py
+++ b/src/command_modules/azure-cli-sql/azure/cli/command_modules/sql/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-sql/setup.py b/src/command_modules/azure-cli-sql/setup.py
index d87f414caea..deb22fa01e4 100644
--- a/src/command_modules/azure-cli-sql/setup.py
+++ b/src/command_modules/azure-cli-sql/setup.py
@@ -12,7 +12,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.27"
+VERSION = "2.0.29"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
diff --git a/src/command_modules/azure-cli-storage/HISTORY.rst b/src/command_modules/azure-cli-storage/HISTORY.rst
index f5f61b57814..16ece287ae8 100644
--- a/src/command_modules/azure-cli-storage/HISTORY.rst
+++ b/src/command_modules/azure-cli-storage/HISTORY.rst
@@ -3,6 +3,14 @@
Release History
===============
+2.0.37
+++++++
+* Minor fixes
+
+2.0.36
+++++++
+* Minor fixes
+
2.0.35
++++++
* Changed table output for `storage blob download` to be more readable.
diff --git a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_help.py b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_help.py
index e5a6555e426..77b0892fc6a 100644
--- a/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_help.py
+++ b/src/command_modules/azure-cli-storage/azure/cli/command_modules/storage/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-storage/setup.py b/src/command_modules/azure-cli-storage/setup.py
index 942b8c7d2ea..b9d7c8de690 100644
--- a/src/command_modules/azure-cli-storage/setup.py
+++ b/src/command_modules/azure-cli-storage/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.0.35"
+VERSION = "2.0.37"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
diff --git a/src/command_modules/azure-cli-vm/HISTORY.rst b/src/command_modules/azure-cli-vm/HISTORY.rst
index c4d317f38ab..e4c630c201b 100644
--- a/src/command_modules/azure-cli-vm/HISTORY.rst
+++ b/src/command_modules/azure-cli-vm/HISTORY.rst
@@ -3,6 +3,10 @@
Release History
===============
+2.0.36
+++++++
+* Minor fixes
+
2.0.35
++++++
* msi: support removing system assigned identity
diff --git a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
index 5a4f8b6b5f6..d99b388a7a2 100644
--- a/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
+++ b/src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
@@ -1,3 +1,4 @@
+# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/src/command_modules/azure-cli-vm/linter_exclusions.yml b/src/command_modules/azure-cli-vm/linter_exclusions.yml
index d9eb81f95eb..7a4d679bacd 100644
--- a/src/command_modules/azure-cli-vm/linter_exclusions.yml
+++ b/src/command_modules/azure-cli-vm/linter_exclusions.yml
@@ -5,43 +5,43 @@ vmss create:
parameters:
upgrade_policy_mode:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
public_ip_address_allocation:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
vmss encryption enable:
parameters:
key_encryption_algorithm:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
vm create:
parameters:
public_ip_address_allocation:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
vm unmanaged-disk attach:
parameters:
size_gb:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
vm encryption enable:
parameters:
key_encryption_algorithm:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
image create:
parameters:
os_type:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
snapshot create:
parameters:
sku:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
snapshot update:
parameters:
sku:
rule_exclusions:
- - missing_parameter_help_rule
+ - missing_parameter_help
...
\ No newline at end of file
diff --git a/src/command_modules/azure-cli-vm/setup.py b/src/command_modules/azure-cli-vm/setup.py
index 4322bba8a9c..19e62e2bdf2 100644
--- a/src/command_modules/azure-cli-vm/setup.py
+++ b/src/command_modules/azure-cli-vm/setup.py
@@ -15,7 +15,7 @@
cmdclass = {}
-VERSION = "2.0.35"
+VERSION = "2.0.36"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
diff --git a/tools/automation/cli_linter/__init__.py b/tools/automation/cli_linter/__init__.py
index ae0d186811e..36a2793dc1f 100644
--- a/tools/automation/cli_linter/__init__.py
+++ b/tools/automation/cli_linter/__init__.py
@@ -37,7 +37,7 @@ def main(args):
# load commands, args, and help
create_invoker_and_load_cmds_and_args(az_cli)
loaded_help = get_all_help(az_cli)
- command_table = az_cli.invocation.commands_loader.command_table
+ command_loader = az_cli.invocation.commands_loader
# format loaded help
loaded_help = {data.command: data for data in loaded_help if data.command}
@@ -64,11 +64,11 @@ def main(args):
# only run linter on modules and extensions specified
if args.modules or args.extensions:
from .util import include_commands
- command_table, help_file_entries = include_commands(
- command_table, help_file_entries, module_inclusions=args.modules, extensions=args.extensions)
+ command_loader, help_file_entries = include_commands(
+ command_loader, help_file_entries, module_inclusions=args.modules, extensions=args.extensions)
# Instantiate and run Linter
- linter_manager = LinterManager(command_table=command_table,
+ linter_manager = LinterManager(command_loader=command_loader,
help_file_entries=help_file_entries,
loaded_help=loaded_help,
exclusions=exclusions,
diff --git a/tools/automation/cli_linter/linter.py b/tools/automation/cli_linter/linter.py
index f145508ecc2..534f701d33a 100644
--- a/tools/automation/cli_linter/linter.py
+++ b/tools/automation/cli_linter/linter.py
@@ -10,45 +10,49 @@
from pkgutil import iter_modules
import yaml
import colorama
-from .util import get_command_groups, share_element, exclude_commands, LinterError
+from .util import share_element, exclude_commands, LinterError
class Linter(object):
- def __init__(self, command_table=None, help_file_entries=None, loaded_help=None):
- self._command_table = command_table
+ def __init__(self, command_loader=None, help_file_entries=None, loaded_help=None):
self._all_yaml_help = help_file_entries
self._loaded_help = loaded_help
- self._commands = set(command_table.keys())
- self._command_groups = set()
+ self._command_loader = command_loader
self._parameters = {}
self._help_file_entries = set(help_file_entries.keys())
- # get all unsupressed parameters
- for command_name, command in command_table.items():
+ for command_name, command in self._command_loader.command_table.items():
self._parameters[command_name] = set()
for name, param in command.arguments.items():
- if param.type.settings.get('help') != argparse.SUPPRESS:
- self._parameters[command_name].add(name)
-
- # populate command groups
- for command_name in self._commands:
- self._command_groups.update(get_command_groups(command_name))
+ self._parameters[command_name].add(name)
@property
def commands(self):
- return self._commands
+ return self._command_loader.command_table.keys()
@property
def command_groups(self):
- return self._command_groups
+ return self._command_loader.command_group_table.keys()
@property
def help_file_entries(self):
return self._help_file_entries
+ def get_command_metadata(self, command_name):
+ try:
+ return self._command_loader.command_table[command_name]
+ except KeyError:
+ return None
+
def get_command_parameters(self, command_name):
return self._parameters.get(command_name)
+ def get_command_group_metadata(self, command_group_name):
+ try:
+ return self._command_loader.command_group_table[command_group_name]
+ except KeyError:
+ return None
+
def get_help_entry_type(self, entry_name):
return self._all_yaml_help.get(entry_name).get('type')
@@ -56,8 +60,8 @@ def get_help_entry_parameter_names(self, entry_name):
return [param_help.get('name', None) for param_help in \
self._all_yaml_help.get(entry_name).get('parameters', [])]
- def is_valid_parameter_help_name(self, entry_name, param_help_name):
- return param_help_name in [param.name for param in self._loaded_help.get(entry_name).parameters]
+ def is_valid_parameter_help_name(self, entry_name, param_name):
+ return param_name in [param.name for param in getattr(self._loaded_help.get(entry_name), 'parameters', [])]
def get_command_help(self, command_name):
return self._get_loaded_help_description(command_name)
@@ -66,25 +70,66 @@ def get_command_group_help(self, command_group_name):
return self._get_loaded_help_description(command_group_name)
def get_parameter_options(self, command_name, parameter_name):
- return self._command_table.get(command_name).arguments.get(parameter_name).type.settings.get('options_list')
+ return self.get_command_metadata(command_name).arguments.get(parameter_name).type.settings.get('options_list')
def get_parameter_help(self, command_name, parameter_name):
options = self.get_parameter_options(command_name, parameter_name)
- parameter_helps = self._loaded_help.get(command_name).parameters
+ command_help = self._loaded_help.get(command_name, None)
+
+ if not command_help:
+ return None
+
+ parameter_helps = command_help.parameters
param_help = next((param for param in parameter_helps if share_element(options, param.name.split())), None)
# workaround for --ids which is not does not generate doc help (BUG)
if not param_help:
- return self._command_table.get(command_name).arguments.get(parameter_name).type.settings.get('help')
+ return self._command_loader.command_table.get(command_name).arguments.get(parameter_name).type.settings.get('help')
return param_help.short_summary or param_help.long_summary
+ def command_expired(self, command_name):
+ deprecate_info = self._command_loader.command_table[command_name].deprecate_info
+ if deprecate_info:
+ return deprecate_info.expired()
+ return False
+
+ def command_group_expired(self, command_group_name):
+ try:
+ deprecate_info = self._command_loader.command_group_table[command_group_name].group_kwargs.get('deprecate_info', None)
+ if deprecate_info:
+ return deprecate_info.expired()
+ except AttributeError:
+ # Items with only token presence in the command table will not have any data. They can't be expired.
+ pass
+ return False
+
+ def parameter_expired(self, command_name, parameter_name):
+ parameter = self._command_loader.command_table[command_name].arguments[parameter_name].type.settings
+ deprecate_info = parameter.get('deprecate_info', None)
+ if deprecate_info:
+ return deprecate_info.expired()
+ return False
+
+ def option_expired(self, command_name, parameter_name):
+ from knack.deprecation import Deprecated
+ parameter = self._command_loader.command_table[command_name].arguments[parameter_name].type.settings
+ options_list = parameter.get('options_list', [])
+ expired_options_list = []
+ for opt in options_list:
+ if isinstance(opt, Deprecated) and opt.expired():
+ expired_options_list.append(opt.target)
+ return expired_options_list
+
def _get_loaded_help_description(self, entry):
- return self._loaded_help.get(entry).short_summary or self._loaded_help.get(entry).long_summary
+ help_entry = self._loaded_help.get(entry, None)
+ if help_entry:
+ return help_entry.short_summary or help_entry.long_summary
+ return help_entry
class LinterManager(object):
- def __init__(self, command_table=None, help_file_entries=None, loaded_help=None, exclusions=None,
- rule_inclusions=None):
- self.linter = Linter(command_table=command_table, help_file_entries=help_file_entries, loaded_help=loaded_help)
+ def __init__(self, command_loader=None, help_file_entries=None, loaded_help=None, exclusions=None,
+ rule_inclusions=None):
+ self.linter = Linter(command_loader=command_loader, help_file_entries=help_file_entries, loaded_help=loaded_help)
self._exclusions = exclusions or {}
self._rules = {
'help_file_entries': {},
@@ -95,7 +140,7 @@ def __init__(self, command_table=None, help_file_entries=None, loaded_help=None,
self._ci_exclusions = {}
self._rule_inclusions = rule_inclusions
self._loaded_help = loaded_help
- self._command_table = command_table
+ self._command_loader = command_loader
self._help_file_entries = help_file_entries
self._exit_code = 0
self._ci = False
@@ -106,9 +151,9 @@ def add_rule(self, rule_type, rule_name, rule_callable):
def get_linter():
if rule_name in self._ci_exclusions and self._ci:
mod_exclusions = self._ci_exclusions[rule_name]
- command_table, help_file_entries = exclude_commands(self._command_table, self._help_file_entries,
+ command_loader, help_file_entries = exclude_commands(self._command_loader, self._help_file_entries,
mod_exclusions)
- return Linter(command_table=command_table, help_file_entries=help_file_entries,
+ return Linter(command_loader=command_loader, help_file_entries=help_file_entries,
loaded_help=self._loaded_help)
return self.linter
self._rules[rule_type][rule_name] = rule_callable, get_linter
diff --git a/tools/automation/cli_linter/rules/ci_exclusions.yml b/tools/automation/cli_linter/rules/ci_exclusions.yml
index 73eef7511cc..800f4854202 100644
--- a/tools/automation/cli_linter/rules/ci_exclusions.yml
+++ b/tools/automation/cli_linter/rules/ci_exclusions.yml
@@ -2,7 +2,7 @@
# the following are the rules and the modules that are excluded from those rules in the ci
# note that this is a TEMPORARY stop-gap and the rule violations should be addressed
-no_ids_for_list_commands_rule:
+no_ids_for_list_commands:
- advisor
- dla
- dls
@@ -10,7 +10,7 @@ no_ids_for_list_commands_rule:
- iot
- rdbms
- sql
-missing_parameter_help_rule:
+missing_parameter_help:
- acs
- cdn
- dla
diff --git a/tools/automation/cli_linter/rules/command_group_rules.py b/tools/automation/cli_linter/rules/command_group_rules.py
index b7e3318b528..a4d2eae0e94 100644
--- a/tools/automation/cli_linter/rules/command_group_rules.py
+++ b/tools/automation/cli_linter/rules/command_group_rules.py
@@ -8,6 +8,13 @@
@command_group_rule
-def missing_group_help_rule(linter, command_group_name):
- if not linter.get_command_group_help(command_group_name):
+def missing_group_help(linter, command_group_name):
+ if not linter.get_command_group_help(command_group_name) and not linter.command_group_expired(command_group_name) \
+ and command_group_name != '':
raise RuleError('Missing help')
+
+
+@command_group_rule
+def expired_command_group(linter, command_group_name):
+ if linter.command_group_expired(command_group_name):
+ raise RuleError("Deprecated command group is expired and should be removed.".format(command_group_name))
diff --git a/tools/automation/cli_linter/rules/command_rules.py b/tools/automation/cli_linter/rules/command_rules.py
index 96ff1cf8ecf..6d0cf542925 100644
--- a/tools/automation/cli_linter/rules/command_rules.py
+++ b/tools/automation/cli_linter/rules/command_rules.py
@@ -8,12 +8,17 @@
@command_rule
-def missing_command_help_rule(linter, command_name):
- if not linter.get_command_help(command_name):
+def missing_command_help(linter, command_name):
+ if not linter.get_command_help(command_name) and not linter.command_expired(command_name):
raise RuleError('Missing help')
@command_rule
-def no_ids_for_list_commands_rule(linter, command_name):
+def no_ids_for_list_commands(linter, command_name):
if command_name.split()[-1] == 'list' and 'ids' in linter.get_command_parameters(command_name):
raise RuleError('List commands should not expose --ids argument')
+
+@command_rule
+def expired_command(linter, command_name):
+ if linter.command_expired(command_name):
+ raise RuleError("Deprecated command is expired and should be removed.".format(command_name))
diff --git a/tools/automation/cli_linter/rules/parameter_rules.py b/tools/automation/cli_linter/rules/parameter_rules.py
index 1a343b1f51f..7103685d302 100644
--- a/tools/automation/cli_linter/rules/parameter_rules.py
+++ b/tools/automation/cli_linter/rules/parameter_rules.py
@@ -8,12 +8,26 @@
@parameter_rule
-def missing_parameter_help_rule(linter, command_name, parameter_name):
- if not linter.get_parameter_help(command_name, parameter_name):
+def missing_parameter_help(linter, command_name, parameter_name):
+ if not linter.get_parameter_help(command_name, parameter_name) and not linter.command_expired(command_name):
raise RuleError('Missing help')
+
+@parameter_rule
+def expired_parameter(linter, command_name, parameter_name):
+ if linter.parameter_expired(command_name, parameter_name):
+ raise RuleError('Deprecated parameter is expired and should be removed.')
+
+
+@parameter_rule
+def expired_option(linter, command_name, parameter_name):
+ expired_options = linter.option_expired(command_name, parameter_name)
+ if expired_options:
+ raise RuleError("Deprecated options '{}' are expired and should be removed.".format(', '.join(expired_options)))
+
+
@parameter_rule
-def bad_short_option_rule(linter, command_name, parameter_name):
+def bad_short_option(linter, command_name, parameter_name):
bad_options = []
for option in linter.get_parameter_options(command_name, parameter_name):
if not option.startswith('--') and len(option) != 2:
diff --git a/tools/automation/cli_linter/tests/test_linter.py b/tools/automation/cli_linter/tests/test_linter.py
index 5bf31f07b12..488f712e7b5 100644
--- a/tools/automation/cli_linter/tests/test_linter.py
+++ b/tools/automation/cli_linter/tests/test_linter.py
@@ -60,7 +60,7 @@ def test_module_extension_inclusion(self):
expected_cmd_table_size = 0
def check_cmd_table(manager, **_):
- command_table = manager._command_table
+ command_table = manager._command_loader.command_table
self.assertEqual(len(command_table), expected_cmd_table_size)
for command_name in expected_cmds:
self.assertIn(command_name, command_table)
diff --git a/tools/automation/cli_linter/util.py b/tools/automation/cli_linter/util.py
index 055eee5a611..8e4561de418 100644
--- a/tools/automation/cli_linter/util.py
+++ b/tools/automation/cli_linter/util.py
@@ -12,16 +12,16 @@
_LOADER_CLS_RE = re.compile('.*azure/cli/command_modules/(?P[^/]*)/__init__.*')
-def exclude_commands(command_table, help_file_entries, module_exclusions=None, extensions=None):
- return _filter_mods(command_table, help_file_entries, modules=module_exclusions, extensions=extensions,
+def exclude_commands(command_loader, help_file_entries, module_exclusions=None, extensions=None):
+ return _filter_mods(command_loader, help_file_entries, modules=module_exclusions, extensions=extensions,
exclude=True)
-def include_commands(command_table, help_file_entries, module_inclusions=None, extensions=None):
- return _filter_mods(command_table, help_file_entries, modules=module_inclusions, extensions=extensions)
+def include_commands(command_loader, help_file_entries, module_inclusions=None, extensions=None):
+ return _filter_mods(command_loader, help_file_entries, modules=module_inclusions, extensions=extensions)
-def _filter_mods(command_table, help_file_entries, modules=None, extensions=None, exclude=False):
+def _filter_mods(command_loader, help_file_entries, modules=None, extensions=None, exclude=False):
from ..utilities.path import get_command_modules_paths
modules = modules or []
extensions = extensions or []
@@ -29,12 +29,11 @@ def _filter_mods(command_table, help_file_entries, modules=None, extensions=None
command_modules_paths = get_command_modules_paths()
filtered_module_names = {mod for mod, path in command_modules_paths if mod in modules}
- command_table = command_table.copy()
help_file_entries = help_file_entries.copy()
- for command_name in list(command_table.keys()):
+ for command_name in list(command_loader.command_table.keys()):
try:
- source_name, is_extension = _get_command_source(command_name, command_table)
+ source_name, is_extension = _get_command_source(command_name, command_loader.command_table)
except LinterError as ex:
print(ex)
# command is unrecognized
@@ -43,26 +42,23 @@ def _filter_mods(command_table, help_file_entries, modules=None, extensions=None
is_specified = source_name in extensions if is_extension else source_name in filtered_module_names
if is_specified == exclude:
# brute force method of ignoring commands from a module or extension
- del command_table[command_name]
+ command_loader.command_table.pop(command_name, None)
help_file_entries.pop(command_name, None)
- for group_name in get_command_groups(command_name):
- help_file_entries.pop(group_name, None)
- return command_table, help_file_entries
+ # Remove unneeded command groups
+ retained_command_groups = set([' '.join(x.split(' ')[:-1]) for x in command_loader.command_table])
+ excluded_command_groups = set(command_loader.command_group_table.keys()) - retained_command_groups
+ for group_name in excluded_command_groups:
+ command_loader.command_group_table.pop(group_name, None)
+ help_file_entries.pop(group_name, None)
+
+ return command_loader, help_file_entries
def share_element(first_iter, second_iter):
return any(element in first_iter for element in second_iter)
-def get_command_groups(command_name):
- command_args = []
- for arg in command_name.split()[:-1]:
- command_args.append(arg)
- if command_args:
- yield ' '.join(command_args)
-
-
def _get_command_source(command_name, command_table):
from azure.cli.core.commands import ExtensionCommandSource
command = command_table.get(command_name)