forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 15001 in Azure/azure-rest-api-specs
Merge e8f1edfd9b18970a5cd22a9d77dcb3fec8782205 into 3cf8aa9
- Loading branch information
SDKAuto
committed
Jun 28, 2021
1 parent
ab3d44a
commit 0b99eb8
Showing
60 changed files
with
11,761 additions
and
5,543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.1 | ||
+++++ | ||
* Add examples for creating a BlobFolder dataset | ||
|
||
|
||
0.1.0 | ||
++++++ | ||
* Initial release. | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 | ||
++++++ | ||
* Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,50 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
# pylint: disable=unused-argument | ||
# pylint: disable=unused-import | ||
|
||
from azure.cli.core import AzCommandsLoader | ||
from azext_datashare._help import helps | ||
|
||
|
||
class DataShareManagementClientCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
from azext_datashare.generated._client_factory import cf_datashare | ||
datashare_custom = CliCommandType( | ||
operations_tmpl='azext_datashare.manual.custom#{}', # modified | ||
client_factory=cf_datashare) | ||
super(DataShareManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx, | ||
custom_command_type=datashare_custom) | ||
|
||
def load_command_table(self, args): | ||
try: | ||
from azext_datashare.generated.commands import load_command_table | ||
load_command_table(self, args) | ||
except ImportError: | ||
pass | ||
try: | ||
from azext_datashare.manual.commands import load_command_table as load_command_table_manual | ||
load_command_table_manual(self, args) | ||
except ImportError: | ||
pass | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
try: | ||
from azext_datashare.generated._params import load_arguments | ||
load_arguments(self, command) | ||
except ImportError: | ||
pass | ||
try: | ||
from azext_datashare.manual._params import load_arguments as load_arguments_manual | ||
load_arguments_manual(self, command) | ||
except ImportError: | ||
pass | ||
|
||
|
||
COMMAND_LOADER_CLS = DataShareManagementClientCommandsLoader | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# 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. | ||
# -------------------------------------------------------------------------- | ||
|
||
from azure.cli.core import AzCommandsLoader | ||
from azext_datashare.generated._help import helps # pylint: disable=unused-import | ||
try: | ||
from azext_datashare.manual._help import helps # pylint: disable=reimported | ||
except ImportError: | ||
pass | ||
|
||
|
||
class DataShareManagementClientCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
from azext_datashare.generated._client_factory import cf_datashare_cl | ||
datashare_custom = CliCommandType( | ||
operations_tmpl='azext_datashare.custom#{}', | ||
client_factory=cf_datashare_cl) | ||
parent = super(DataShareManagementClientCommandsLoader, self) | ||
parent.__init__(cli_ctx=cli_ctx, custom_command_type=datashare_custom) | ||
|
||
def load_command_table(self, args): | ||
from azext_datashare.generated.commands import load_command_table | ||
load_command_table(self, args) | ||
try: | ||
from azext_datashare.manual.commands import load_command_table as load_command_table_manual | ||
load_command_table_manual(self, args) | ||
except ImportError: | ||
pass | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
from azext_datashare.generated._params import load_arguments | ||
load_arguments(self, command) | ||
try: | ||
from azext_datashare.manual._params import load_arguments as load_arguments_manual | ||
load_arguments_manual(self, command) | ||
except ImportError: | ||
pass | ||
|
||
|
||
COMMAND_LOADER_CLS = DataShareManagementClientCommandsLoader |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
# pylint: disable=wildcard-import | ||
# pylint: disable=unused-wildcard-import | ||
|
||
try: | ||
from .generated.action import * # noqa: F403 | ||
except ImportError: | ||
pass | ||
|
||
try: | ||
from .manual.action import * # noqa: F403 | ||
except ImportError: | ||
pass | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# 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=wildcard-import | ||
# pylint: disable=unused-wildcard-import | ||
|
||
from .generated.action import * # noqa: F403 | ||
try: | ||
from .manual.action import * # noqa: F403 | ||
except ImportError: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"azext.isExperimental": true, | ||
"azext.minCliCoreVersion": "2.3.1" | ||
{ | ||
"azext.isExperimental": true, | ||
"azext.minCliCoreVersion": "2.15.0" | ||
} |
19 changes: 10 additions & 9 deletions
19
src/datashare/azext_datashare/_help.py → src/datashare/azext_datashare/custom.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# -------------------------------------------------------------------------- | ||
# 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=wildcard-import | ||
# pylint: disable=unused-wildcard-import | ||
|
||
# try: | ||
# from .generated._help import * # noqa: F403 | ||
# except ImportError: | ||
# pass | ||
|
||
from .generated.custom import * # noqa: F403 | ||
try: | ||
from .manual._help import * # noqa: F403 | ||
from .manual.custom import * # noqa: F403 | ||
except ImportError: | ||
pass |
114 changes: 60 additions & 54 deletions
114
src/datashare/azext_datashare/generated/_client_factory.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,60 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
|
||
def cf_datashare(cli_ctx, *_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from ..vendored_sdks.datashare import DataShareManagementClient | ||
return get_mgmt_service_client(cli_ctx, DataShareManagementClient) | ||
|
||
|
||
def cf_account(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).account | ||
|
||
|
||
def cf_consumer_invitation(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).consumer_invitation | ||
|
||
|
||
def cf_data_set(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).data_set | ||
|
||
|
||
def cf_data_set_mapping(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).data_set_mapping | ||
|
||
|
||
def cf_invitation(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).invitation | ||
|
||
|
||
def cf_share(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).share | ||
|
||
|
||
def cf_provider_share_subscription(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).provider_share_subscription | ||
|
||
|
||
def cf_share_subscription(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).share_subscription | ||
|
||
|
||
def cf_consumer_source_data_set(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).consumer_source_data_set | ||
|
||
|
||
def cf_synchronization_setting(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).synchronization_setting | ||
|
||
|
||
def cf_trigger(cli_ctx, *_): | ||
return cf_datashare(cli_ctx).trigger | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# 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. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
||
def cf_datashare_cl(cli_ctx, *_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from azext_datashare.vendored_sdks.datashare import DataShareManagementClient | ||
return get_mgmt_service_client(cli_ctx, | ||
DataShareManagementClient) | ||
|
||
|
||
def cf_account(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).accounts | ||
|
||
|
||
def cf_consumer_invitation(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).consumer_invitations | ||
|
||
|
||
def cf_data_set(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).data_sets | ||
|
||
|
||
def cf_data_set_mapping(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).data_set_mappings | ||
|
||
|
||
def cf_invitation(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).invitations | ||
|
||
|
||
def cf_share(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).shares | ||
|
||
|
||
def cf_provider_share_subscription(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).provider_share_subscriptions | ||
|
||
|
||
def cf_share_subscription(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).share_subscriptions | ||
|
||
|
||
def cf_consumer_source_data_set(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).consumer_source_data_sets | ||
|
||
|
||
def cf_synchronization_setting(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).synchronization_settings | ||
|
||
|
||
def cf_trigger(cli_ctx, *_): | ||
return cf_datashare_cl(cli_ctx).triggers |
Oops, something went wrong.