forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
SDK Automation
committed
May 27, 2020
1 parent
e456291
commit 7397487
Showing
72 changed files
with
15,103 additions
and
6,151 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 | ||
++++++ | ||
* Initial release. | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 | ||
++++++ | ||
* Initial release. |
This file contains 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 |
---|---|---|
@@ -1,202 +1,5 @@ | ||
========================================== | ||
# Azure CLI Storage Sync Extension # | ||
This is a extension for StorageSync features. | ||
|
||
### How to use ### | ||
Install this extension using the below CLI command | ||
``` | ||
az extension add --name storagesync | ||
``` | ||
|
||
### Included Features | ||
#### Manage storage sync service: | ||
|
||
##### Create a new storage sync service. | ||
|
||
``` | ||
az storagesync create \ | ||
--resource-group rg \ | ||
--name storage_sync_service_name \ | ||
--location westus \ | ||
--tags key1=value1 | ||
``` | ||
|
||
##### Delete a given storage sync service. | ||
``` | ||
az storagesync delete \ | ||
--resource-group rg \ | ||
--name storage_sync_service_name | ||
``` | ||
|
||
##### Show the properties for a given storage sync service. | ||
``` | ||
az storagesync show \ | ||
--resource-group rg \ | ||
--name storage_sync_service_name | ||
``` | ||
|
||
##### List all storage sync services in a resource group or a subscription. | ||
``` | ||
az storagesync list | ||
``` | ||
``` | ||
az storagesync list \ | ||
--resource-group rg | ||
``` | ||
|
||
#### Manage sync group: | ||
|
||
##### Create a new sync group. | ||
``` | ||
az storagesync sync-group create \ | ||
--resource-group rg \ | ||
--name sync_group_name \ | ||
--storage-sync-service storage-sync-service-name | ||
``` | ||
|
||
##### Delete a given sync group. | ||
``` | ||
az storagesync sync-group delete \ | ||
--resource-group rg \ | ||
--name sync_group_name \ | ||
--storage-sync-service storage-sync-service-name | ||
``` | ||
|
||
##### Show the properties for a given sync group. | ||
``` | ||
az storagesync sync-group show \ | ||
--resource-group rg \ | ||
--name sync_group_name \ | ||
--storage-sync-service storage-sync-service-name | ||
``` | ||
|
||
##### List all sync groups in a storage sync service. | ||
``` | ||
az storagesync sync-group list \ | ||
--resource-group rg \ | ||
--storage-sync-service storage-sync-service-name | ||
``` | ||
|
||
#### Manage cloud endpoint. | ||
|
||
##### Create a new cloud endpoint. | ||
``` | ||
az storagesync sync-group cloud-endpoint create \ | ||
--resource-group rg \ | ||
--name cloud-endpoint-name \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name \ | ||
--storage-account storageaccountnameorid \ | ||
--azure-file-share-name file-share-name | ||
``` | ||
|
||
##### Delete a given cloud endpoint. | ||
``` | ||
az storagesync sync-group cloud-endpoint delete \ | ||
--resource-group rg \ | ||
--name cloud-endpoint-name \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name | ||
``` | ||
|
||
##### Show the properties for a given cloud endpoint. | ||
``` | ||
az storagesync sync-group cloud-endpoint show \ | ||
--resource-group rg \ | ||
--name cloud-endpoint-name \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name | ||
``` | ||
|
||
##### List all cloud endpoints in a sync group. | ||
``` | ||
az storagesync sync-group cloud-endpoint list \ | ||
--resource-group rg \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name | ||
``` | ||
|
||
#### Manage cloud endpoint. | ||
|
||
##### Create a new server endpoint. | ||
``` | ||
az storagesync sync-group server-endpoint create \ | ||
--resource-group rg \ | ||
--name server-endpoint-name \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name \ | ||
--server-id server-id \ | ||
--server-local-path "d:\\abc" | ||
``` | ||
|
||
##### Update the properties for a given server endpoint. | ||
``` | ||
az storagesync sync-group server-endpoint create \ | ||
--resource-group rg \ | ||
--name server-endpoint-name \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name \ | ||
--server-id server-id \ | ||
--server-local-path "d:\\abc" | ||
``` | ||
|
||
##### Delete a given server endpoint. | ||
``` | ||
az storagesync sync-group server-endpoint delete \ | ||
--resource-group rg \ | ||
--name server-endpoint-name \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name | ||
``` | ||
|
||
##### Show the properties for a given server endpoint. | ||
``` | ||
az storagesync sync-group server-endpoint show \ | ||
--resource-group rg \ | ||
--name server-endpoint-name \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name | ||
``` | ||
|
||
##### List all server endpoints in a sync group. | ||
``` | ||
az storagesync sync-group server-endpoint list \ | ||
--resource-group rg \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--sync-group-name sync-group-name | ||
``` | ||
|
||
#### Manage registered server. | ||
|
||
##### Register an on-premises server to a storage sync service. | ||
|
||
*This command is not supported in CLI yet. You can use Azure PowerShell command [Register-AzStorageSyncServer](https://docs.microsoft.com/en-us/powershell/module/az.storagesync/register-azstoragesyncserver?view=azps-3.6.1) or [Azure File Sync Agent](https://docs.microsoft.com/en-us/azure/storage/files/storage-sync-files-deployment-guide?tabs=azure-portal#register-windows-server-with-storage-sync-service) instead.* | ||
|
||
##### Unregister an on-premises server from it's storage sync service. | ||
``` | ||
az storagesync registered-server delete \ | ||
--resource-group rg \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--server-id server-id | ||
``` | ||
|
||
##### Show the properties for a given registered server. | ||
``` | ||
az storagesync registered-server show \ | ||
--resource-group rg \ | ||
--storage-sync-service storage-sync-service-name \ | ||
--server-id server-id | ||
``` | ||
|
||
##### List all registered servers for a given storage sync service. | ||
``` | ||
az storagesync registered-server list \ | ||
--resource-group rg \ | ||
--storage-sync-service storage-sync-service-name | ||
``` | ||
|
||
##### Roll the storage sync server certificate used to describe the server identity to the storage sync service. | ||
|
||
*This command is not supported in CLI yet. You can use Azure PowerShell command [Reset-AzStorageSyncServerCertificate](https://docs.microsoft.com/en-us/powershell/module/az.storagesync/reset-azstoragesyncservercertificate?view=azps-3.6.1) instead.* | ||
|
||
If you have issues, please give feedback by opening an issue at https://github.com/Azure/azure-cli-extensions/issues. | ||
Microsoft Azure CLI 'storagesync' Extension | ||
========================================== | ||
|
||
This package is for the 'storagesync' extension. | ||
i.e. 'az storagesync' |
This file contains 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 |
---|---|---|
@@ -1,32 +1,46 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# 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 azext_storagesync._help import helps # pylint: disable=unused-import | ||
|
||
|
||
class MicrosoftStorageSyncCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
from azext_storagesync._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 azext_storagesync.commands import load_command_table | ||
load_command_table(self, args) | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
from azext_storagesync._params import load_arguments | ||
load_arguments(self, command) | ||
|
||
|
||
COMMAND_LOADER_CLS = MicrosoftStorageSyncCommandsLoader | ||
# -------------------------------------------------------------------------- | ||
# 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_storagesync.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 azext_storagesync.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 azext_storagesync.generated.commands import load_command_table | ||
load_command_table(self, args) | ||
try: | ||
from azext_storagesync.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_storagesync.generated._params import load_arguments | ||
load_arguments(self, command) | ||
try: | ||
from azext_storagesync.manual._params import load_arguments as load_arguments_manual | ||
load_arguments_manual(self, command) | ||
except ImportError: | ||
pass | ||
|
||
|
||
COMMAND_LOADER_CLS = MicrosoftStorageSyncCommandsLoader |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.