Skip to content

Commit

Permalink
[Stream Analytics] Update Stream Analytics CLI (Azure#4098)
Browse files Browse the repository at this point in the history
- rename command group

- simplify several commands

- add alias for long parameter

- fix invalid url in help message

- fix style and linter check

- update changelog with version

- eliminate possible breaking changes
  • Loading branch information
necusjz authored Nov 30, 2021
1 parent d66c84c commit dcc6da0
Show file tree
Hide file tree
Showing 69 changed files with 18,054 additions and 7,949 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@

/src/alertsmanagement/ @qwordy

/src/stream-analytics/ @houk-ms
/src/stream-analytics/ @houk-ms @necusjz

/src/databricks/ @fengzhou-msft @xfz11

Expand Down
6 changes: 5 additions & 1 deletion src/stream-analytics/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

0.1.1
+++++++++++++++
* Support API version to 2020.

0.1.0
++++++
+++++++++++++++
* Initial release.
49 changes: 35 additions & 14 deletions src/stream-analytics/azext_stream_analytics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,53 @@
# --------------------------------------------------------------------------------------------
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=unused-import

import azext_stream_analytics._help
from azure.cli.core import AzCommandsLoader

from azext_stream_analytics._help import helps # pylint: disable=unused-import


class StreamAnalyticsCommandsLoader(AzCommandsLoader):
class StreamAnalyticsManagementClientCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_stream_analytics._client_factory import cf_stream_analytics
from azext_stream_analytics.generated._client_factory import cf_stream_analytics_cl
stream_analytics_custom = CliCommandType(
operations_tmpl='azext_stream_analytics.custom#{}',
client_factory=cf_stream_analytics)
super(StreamAnalyticsCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=stream_analytics_custom)
client_factory=cf_stream_analytics_cl)
parent = super()
parent.__init__(cli_ctx=cli_ctx, custom_command_type=stream_analytics_custom)

def load_command_table(self, args):
from azext_stream_analytics.commands import load_command_table
from azext_stream_analytics.generated.commands import load_command_table
load_command_table(self, args)
try:
from azext_stream_analytics.manual.commands import load_command_table as load_command_table_manual
load_command_table_manual(self, args)
except ImportError as e:
if e.name.endswith('manual.commands'):
pass
else:
raise e
return self.command_table

def load_arguments(self, command):
from azext_stream_analytics._params import load_arguments
from azext_stream_analytics.generated._params import load_arguments
load_arguments(self, command)
try:
from azext_stream_analytics.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError as e:
if e.name.endswith('manual._params'):
pass
else:
raise e


COMMAND_LOADER_CLS = StreamAnalyticsCommandsLoader
COMMAND_LOADER_CLS = StreamAnalyticsManagementClientCommandsLoader
34 changes: 0 additions & 34 deletions src/stream-analytics/azext_stream_analytics/_client_factory.py

This file was deleted.

Loading

0 comments on commit dcc6da0

Please sign in to comment.