Skip to content

Commit 122d811

Browse files
author
SDKAuto
committed
CodeGen from PR 15540 in Azure/azure-rest-api-specs
Merge 3c943fe10854a1fe6f67a91b7f51913274b05893 into 57e30b5
1 parent 927c622 commit 122d811

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+6227
-0
lines changed

src/storageimportexport/HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.

src/storageimportexport/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Azure CLI storageimportexport Extension #
2+
This is the extension for storageimportexport
3+
4+
### How to use ###
5+
Install this extension using the below CLI command
6+
```
7+
az extension add --name storageimportexport
8+
```
9+
10+
### Included Features ###
11+
#### storageimportexport location ####
12+
##### List #####
13+
```
14+
az storageimportexport location list
15+
```
16+
##### Show #####
17+
```
18+
az storageimportexport location show --name "West US"
19+
```
20+
#### storageimportexport job ####
21+
##### Create #####
22+
```
23+
az storageimportexport job create --location "West US" --backup-drive-manifest true \
24+
--diagnostics-path "waimportexport" --export blob-path-prefix="/" --job-type "Export" --log-level "Verbose" \
25+
--return-address city="Redmond" country-or-region="USA" email="[email protected]" phone="4250000000" postal-code="98007" recipient-name="Test" state-or-province="wa" street-address1="Street1" street-address2="street2" \
26+
--return-shipping carrier-account-number="989ffff" carrier-name="FedEx" \
27+
--storage-account-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test" \
28+
--name "myExportJob" --resource-group "myResourceGroup"
29+
```
30+
##### Create #####
31+
```
32+
az storageimportexport job create --location "West US" --backup-drive-manifest true \
33+
--diagnostics-path "waimportexport" \
34+
--drive-list bit-locker-key="238810-662376-448998-450120-652806-203390-606320-483076" drive-header-hash="0:1048576:FB6B6ED500D49DA6E0D723C98D42C657F2881CC13357C28DCECA6A524F1292501571A321238540E621AB5BD9C9A32637615919A75593E6CB5C1515DAE341CABF;135266304:143360:C957A189AFC38C4E80731252301EB91427CE55E61448FA3C73C6FDDE70ABBC197947EC8D0249A2C639BB10B95957D5820A4BE8DFBBF76FFFA688AE5CE0D42EC3" drive-id="9CA995BB" manifest-file="\\\\8a0c23f7-14b7-470a-9633-fcd46590a1bc.manifest" manifest-hash="4228EC5D8E048CB9B515338C789314BE8D0B2FDBC7C7A0308E1C826242CDE74E" \
35+
--job-type "Import" --log-level "Verbose" \
36+
--return-address city="Redmond" country-or-region="USA" email="[email protected]" phone="4250000000" postal-code="98007" recipient-name="Test" state-or-province="wa" street-address1="Street1" street-address2="street2" \
37+
--return-shipping carrier-account-number="989ffff" carrier-name="FedEx" \
38+
--storage-account-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.ClassicStorage/storageAccounts/test" \
39+
--name "myJob" --resource-group "myResourceGroup"
40+
```
41+
##### Show #####
42+
```
43+
az storageimportexport job show --name "myJob" --resource-group "myResourceGroup"
44+
```
45+
##### List #####
46+
```
47+
az storageimportexport job list --resource-group "myResourceGroup"
48+
```
49+
##### Show #####
50+
```
51+
az storageimportexport job show --name "myJob" --resource-group "myResourceGroup"
52+
```
53+
##### Update #####
54+
```
55+
az storageimportexport job update --backup-drive-manifest true --log-level "Verbose" --state "" --name "myExportJob" \
56+
--resource-group "myResourceGroup"
57+
```
58+
##### Update #####
59+
```
60+
az storageimportexport job update --backup-drive-manifest true --log-level "Verbose" --state "" --name "myJob" \
61+
--resource-group "myResourceGroup"
62+
```
63+
##### Delete #####
64+
```
65+
az storageimportexport job delete --name "myJob" --resource-group "myResourceGroup"
66+
```
67+
#### storageimportexport bit-locker-key ####
68+
##### List #####
69+
```
70+
az storageimportexport bit-locker-key list --job-name "myJob" --resource-group "myResourceGroup"
71+
```
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_storageimportexport.generated._help import helps # pylint: disable=unused-import
13+
try:
14+
from azext_storageimportexport.manual._help import helps # pylint: disable=reimported
15+
except ImportError:
16+
pass
17+
18+
19+
class StorageImportExportCommandsLoader(AzCommandsLoader):
20+
21+
def __init__(self, cli_ctx=None):
22+
from azure.cli.core.commands import CliCommandType
23+
from azext_storageimportexport.generated._client_factory import cf_storageimportexport_cl
24+
storageimportexport_custom = CliCommandType(
25+
operations_tmpl='azext_storageimportexport.custom#{}',
26+
client_factory=cf_storageimportexport_cl)
27+
parent = super(StorageImportExportCommandsLoader, self)
28+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=storageimportexport_custom)
29+
30+
def load_command_table(self, args):
31+
from azext_storageimportexport.generated.commands import load_command_table
32+
load_command_table(self, args)
33+
try:
34+
from azext_storageimportexport.manual.commands import load_command_table as load_command_table_manual
35+
load_command_table_manual(self, args)
36+
except ImportError:
37+
pass
38+
return self.command_table
39+
40+
def load_arguments(self, command):
41+
from azext_storageimportexport.generated._params import load_arguments
42+
load_arguments(self, command)
43+
try:
44+
from azext_storageimportexport.manual._params import load_arguments as load_arguments_manual
45+
load_arguments_manual(self, command)
46+
except ImportError:
47+
pass
48+
49+
50+
COMMAND_LOADER_CLS = StorageImportExportCommandsLoader
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.15.0"
4+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.custom import * # noqa: F403
14+
try:
15+
from .manual.custom import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
def cf_storageimportexport_cl(cli_ctx, *_):
13+
from azure.cli.core.commands.client_factory import get_mgmt_service_client
14+
from azext_storageimportexport.vendored_sdks.storageimportexport import StorageImportExport
15+
return get_mgmt_service_client(cli_ctx,
16+
StorageImportExport)
17+
18+
19+
def cf_location(cli_ctx, *_):
20+
return cf_storageimportexport_cl(cli_ctx).locations
21+
22+
23+
def cf_job(cli_ctx, *_):
24+
return cf_storageimportexport_cl(cli_ctx).jobs
25+
26+
27+
def cf_bit_locker_key(cli_ctx, *_):
28+
return cf_storageimportexport_cl(cli_ctx).bit_locker_keys

0 commit comments

Comments
 (0)