Skip to content

Commit

Permalink
CodeGen from PR 12490 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 66d57c27b40cc5badd730aee064f8777d11c1fa3 into 8c8ae02
  • Loading branch information
SDKAuto committed Jan 25, 2021
1 parent d0751c6 commit b139b30
Show file tree
Hide file tree
Showing 44 changed files with 5,705 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/storageimportexport/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. :changelog:
Release History
===============

0.1.0
++++++
* Initial release.
52 changes: 52 additions & 0 deletions src/storageimportexport/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Azure CLI storageimportexport Extension #
This is the extension for storageimportexport

### How to use ###
Install this extension using the below CLI command
```
az extension add --name storageimportexport
```

### Included Features ###
#### storageimportexport location ####
##### List #####
```
az storageimportexport location list
```
##### Show #####
```
az storageimportexport location show --name "West US"
```
#### storageimportexport job ####
##### Create #####
```
az storageimportexport job create --location "West US" --backup-drive-manifest true \
--diagnostics-path "waimportexport" \
--drive-list bit-locker-key="238810-662376-448998-450120-652806-203390-606320-483076" drive-header-hash="" drive-id="9CA995BB" manifest-file="\\\\DriveManifest.xml" manifest-hash="109B21108597EF36D5785F08303F3638" \
--job-type "Import" --log-level "Verbose" \
--return-address city="Redmond" country-or-region="USA" email="Test@contoso.com" phone="4250000000" postal-code="98007" recipient-name="Tets" state-or-province="wa" street-address1="Street1" street-address2="street2" \
--storage-account-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test" \
--name "myJob" --resource-group "myResourceGroup"
```
##### Show #####
```
az storageimportexport job show --name "myJob" --resource-group "myResourceGroup"
```
##### List #####
```
az storageimportexport job list --resource-group "myResourceGroup"
```
##### Update #####
```
az storageimportexport job update --backup-drive-manifest true --log-level "Verbose" --state "" --name "myJob" \
--resource-group "myResourceGroup"
```
##### Delete #####
```
az storageimportexport job delete --name "myJob" --resource-group "myResourceGroup"
```
#### storageimportexport bit-locker-key ####
##### List #####
```
az storageimportexport bit-locker-key list --job-name "myJob" --resource-group "myResourceGroup"
```
50 changes: 50 additions & 0 deletions src/storageimportexport/azext_storageimportexport/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# --------------------------------------------------------------------------
# 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_storageimportexport.generated._help import helps # pylint: disable=unused-import
try:
from azext_storageimportexport.manual._help import helps # pylint: disable=reimported
except ImportError:
pass


class StorageImportExportCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
from azure.cli.core.commands import CliCommandType
from azext_storageimportexport.generated._client_factory import cf_storageimportexport_cl
storageimportexport_custom = CliCommandType(
operations_tmpl='azext_storageimportexport.custom#{}',
client_factory=cf_storageimportexport_cl)
parent = super(StorageImportExportCommandsLoader, self)
parent.__init__(cli_ctx=cli_ctx, custom_command_type=storageimportexport_custom)

def load_command_table(self, args):
from azext_storageimportexport.generated.commands import load_command_table
load_command_table(self, args)
try:
from azext_storageimportexport.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_storageimportexport.generated._params import load_arguments
load_arguments(self, command)
try:
from azext_storageimportexport.manual._params import load_arguments as load_arguments_manual
load_arguments_manual(self, command)
except ImportError:
pass


COMMAND_LOADER_CLS = StorageImportExportCommandsLoader
17 changes: 17 additions & 0 deletions src/storageimportexport/azext_storageimportexport/action.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"azext.isExperimental": true,
"azext.minCliCoreVersion": "2.15.0"
}
17 changes: 17 additions & 0 deletions src/storageimportexport/azext_storageimportexport/custom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------
# 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------

__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# --------------------------------------------------------------------------
# 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.
# --------------------------------------------------------------------------


def cf_storageimportexport_cl(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azext_storageimportexport.vendored_sdks.storageimportexport import StorageImportExport
return get_mgmt_service_client(cli_ctx,
StorageImportExport)


def cf_location(cli_ctx, *_):
return cf_storageimportexport_cl(cli_ctx).locations


def cf_job(cli_ctx, *_):
return cf_storageimportexport_cl(cli_ctx).jobs


def cf_bit_locker_key(cli_ctx, *_):
return cf_storageimportexport_cl(cli_ctx).bit_locker_keys
Loading

0 comments on commit b139b30

Please sign in to comment.