-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[Breadth Coverage] Datashare #1476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
aa33a8c
init codegen for datashare
fengzhou-msft 254f368
add manual code
fengzhou-msft 736f686
modify help
fengzhou-msft 7af1a13
modify datashare account
fengzhou-msft ecd3036
modify params
fengzhou-msft 86e4bbd
update metadata
fengzhou-msft f9788ef
add init files
fengzhou-msft b891431
add integration tests
fengzhou-msft 23caf12
full tests for provider and consumer
fengzhou-msft 77b93cb
Merge remote-tracking branch 'upstream/master' into datashare
fengzhou-msft 47fd90d
refactor command interface
fengzhou-msft 2fedea2
add README
fengzhou-msft 306793f
add wait command for datashare consumer share-subscription synchroniz…
fengzhou-msft f74f671
Update README.md
fengzhou-msft 217ef67
fix location
fengzhou-msft ab2b208
modify help
fengzhou-msft aa7cd57
remove --identity
fengzhou-msft d1073be
flattern synchronization setting
fengzhou-msft 6b20902
remove some generated file
fengzhou-msft 9fa2a5c
Merge branch 'master' into datashare
fengzhou-msft 6600ebb
removed unused file
fengzhou-msft 251fb01
Merge branch 'datashare' of github.com:fengzhou-msft/azure-cli-extens…
fengzhou-msft d82d28d
update readme
fengzhou-msft 388e336
modify trigger
fengzhou-msft e77229f
update recordings
fengzhou-msft 8ad724e
remove unsed files
fengzhou-msft 3178a95
Merge branch 'datashare' of github.com:fengzhou-msft/azure-cli-extens…
fengzhou-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .. :changelog: | ||
|
|
||
| Release History | ||
| =============== | ||
|
|
||
| 0.1.0 | ||
| ++++++ | ||
| * Initial release. |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| Microsoft Azure CLI 'datashare' Extension | ||
| ========================================== | ||
|
|
||
| This package is for the 'datashare' extension. | ||
| i.e. 'az datashare' |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 ._help import helps | ||
|
|
||
|
|
||
| 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 .commands import load_command_table | ||
| load_command_table(self, args) | ||
| return self.command_table | ||
|
|
||
| def load_arguments(self, command): | ||
| from ._params import load_arguments | ||
| load_arguments(self, command) | ||
|
|
||
|
|
||
| COMMAND_LOADER_CLS = DataShareManagementClientCommandsLoader |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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._help import * # noqa: F403 | ||
| try: | ||
| from .manual._help import * # noqa: F403 | ||
| except ImportError: | ||
| pass | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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._params import * # noqa: F403 | ||
| try: | ||
| from .manual._params import * # noqa: F403 | ||
| except ImportError: | ||
| pass |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "azext.isPreview": true, | ||
|
fengzhou-msft marked this conversation as resolved.
Outdated
|
||
| "azext.minCliCoreVersion": "2.0.67" | ||
| } | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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 |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # 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
54
src/datashare/azext_datashare/generated/_client_factory.py
This file contains hidden or 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 |
|---|---|---|
| @@ -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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.