|
1 | | -# -------------------------------------------------------------------------- |
| 1 | +# -------------------------------------------------------------------------------------------- |
2 | 2 | # Copyright (c) Microsoft Corporation. All rights reserved. |
3 | | -# Licensed under the MIT License. See License.txt in the project root for |
4 | | -# license information. |
| 3 | +# Licensed under the MIT License. See License.txt in the project root for license information. |
5 | 4 | # |
6 | | -# Code generated by Microsoft (R) AutoRest Code Generator. |
7 | | -# Changes may cause incorrect behavior and will be lost if the code is |
8 | | -# regenerated. |
9 | | -# -------------------------------------------------------------------------- |
| 5 | +# Code generated by aaz-dev-tools |
| 6 | +# -------------------------------------------------------------------------------------------- |
10 | 7 |
|
11 | 8 | from azure.cli.core import AzCommandsLoader |
12 | | -from azext_datadog.generated._help import helps # pylint: disable=unused-import |
13 | | -try: |
14 | | - from azext_datadog.manual._help import helps # pylint: disable=reimported |
15 | | -except ImportError: |
16 | | - pass |
| 9 | +from azext_datadog._help import helps # pylint: disable=unused-import |
17 | 10 |
|
18 | 11 |
|
19 | | -class MicrosoftDatadogClientCommandsLoader(AzCommandsLoader): |
| 12 | +class DatadogCommandsLoader(AzCommandsLoader): |
20 | 13 |
|
21 | 14 | def __init__(self, cli_ctx=None): |
22 | 15 | from azure.cli.core.commands import CliCommandType |
23 | | - from azext_datadog.generated._client_factory import cf_datadog_cl |
24 | | - datadog_custom = CliCommandType( |
25 | | - operations_tmpl='azext_datadog.custom#{}', |
26 | | - client_factory=cf_datadog_cl) |
27 | | - parent = super(MicrosoftDatadogClientCommandsLoader, self) |
28 | | - parent.__init__(cli_ctx=cli_ctx, custom_command_type=datadog_custom) |
| 16 | + custom_command_type = CliCommandType( |
| 17 | + operations_tmpl='azext_datadog.custom#{}') |
| 18 | + super().__init__(cli_ctx=cli_ctx, |
| 19 | + custom_command_type=custom_command_type) |
29 | 20 |
|
30 | 21 | def load_command_table(self, args): |
31 | | - from azext_datadog.generated.commands import load_command_table |
32 | | - load_command_table(self, args) |
| 22 | + from azext_datadog.commands import load_command_table |
| 23 | + from azure.cli.core.aaz import load_aaz_command_table |
33 | 24 | try: |
34 | | - from azext_datadog.manual.commands import load_command_table as load_command_table_manual |
35 | | - load_command_table_manual(self, args) |
| 25 | + from . import aaz |
36 | 26 | except ImportError: |
37 | | - pass |
| 27 | + aaz = None |
| 28 | + if aaz: |
| 29 | + load_aaz_command_table( |
| 30 | + loader=self, |
| 31 | + aaz_pkg_name=aaz.__name__, |
| 32 | + args=args |
| 33 | + ) |
| 34 | + load_command_table(self, args) |
38 | 35 | return self.command_table |
39 | 36 |
|
40 | 37 | def load_arguments(self, command): |
41 | | - from azext_datadog.generated._params import load_arguments |
| 38 | + from azext_datadog._params import load_arguments |
42 | 39 | load_arguments(self, command) |
43 | | - try: |
44 | | - from azext_datadog.manual._params import load_arguments as load_arguments_manual |
45 | | - load_arguments_manual(self, command) |
46 | | - except ImportError: |
47 | | - pass |
48 | 40 |
|
49 | 41 |
|
50 | | -COMMAND_LOADER_CLS = MicrosoftDatadogClientCommandsLoader |
| 42 | +COMMAND_LOADER_CLS = DatadogCommandsLoader |
0 commit comments