Skip to content
This repository was archived by the owner on Aug 28, 2025. It is now read-only.
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
8 changes: 8 additions & 0 deletions src/datashare/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:

Release History
===============

0.1.0
++++++
* Initial release.
5 changes: 5 additions & 0 deletions src/datashare/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Microsoft Azure CLI 'datashare' Extension
==========================================

This package is for the 'datashare' extension.
i.e. 'az datashare'
32 changes: 32 additions & 0 deletions src/datashare/azext_datashare/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from azure.cli.core import AzCommandsLoader

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


class DataShareManagementClientCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from .generated._client_factory import cf_datashare
datashare_custom = CliCommandType(
operations_tmpl='azext_datashare.custom#{}',
client_factory=cf_datashare)
super(DataShareManagementClientCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=datashare_custom)

def load_command_table(self, args):
from .generated.commands import load_command_table
load_command_table(self, args)
return self.command_table

def load_arguments(self, command):
from .generated._params import load_arguments
load_arguments(self, command)


COMMAND_LOADER_CLS = DataShareManagementClientCommandsLoader
13 changes: 13 additions & 0 deletions src/datashare/azext_datashare/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# 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

from .generated.action import * # noqa: F403
try:
from .manual.action import * # noqa: F403
except ImportError:
pass
4 changes: 4 additions & 0 deletions src/datashare/azext_datashare/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.0.67"
}
13 changes: 13 additions & 0 deletions src/datashare/azext_datashare/commands.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# 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

from .generated.commands import * # noqa: F403
try:
from .manual.commands import * # noqa: F403
except ImportError:
pass
13 changes: 13 additions & 0 deletions src/datashare/azext_datashare/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# --------------------------------------------------------------------------------------------
# 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

from .generated.custom import * # noqa: F403
try:
from .manual.custom import * # noqa: F403
except ImportError:
pass
54 changes: 54 additions & 0 deletions src/datashare/azext_datashare/generated/_client_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# --------------------------------------------------------------------------------------------
# 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
Loading