Fix issue with profile display (#6849)

* Fix issue with profile display

* Fix issue with profile display
This commit is contained in:
Travis Prescott 2018-07-20 09:03:16 -07:00 коммит произвёл GitHub
Родитель 2739980713
Коммит 6990ace773
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
18 изменённых файлов: 78 добавлений и 13 удалений

Просмотреть файл

@ -467,6 +467,17 @@
<Compile Include="command_modules\azure-cli-lab\azure\cli\command_modules\lab\__init__.py" />
<Compile Include="command_modules\azure-cli-lab\azure_bdist_wheel.py" />
<Compile Include="command_modules\azure-cli-lab\setup.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\commands.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\custom.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\tests\latest\test_maps_commands.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\tests\latest\__init__.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\tests\__init__.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\_client_factory.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\_help.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\_params.py" />
<Compile Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\__init__.py" />
<Compile Include="command_modules\azure-cli-maps\setup.py" />
<Compile Include="command_modules\azure-cli-maps\__init__.py" />
<Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\commands.py" />
<Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\actions.py" />
<Compile Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\operations\action_groups.py" />
@ -516,6 +527,18 @@
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\_template_builder.py" />
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\_util.py" />
<Compile Include="command_modules\azure-cli-network\azure\cli\command_modules\network\_validators.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\commands.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\custom.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\tests\latest\test_policyinsights_scenario.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\tests\latest\__init__.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\tests\__init__.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\_client_factory.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\_exception_handler.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\_help.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\_params.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\_validators.py" />
<Compile Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\__init__.py" />
<Compile Include="command_modules\azure-cli-policyinsights\setup.py" />
<Compile Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\tests\latest\test_profile_custom.py" />
<Compile Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\_completers.py" />
<Compile Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\_format.py" />
@ -943,6 +966,13 @@
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\" />
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\" />
<Folder Include="command_modules\azure-cli-ams\azure\cli\command_modules\ams\tests\" />
<Folder Include="command_modules\azure-cli-maps\" />
<Folder Include="command_modules\azure-cli-maps\azure\" />
<Folder Include="command_modules\azure-cli-maps\azure\cli\" />
<Folder Include="command_modules\azure-cli-maps\azure\cli\command_modules\" />
<Folder Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\" />
<Folder Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\tests\" />
<Folder Include="command_modules\azure-cli-maps\azure\cli\command_modules\maps\tests\latest\" />
<Folder Include="command_modules\azure-cli-monitor\" />
<Folder Include="command_modules\azure-cli-monitor\azure\" />
<Folder Include="command_modules\azure-cli-monitor\azure\cli\" />
@ -955,6 +985,13 @@
<Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\latest\" />
<Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\latest\zone_files\" />
<Folder Include="command_modules\azure-cli-network\azure\cli\command_modules\network\zone_file\" />
<Folder Include="command_modules\azure-cli-policyinsights\" />
<Folder Include="command_modules\azure-cli-policyinsights\azure\" />
<Folder Include="command_modules\azure-cli-policyinsights\azure\cli\" />
<Folder Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\" />
<Folder Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\" />
<Folder Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\tests\" />
<Folder Include="command_modules\azure-cli-policyinsights\azure\cli\command_modules\policyinsights\tests\latest\" />
<Folder Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\tests\" />
<Folder Include="command_modules\azure-cli-profile\azure\cli\command_modules\profile\tests\latest\" />
<Folder Include="command_modules\azure-cli-rdbms\" />
@ -1193,6 +1230,7 @@
<Content Include="command_modules\azure-cli-lab\MANIFEST.in" />
<Content Include="command_modules\azure-cli-lab\README.rst" />
<Content Include="command_modules\azure-cli-lab\setup.cfg" />
<Content Include="command_modules\azure-cli-maps\HISTORY.rst" />
<Content Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\operations\autoscale-parameters-template.json" />
<Content Include="command_modules\azure-cli-monitor\azure\cli\command_modules\monitor\_autoscale_util.py">
<SubType>Code</SubType>
@ -1215,6 +1253,7 @@
<Content Include="command_modules\azure-cli-network\azure\cli\command_modules\network\tests\latest\zone_files\zone6.txt" />
<Content Include="command_modules\azure-cli-network\HISTORY.rst" />
<Content Include="command_modules\azure-cli-network\linter_exclusions.yml" />
<Content Include="command_modules\azure-cli-policyinsights\HISTORY.rst" />
<Content Include="command_modules\azure-cli-profile\HISTORY.rst" />
<Content Include="command_modules\azure-cli-rdbms\HISTORY.rst" />
<Content Include="command_modules\azure-cli-rdbms\MANIFEST.in" />

Просмотреть файл

@ -587,6 +587,7 @@ class DeploymentOutputLongRunningOperation(LongRunningOperation):
def _load_command_loader(loader, args, name, prefix):
from azure.cli.core.profiles import PROFILE_TYPE
module = import_module(prefix + name)
loader_cls = getattr(module, 'COMMAND_LOADER_CLS', None)
command_table = {}
@ -594,7 +595,8 @@ def _load_command_loader(loader, args, name, prefix):
if loader_cls:
command_loader = loader_cls(cli_ctx=loader.cli_ctx)
loader.loaders.append(command_loader) # This will be used by interactive
if command_loader.supported_api_version():
if command_loader.supported_api_version(min_api=command_loader.min_profile, max_api=command_loader.max_profile,
resource_type=PROFILE_TYPE):
command_table = command_loader.load_command_table(args)
if command_table:
for cmd in list(command_table.keys()):

Просмотреть файл

@ -14,7 +14,9 @@ class ContainerServiceCommandsLoader(AzCommandsLoader):
def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
acs_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.acs.custom#{}')
super(ContainerServiceCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=acs_custom)
super(ContainerServiceCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=acs_custom,
min_profile='2017-03-10-profile')
def load_command_table(self, args):
from azure.cli.command_modules.acs.commands import load_command_table

Просмотреть файл

@ -3,6 +3,10 @@
Release History
===============
0.2.1
+++++
* Minor fixes.
0.2.0
+++++
* BREAKING CHANGE: 'show' commands log error message and fail with exit code of 3 upon a missing resource.

Просмотреть файл

@ -14,7 +14,8 @@ class AppserviceCommandsLoader(AzCommandsLoader):
from azure.cli.core.commands import CliCommandType
appservice_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.appservice.custom#{}')
super(AppserviceCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=appservice_custom)
custom_command_type=appservice_custom,
min_profile='2017-03-10-profile')
def load_command_table(self, args):
from azure.cli.command_modules.appservice.commands import load_command_table

Просмотреть файл

@ -14,7 +14,7 @@ except ImportError:
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
VERSION = "0.2.0"
VERSION = "0.2.1"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',

Просмотреть файл

@ -3,7 +3,7 @@
Release History
===============
3.4.0
3.3.1
+++++
* Fix bug when show AAD token in cloudshell

Просмотреть файл

@ -19,7 +19,8 @@ class BatchCommandsLoader(AzCommandsLoader):
exception_handler=batch_exception_handler)
super(BatchCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=batch_custom,
command_group_cls=BatchCommandGroup)
command_group_cls=BatchCommandGroup,
min_profile='2017-03-10-profile')
self.module_name = __name__
def load_command_table(self, args):

Просмотреть файл

@ -15,7 +15,7 @@ except ImportError:
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
VERSION = "3.4.0"
VERSION = "3.3.1"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [

Просмотреть файл

@ -3,6 +3,10 @@
Release History
===============
0.3.1
+++++
* Minor fixes.
0.3.0
+++++
* BREAKING CHANGE: 'show' commands log error message and fail with exit code of 3 upon a missing resource.

Просмотреть файл

@ -17,7 +17,8 @@ class MapsCommandsLoader(AzCommandsLoader):
operations_tmpl='azure.cli.command_modules.maps.custom#{}',
client_factory=cf_accounts)
super(MapsCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=custom_type)
custom_command_type=custom_type,
min_profile='2017-03-10-profile')
def load_command_table(self, args):
from azure.cli.command_modules.maps.commands import load_command_table

Просмотреть файл

@ -13,7 +13,7 @@ except ImportError:
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
VERSION = "0.3.0"
VERSION = "0.3.1"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers

Просмотреть файл

@ -3,6 +3,10 @@
Release History
===============
0.3.1
+++++
* Minor fixes.
0.3.0
+++++
* BREAKING CHANGE: 'show' commands log error message and fail with exit code of 3 upon a missing resource.

Просмотреть файл

@ -17,7 +17,9 @@ class ReservationsCommandsLoader(AzCommandsLoader):
reservations_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.reservations.custom#{}',
client_factory=reservation_mgmt_client_factory,
exception_handler=reservations_exception_handler)
super(ReservationsCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=reservations_custom)
super(ReservationsCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=reservations_custom,
min_profile='2017-03-10-profile')
def load_command_table(self, args):
from azure.cli.command_modules.reservations.commands import load_command_table

Просмотреть файл

@ -15,7 +15,7 @@ except ImportError:
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
VERSION = "0.3.0"
VERSION = "0.3.1"
# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
CLASSIFIERS = [

Просмотреть файл

@ -3,6 +3,10 @@
Release History
===============
2.1.1
++++++
* Minor fixes.
2.1.0
+++++
* BREAKING CHANGE: 'show' commands log error message and fail with exit code of 3 upon a missing resource.

Просмотреть файл

@ -14,7 +14,8 @@ class SqlCommandsLoader(AzCommandsLoader):
from azure.cli.core.commands import CliCommandType
sql_custom = CliCommandType(operations_tmpl='azure.cli.command_modules.sql.custom#{}')
super(SqlCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=sql_custom)
custom_command_type=sql_custom,
min_profile='2017-03-10-profile')
def load_command_table(self, args):
from azure.cli.command_modules.sql.commands import load_command_table

Просмотреть файл

@ -12,7 +12,7 @@ except ImportError:
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
VERSION = "2.1.0"
VERSION = "2.1.1"
CLASSIFIERS = [
'Development Status :: 4 - Beta',