Skip to content

Commit 0b99eb8

Browse files
author
SDKAuto
committed
CodeGen from PR 15001 in Azure/azure-rest-api-specs
Merge e8f1edfd9b18970a5cd22a9d77dcb3fec8782205 into 3cf8aa9
1 parent ab3d44a commit 0b99eb8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+11761
-5543
lines changed

src/datashare/HISTORY.rst

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
.. :changelog:
2-
3-
Release History
4-
===============
5-
6-
0.1.1
7-
+++++
8-
* Add examples for creating a BlobFolder dataset
9-
10-
11-
0.1.0
12-
++++++
13-
* Initial release.
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.
Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,50 @@
1-
# --------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
5-
# pylint: disable=unused-argument
6-
# pylint: disable=unused-import
7-
8-
from azure.cli.core import AzCommandsLoader
9-
from azext_datashare._help import helps
10-
11-
12-
class DataShareManagementClientCommandsLoader(AzCommandsLoader):
13-
14-
def __init__(self, cli_ctx=None):
15-
from azure.cli.core.commands import CliCommandType
16-
from azext_datashare.generated._client_factory import cf_datashare
17-
datashare_custom = CliCommandType(
18-
operations_tmpl='azext_datashare.manual.custom#{}', # modified
19-
client_factory=cf_datashare)
20-
super(DataShareManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx,
21-
custom_command_type=datashare_custom)
22-
23-
def load_command_table(self, args):
24-
try:
25-
from azext_datashare.generated.commands import load_command_table
26-
load_command_table(self, args)
27-
except ImportError:
28-
pass
29-
try:
30-
from azext_datashare.manual.commands import load_command_table as load_command_table_manual
31-
load_command_table_manual(self, args)
32-
except ImportError:
33-
pass
34-
return self.command_table
35-
36-
def load_arguments(self, command):
37-
try:
38-
from azext_datashare.generated._params import load_arguments
39-
load_arguments(self, command)
40-
except ImportError:
41-
pass
42-
try:
43-
from azext_datashare.manual._params import load_arguments as load_arguments_manual
44-
load_arguments_manual(self, command)
45-
except ImportError:
46-
pass
47-
48-
49-
COMMAND_LOADER_CLS = DataShareManagementClientCommandsLoader
1+
# --------------------------------------------------------------------------
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.
5+
#
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+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_datashare.generated._help import helps # pylint: disable=unused-import
13+
try:
14+
from azext_datashare.manual._help import helps # pylint: disable=reimported
15+
except ImportError:
16+
pass
17+
18+
19+
class DataShareManagementClientCommandsLoader(AzCommandsLoader):
20+
21+
def __init__(self, cli_ctx=None):
22+
from azure.cli.core.commands import CliCommandType
23+
from azext_datashare.generated._client_factory import cf_datashare_cl
24+
datashare_custom = CliCommandType(
25+
operations_tmpl='azext_datashare.custom#{}',
26+
client_factory=cf_datashare_cl)
27+
parent = super(DataShareManagementClientCommandsLoader, self)
28+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=datashare_custom)
29+
30+
def load_command_table(self, args):
31+
from azext_datashare.generated.commands import load_command_table
32+
load_command_table(self, args)
33+
try:
34+
from azext_datashare.manual.commands import load_command_table as load_command_table_manual
35+
load_command_table_manual(self, args)
36+
except ImportError:
37+
pass
38+
return self.command_table
39+
40+
def load_arguments(self, command):
41+
from azext_datashare.generated._params import load_arguments
42+
load_arguments(self, command)
43+
try:
44+
from azext_datashare.manual._params import load_arguments as load_arguments_manual
45+
load_arguments_manual(self, command)
46+
except ImportError:
47+
pass
48+
49+
50+
COMMAND_LOADER_CLS = DataShareManagementClientCommandsLoader

src/datashare/azext_datashare/_params.py

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
# --------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
5-
# pylint: disable=wildcard-import
6-
# pylint: disable=unused-wildcard-import
7-
8-
try:
9-
from .generated.action import * # noqa: F403
10-
except ImportError:
11-
pass
12-
13-
try:
14-
from .manual.action import * # noqa: F403
15-
except ImportError:
16-
pass
1+
# --------------------------------------------------------------------------
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.
5+
#
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+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
2-
"azext.isExperimental": true,
3-
"azext.minCliCoreVersion": "2.3.1"
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.15.0"
44
}
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
# --------------------------------------------------------------------------------------------
1+
# --------------------------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
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+
# --------------------------------------------------------------------------
510
# pylint: disable=wildcard-import
611
# pylint: disable=unused-wildcard-import
712

8-
# try:
9-
# from .generated._help import * # noqa: F403
10-
# except ImportError:
11-
# pass
12-
13+
from .generated.custom import * # noqa: F403
1314
try:
14-
from .manual._help import * # noqa: F403
15+
from .manual.custom import * # noqa: F403
1516
except ImportError:
1617
pass
Lines changed: 60 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,60 @@
1-
# --------------------------------------------------------------------------------------------
2-
# Copyright (c) Microsoft Corporation. All rights reserved.
3-
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
5-
6-
7-
def cf_datashare(cli_ctx, *_):
8-
from azure.cli.core.commands.client_factory import get_mgmt_service_client
9-
from ..vendored_sdks.datashare import DataShareManagementClient
10-
return get_mgmt_service_client(cli_ctx, DataShareManagementClient)
11-
12-
13-
def cf_account(cli_ctx, *_):
14-
return cf_datashare(cli_ctx).account
15-
16-
17-
def cf_consumer_invitation(cli_ctx, *_):
18-
return cf_datashare(cli_ctx).consumer_invitation
19-
20-
21-
def cf_data_set(cli_ctx, *_):
22-
return cf_datashare(cli_ctx).data_set
23-
24-
25-
def cf_data_set_mapping(cli_ctx, *_):
26-
return cf_datashare(cli_ctx).data_set_mapping
27-
28-
29-
def cf_invitation(cli_ctx, *_):
30-
return cf_datashare(cli_ctx).invitation
31-
32-
33-
def cf_share(cli_ctx, *_):
34-
return cf_datashare(cli_ctx).share
35-
36-
37-
def cf_provider_share_subscription(cli_ctx, *_):
38-
return cf_datashare(cli_ctx).provider_share_subscription
39-
40-
41-
def cf_share_subscription(cli_ctx, *_):
42-
return cf_datashare(cli_ctx).share_subscription
43-
44-
45-
def cf_consumer_source_data_set(cli_ctx, *_):
46-
return cf_datashare(cli_ctx).consumer_source_data_set
47-
48-
49-
def cf_synchronization_setting(cli_ctx, *_):
50-
return cf_datashare(cli_ctx).synchronization_setting
51-
52-
53-
def cf_trigger(cli_ctx, *_):
54-
return cf_datashare(cli_ctx).trigger
1+
# --------------------------------------------------------------------------
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.
5+
#
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+
# --------------------------------------------------------------------------
10+
11+
12+
def cf_datashare_cl(cli_ctx, *_):
13+
from azure.cli.core.commands.client_factory import get_mgmt_service_client
14+
from azext_datashare.vendored_sdks.datashare import DataShareManagementClient
15+
return get_mgmt_service_client(cli_ctx,
16+
DataShareManagementClient)
17+
18+
19+
def cf_account(cli_ctx, *_):
20+
return cf_datashare_cl(cli_ctx).accounts
21+
22+
23+
def cf_consumer_invitation(cli_ctx, *_):
24+
return cf_datashare_cl(cli_ctx).consumer_invitations
25+
26+
27+
def cf_data_set(cli_ctx, *_):
28+
return cf_datashare_cl(cli_ctx).data_sets
29+
30+
31+
def cf_data_set_mapping(cli_ctx, *_):
32+
return cf_datashare_cl(cli_ctx).data_set_mappings
33+
34+
35+
def cf_invitation(cli_ctx, *_):
36+
return cf_datashare_cl(cli_ctx).invitations
37+
38+
39+
def cf_share(cli_ctx, *_):
40+
return cf_datashare_cl(cli_ctx).shares
41+
42+
43+
def cf_provider_share_subscription(cli_ctx, *_):
44+
return cf_datashare_cl(cli_ctx).provider_share_subscriptions
45+
46+
47+
def cf_share_subscription(cli_ctx, *_):
48+
return cf_datashare_cl(cli_ctx).share_subscriptions
49+
50+
51+
def cf_consumer_source_data_set(cli_ctx, *_):
52+
return cf_datashare_cl(cli_ctx).consumer_source_data_sets
53+
54+
55+
def cf_synchronization_setting(cli_ctx, *_):
56+
return cf_datashare_cl(cli_ctx).synchronization_settings
57+
58+
59+
def cf_trigger(cli_ctx, *_):
60+
return cf_datashare_cl(cli_ctx).triggers

0 commit comments

Comments
 (0)