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/storagesync/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/storagesync/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Microsoft Azure CLI 'storagesync' Extension
==========================================

This package is for the 'storagesync' extension.
i.e. 'az storagesync'
32 changes: 32 additions & 0 deletions src/storagesync/azext_storagesync/__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 MicrosoftStorageSyncCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from .generated._client_factory import cf_storagesync
storagesync_custom = CliCommandType(
operations_tmpl='azext_storagesync.custom#{}',
client_factory=cf_storagesync)
super(MicrosoftStorageSyncCommandsLoader, self).__init__(cli_ctx=cli_ctx,
custom_command_type=storagesync_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 = MicrosoftStorageSyncCommandsLoader
13 changes: 13 additions & 0 deletions src/storagesync/azext_storagesync/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/storagesync/azext_storagesync/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/storagesync/azext_storagesync/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/storagesync/azext_storagesync/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
38 changes: 38 additions & 0 deletions src/storagesync/azext_storagesync/generated/_client_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------


def cf_storagesync(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.storagesync import MicrosoftStorageSync
return get_mgmt_service_client(cli_ctx, MicrosoftStorageSync)


def cf_storage_sync_service(cli_ctx, *_):
return cf_storagesync(cli_ctx).storage_sync_service


def cf_sync_group(cli_ctx, *_):
return cf_storagesync(cli_ctx).sync_group


def cf_cloud_endpoint(cli_ctx, *_):
return cf_storagesync(cli_ctx).cloud_endpoint


def cf_server_endpoint(cli_ctx, *_):
return cf_storagesync(cli_ctx).server_endpoint


def cf_registered_server(cli_ctx, *_):
return cf_storagesync(cli_ctx).registered_server


def cf_workflow(cli_ctx, *_):
return cf_storagesync(cli_ctx).workflow


def cf_operation_status(cli_ctx, *_):
return cf_storagesync(cli_ctx).operation_status
Loading