Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions src/datashare/HISTORY.rst
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.
99 changes: 50 additions & 49 deletions src/datashare/azext_datashare/__init__.py
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
16 changes: 0 additions & 16 deletions src/datashare/azext_datashare/_params.py

This file was deleted.

33 changes: 17 additions & 16 deletions src/datashare/azext_datashare/action.py
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
6 changes: 3 additions & 3 deletions src/datashare/azext_datashare/azext_metadata.json
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"
}
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 src/datashare/azext_datashare/generated/_client_factory.py
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
Loading