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

[AutoPR storageimportexport] Dev storageimportexport microsoft.import export 2016 11 01 #145

Open
wants to merge 1 commit into
base: sdkAutomation/storageimportexport
Choose a base branch
from
Open
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/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.
5 changes: 5 additions & 0 deletions src/storageimportexport/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Microsoft Azure CLI 'storageimportexport' Extension
==========================================

This package is for the 'storageimportexport' extension.
i.e. 'az storageimportexport'
46 changes: 46 additions & 0 deletions src/storageimportexport/azext_storageimportexport/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# --------------------------------------------------------------------------
# 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


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
storageimportexport_custom = CliCommandType(
operations_tmpl='azext_storageimportexport.custom#{}',
client_factory=cf_storageimportexport)
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.3.1"
}
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,27 @@
# --------------------------------------------------------------------------
# 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(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from ..vendored_sdks.storageimportexport import StorageImportExport
return get_mgmt_service_client(cli_ctx, StorageImportExport)


def cf_location(cli_ctx, *_):
return cf_storageimportexport(cli_ctx).location


def cf_job(cli_ctx, *_):
return cf_storageimportexport(cli_ctx).job


def cf_bit_locker_key(cli_ctx, *_):
return cf_storageimportexport(cli_ctx).bit_locker_key
248 changes: 248 additions & 0 deletions src/storageimportexport/azext_storageimportexport/generated/_help.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
# --------------------------------------------------------------------------
# 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=too-many-lines

from knack.help_files import helps


helps['storageimportexport location'] = """
type: group
short-summary: storageimportexport location
"""

helps['storageimportexport location list'] = """
type: command
short-summary: Returns a list of locations to which you can ship the disks associated with an import or export job.\
A location is a Microsoft data center region.
examples:
- name: List locations
text: |-
az storageimportexport location list
"""

helps['storageimportexport location show'] = """
type: command
short-summary: Returns the details about a location to which you can ship the disks associated with an import or ex\
port job. A location is an Azure region.
examples:
- name: Get locations
text: |-
az storageimportexport location show --name "West US"
"""

helps['storageimportexport job'] = """
type: group
short-summary: storageimportexport job
"""

helps['storageimportexport job list'] = """
type: command
short-summary: Returns all active and completed jobs in a subscription.
examples:
- name: List jobs in a resource group
text: |-
az storageimportexport job list --resource-group "myResourceGroup"
"""

helps['storageimportexport job show'] = """
type: command
short-summary: Gets information about an existing job.
examples:
- name: Get job
text: |-
az storageimportexport job show --name "myJob" --resource-group "myResourceGroup"
"""

helps['storageimportexport job create'] = """
type: command
short-summary: Creates a new job or updates an existing job in the specified subscription.
parameters:
- name: --return-address
short-summary: Specifies the return address information for the job.
long-summary: |
Usage: --return-address recipient-name=XX street-address1=XX street-address2=XX city=XX state-or-province=X\
X postal-code=XX country-or-region=XX phone=XX email=XX

recipient-name: Required. The name of the recipient who will receive the hard drives when they are returned\
.
street-address1: Required. The first line of the street address to use when returning the drives.
street-address2: The second line of the street address to use when returning the drives.
city: Required. The city name to use when returning the drives.
state-or-province: The state or province to use when returning the drives.
postal-code: Required. The postal code to use when returning the drives.
country-or-region: Required. The country or region to use when returning the drives.
phone: Required. Phone number of the recipient of the returned drives.
email: Required. Email address of the recipient of the returned drives.
- name: --return-shipping
short-summary: Specifies the return carrier and customer's account with the carrier.
long-summary: |
Usage: --return-shipping carrier-name=XX carrier-account-number=XX

carrier-name: Required. The carrier's name.
carrier-account-number: Required. The customer's account number with the carrier.
- name: --shipping-information
short-summary: Contains information about the Microsoft datacenter to which the drives should be shipped.
long-summary: |
Usage: --shipping-information recipient-name=XX street-address1=XX street-address2=XX city=XX state-or-prov\
ince=XX postal-code=XX country-or-region=XX phone=XX

recipient-name: Required. The name of the recipient who will receive the hard drives when they are returned\
.
street-address1: Required. The first line of the street address to use when returning the drives.
street-address2: The second line of the street address to use when returning the drives.
city: Required. The city name to use when returning the drives.
state-or-province: Required. The state or province to use when returning the drives.
postal-code: Required. The postal code to use when returning the drives.
country-or-region: Required. The country or region to use when returning the drives.
phone: Phone number of the recipient of the returned drives.
- name: --delivery-package
short-summary: Contains information about the package being shipped by the customer to the Microsoft data cente\
r.
long-summary: |
Usage: --delivery-package carrier-name=XX tracking-number=XX drive-count=XX ship-date=XX

carrier-name: Required. The name of the carrier that is used to ship the import or export drives.
tracking-number: Required. The tracking number of the package.
drive-count: Required. The number of drives included in the package.
ship-date: Required. The date when the package is shipped.
- name: --return-package
short-summary: Contains information about the package being shipped from the Microsoft data center to the custo\
mer to return the drives. The format is the same as the deliveryPackage property above. This property is not included i\
f the drives have not yet been returned.
long-summary: |
Usage: --return-package carrier-name=XX tracking-number=XX drive-count=XX ship-date=XX

carrier-name: Required. The name of the carrier that is used to ship the import or export drives.
tracking-number: Required. The tracking number of the package.
drive-count: Required. The number of drives included in the package.
ship-date: Required. The date when the package is shipped.
- name: --drive-list
short-summary: List of up to ten drives that comprise the job. The drive list is a required element for an impo\
rt job; it is not specified for export jobs.
long-summary: |
Usage: --drive-list drive-id=XX bit-locker-key=XX manifest-file=XX manifest-hash=XX drive-header-hash=XX st\
ate=XX copy-status=XX percent-complete=XX verbose-log-uri=XX error-log-uri=XX manifest-uri=XX bytes-succeeded=XX

drive-id: The drive's hardware serial number, without spaces.
bit-locker-key: The BitLocker key used to encrypt the drive.
manifest-file: The relative path of the manifest file on the drive.
manifest-hash: The Base16-encoded MD5 hash of the manifest file on the drive.
drive-header-hash: The drive header hash value.
state: The drive's current state.
copy-status: Detailed status about the data transfer process. This field is not returned in the response un\
til the drive is in the Transferring state.
percent-complete: Percentage completed for the drive.
verbose-log-uri: A URI that points to the blob containing the verbose log for the data transfer operation.
error-log-uri: A URI that points to the blob containing the error log for the data transfer operation.
manifest-uri: A URI that points to the blob containing the drive manifest file.
bytes-succeeded: Bytes successfully transferred for the drive.

Multiple actions can be specified by using more than one --drive-list argument.
examples:
- name: Create job
text: |-
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-ty\
pe "Import" --log-level "Verbose" --return-address city="Redmond" country-or-region="USA" email="Test@contoso.com" phon\
e="4250000000" postal-code="98007" recipient-name="Tets" state-or-province="wa" street-address1="Street1" street-addres\
s2="street2" --storage-account-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/p\
roviders/Microsoft.ClassicStorage/storageAccounts/test" --name "myJob" --resource-group "myResourceGroup"
"""

helps['storageimportexport job update'] = """
type: command
short-summary: Updates specific properties of a job. You can call this operation to notify the Import/Export servic\
e that the hard drives comprising the import or export job have been shipped to the Microsoft data center. It can also \
be used to cancel an existing job.
parameters:
- name: --return-address
short-summary: Specifies the return address information for the job.
long-summary: |
Usage: --return-address recipient-name=XX street-address1=XX street-address2=XX city=XX state-or-province=X\
X postal-code=XX country-or-region=XX phone=XX email=XX

recipient-name: Required. The name of the recipient who will receive the hard drives when they are returned\
.
street-address1: Required. The first line of the street address to use when returning the drives.
street-address2: The second line of the street address to use when returning the drives.
city: Required. The city name to use when returning the drives.
state-or-province: The state or province to use when returning the drives.
postal-code: Required. The postal code to use when returning the drives.
country-or-region: Required. The country or region to use when returning the drives.
phone: Required. Phone number of the recipient of the returned drives.
email: Required. Email address of the recipient of the returned drives.
- name: --return-shipping
short-summary: Specifies the return carrier and customer's account with the carrier.
long-summary: |
Usage: --return-shipping carrier-name=XX carrier-account-number=XX

carrier-name: Required. The carrier's name.
carrier-account-number: Required. The customer's account number with the carrier.
- name: --delivery-package
short-summary: Contains information about the package being shipped by the customer to the Microsoft data cente\
r.
long-summary: |
Usage: --delivery-package carrier-name=XX tracking-number=XX drive-count=XX ship-date=XX

carrier-name: Required. The name of the carrier that is used to ship the import or export drives.
tracking-number: Required. The tracking number of the package.
drive-count: Required. The number of drives included in the package.
ship-date: Required. The date when the package is shipped.
- name: --drive-list
short-summary: List of drives that comprise the job.
long-summary: |
Usage: --drive-list drive-id=XX bit-locker-key=XX manifest-file=XX manifest-hash=XX drive-header-hash=XX st\
ate=XX copy-status=XX percent-complete=XX verbose-log-uri=XX error-log-uri=XX manifest-uri=XX bytes-succeeded=XX

drive-id: The drive's hardware serial number, without spaces.
bit-locker-key: The BitLocker key used to encrypt the drive.
manifest-file: The relative path of the manifest file on the drive.
manifest-hash: The Base16-encoded MD5 hash of the manifest file on the drive.
drive-header-hash: The drive header hash value.
state: The drive's current state.
copy-status: Detailed status about the data transfer process. This field is not returned in the response un\
til the drive is in the Transferring state.
percent-complete: Percentage completed for the drive.
verbose-log-uri: A URI that points to the blob containing the verbose log for the data transfer operation.
error-log-uri: A URI that points to the blob containing the error log for the data transfer operation.
manifest-uri: A URI that points to the blob containing the drive manifest file.
bytes-succeeded: Bytes successfully transferred for the drive.

Multiple actions can be specified by using more than one --drive-list argument.
examples:
- name: Update job
text: |-
az storageimportexport job update --backup-drive-manifest true --log-level "Verbose" --state "" --name "\
myJob" --resource-group "myResourceGroup"
"""

helps['storageimportexport job delete'] = """
type: command
short-summary: Deletes an existing job. Only jobs in the Creating or Completed states can be deleted.
examples:
- name: Delete job
text: |-
az storageimportexport job delete --name "myJob" --resource-group "myResourceGroup"
"""

helps['storageimportexport bit-locker-key'] = """
type: group
short-summary: storageimportexport bit-locker-key
"""

helps['storageimportexport bit-locker-key list'] = """
type: command
short-summary: Returns the BitLocker Keys for all drives in the specified job.
examples:
- name: List BitLocker Keys for drives in a job
text: |-
az storageimportexport bit-locker-key list --job-name "myJob" --resource-group "myResourceGroup"
"""
Loading