Skip to content
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

[ReleasePR storagesync] Microsoft.StorageSync. Merging from dev branch to master. Add New ApiVersion 2020-03-01 #1759

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
16 changes: 8 additions & 8 deletions src/storagesync/HISTORY.rst
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.
207 changes: 5 additions & 202 deletions src/storagesync/README.md
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'
78 changes: 46 additions & 32 deletions src/storagesync/azext_storagesync/__init__.py
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
38 changes: 0 additions & 38 deletions src/storagesync/azext_storagesync/_client_factory.py

This file was deleted.

Loading