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 databox/resource-manager] DataBox : Swagger and example changes for next version of client DLL #3740

Merged
merged 3 commits into from
Nov 21, 2018
Merged
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
4 changes: 3 additions & 1 deletion azure-mgmt-databox/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include *.rst
include azure_bdist_wheel.py
include azure/__init__.py
include azure/mgmt/__init__.py

2 changes: 1 addition & 1 deletion azure-mgmt-databox/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
2 changes: 1 addition & 1 deletion azure-mgmt-databox/azure/mgmt/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__import__('pkg_resources').declare_namespace(__name__)
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
6 changes: 6 additions & 0 deletions azure-mgmt-databox/azure/mgmt/databox/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
from .data_box_secret_py3 import DataBoxSecret
from .databox_job_secrets_py3 import DataboxJobSecrets
from .destination_account_details_py3 import DestinationAccountDetails
from .destination_managed_disk_details_py3 import DestinationManagedDiskDetails
from .destination_storage_account_details_py3 import DestinationStorageAccountDetails
from .error_py3 import Error
from .job_error_details_py3 import JobErrorDetails
from .job_stages_py3 import JobStages
Expand Down Expand Up @@ -90,6 +92,8 @@
from .data_box_secret import DataBoxSecret
from .databox_job_secrets import DataboxJobSecrets
from .destination_account_details import DestinationAccountDetails
from .destination_managed_disk_details import DestinationManagedDiskDetails
from .destination_storage_account_details import DestinationStorageAccountDetails
from .error import Error
from .job_error_details import JobErrorDetails
from .job_stages import JobStages
Expand Down Expand Up @@ -156,6 +160,8 @@
'DataBoxSecret',
'DataboxJobSecrets',
'DestinationAccountDetails',
'DestinationManagedDiskDetails',
'DestinationStorageAccountDetails',
'Error',
'JobErrorDetails',
'JobStages',
Expand Down
11 changes: 11 additions & 0 deletions azure-mgmt-databox/azure/mgmt/databox/models/copy_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,29 @@ class CopyProgress(Model):
:ivar total_bytes_to_process: Total amount of data to be processed by the
job.
:vartype total_bytes_to_process: long
:ivar files_processed: Number of files processed by the job as of now.
:vartype files_processed: long
:ivar total_files_to_process: Total number of files to be processed by the
job.
:vartype total_files_to_process: long
"""

_validation = {
'storage_account_name': {'readonly': True},
'account_id': {'readonly': True},
'bytes_sent_to_cloud': {'readonly': True},
'total_bytes_to_process': {'readonly': True},
'files_processed': {'readonly': True},
'total_files_to_process': {'readonly': True},
}

_attribute_map = {
'storage_account_name': {'key': 'storageAccountName', 'type': 'str'},
'account_id': {'key': 'accountId', 'type': 'str'},
'bytes_sent_to_cloud': {'key': 'bytesSentToCloud', 'type': 'long'},
'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'},
'files_processed': {'key': 'filesProcessed', 'type': 'long'},
'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'},
}

def __init__(self, **kwargs):
Expand All @@ -50,3 +59,5 @@ def __init__(self, **kwargs):
self.account_id = None
self.bytes_sent_to_cloud = None
self.total_bytes_to_process = None
self.files_processed = None
self.total_files_to_process = None
11 changes: 11 additions & 0 deletions azure-mgmt-databox/azure/mgmt/databox/models/copy_progress_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,29 @@ class CopyProgress(Model):
:ivar total_bytes_to_process: Total amount of data to be processed by the
job.
:vartype total_bytes_to_process: long
:ivar files_processed: Number of files processed by the job as of now.
:vartype files_processed: long
:ivar total_files_to_process: Total number of files to be processed by the
job.
:vartype total_files_to_process: long
"""

_validation = {
'storage_account_name': {'readonly': True},
'account_id': {'readonly': True},
'bytes_sent_to_cloud': {'readonly': True},
'total_bytes_to_process': {'readonly': True},
'files_processed': {'readonly': True},
'total_files_to_process': {'readonly': True},
}

_attribute_map = {
'storage_account_name': {'key': 'storageAccountName', 'type': 'str'},
'account_id': {'key': 'accountId', 'type': 'str'},
'bytes_sent_to_cloud': {'key': 'bytesSentToCloud', 'type': 'long'},
'total_bytes_to_process': {'key': 'totalBytesToProcess', 'type': 'long'},
'files_processed': {'key': 'filesProcessed', 'type': 'long'},
'total_files_to_process': {'key': 'totalFilesToProcess', 'type': 'long'},
}

def __init__(self, **kwargs) -> None:
Expand All @@ -50,3 +59,5 @@ def __init__(self, **kwargs) -> None:
self.account_id = None
self.bytes_sent_to_cloud = None
self.total_bytes_to_process = None
self.files_processed = None
self.total_files_to_process = None
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class ShareDestinationFormatType(str, Enum):
block_blob = "BlockBlob" #: Azure storage block blob format.
page_blob = "PageBlob" #: Azure storage page blob format.
azure_file = "AzureFile" #: Azure storage file format.
managed_disk = "ManagedDisk" #: Azure Compute Disk.


class AccessProtocol(str, Enum):
Expand Down Expand Up @@ -52,9 +53,10 @@ class SkuDisabledReason(str, Enum):

none = "None" #: SKU is not disabled.
country = "Country" #: SKU is not available in the requested country.
region = "Region" #: SKU is not available to push data to the requested storage account region.
region = "Region" #: SKU is not available to push data to the requested Azure region.
feature = "Feature" #: Required features are not enabled for the SKU.
offer_type = "OfferType" #: Subscription does not have required offer types for the SKU.
no_subscription_info = "NoSubscriptionInfo" #: Subscription has not registered to Microsoft.DataBox and Service does not have the subscription notification.


class NotificationStageName(str, Enum):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,35 @@


class DestinationAccountDetails(Model):
"""Details for the destination account.
"""Details of the destination of the data.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: DestinationManagedDiskDetails,
DestinationStorageAccountDetails

All required parameters must be populated in order to send to Azure.

:param account_id: Required. Destination storage account id.
:param account_id: Arm Id of the destination where the data has to be
moved.
:type account_id: str
:param data_destination_type: Required. Constant filled by server.
:type data_destination_type: str
"""

_validation = {
'account_id': {'required': True},
'data_destination_type': {'required': True},
}

_attribute_map = {
'account_id': {'key': 'accountId', 'type': 'str'},
'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'},
}

_subtype_map = {
'data_destination_type': {'ManagedDisk': 'DestinationManagedDiskDetails', 'StorageAccount': 'DestinationStorageAccountDetails'}
}

def __init__(self, **kwargs):
super(DestinationAccountDetails, self).__init__(**kwargs)
self.account_id = kwargs.get('account_id', None)
self.data_destination_type = None
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,35 @@


class DestinationAccountDetails(Model):
"""Details for the destination account.
"""Details of the destination of the data.

You probably want to use the sub-classes and not this class directly. Known
sub-classes are: DestinationManagedDiskDetails,
DestinationStorageAccountDetails

All required parameters must be populated in order to send to Azure.

:param account_id: Required. Destination storage account id.
:param account_id: Arm Id of the destination where the data has to be
moved.
:type account_id: str
:param data_destination_type: Required. Constant filled by server.
:type data_destination_type: str
"""

_validation = {
'account_id': {'required': True},
'data_destination_type': {'required': True},
}

_attribute_map = {
'account_id': {'key': 'accountId', 'type': 'str'},
'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'},
}

_subtype_map = {
'data_destination_type': {'ManagedDisk': 'DestinationManagedDiskDetails', 'StorageAccount': 'DestinationStorageAccountDetails'}
}

def __init__(self, *, account_id: str, **kwargs) -> None:
def __init__(self, *, account_id: str=None, **kwargs) -> None:
super(DestinationAccountDetails, self).__init__(**kwargs)
self.account_id = account_id
self.data_destination_type = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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.
# --------------------------------------------------------------------------

from .destination_account_details import DestinationAccountDetails


class DestinationManagedDiskDetails(DestinationAccountDetails):
"""Details for the destination compute disks.

All required parameters must be populated in order to send to Azure.

:param account_id: Arm Id of the destination where the data has to be
moved.
:type account_id: str
:param data_destination_type: Required. Constant filled by server.
:type data_destination_type: str
:param resource_group_id: Required. Destination Resource Group Id where
the Compute disks should be created.
:type resource_group_id: str
:param staging_storage_account_id: Required. Arm Id of the storage account
that can be used to copy the vhd for staging.
:type staging_storage_account_id: str
"""

_validation = {
'data_destination_type': {'required': True},
'resource_group_id': {'required': True},
'staging_storage_account_id': {'required': True},
}

_attribute_map = {
'account_id': {'key': 'accountId', 'type': 'str'},
'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'},
'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'},
'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DestinationManagedDiskDetails, self).__init__(**kwargs)
self.resource_group_id = kwargs.get('resource_group_id', None)
self.staging_storage_account_id = kwargs.get('staging_storage_account_id', None)
self.data_destination_type = 'ManagedDisk'
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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.
# --------------------------------------------------------------------------

from .destination_account_details_py3 import DestinationAccountDetails


class DestinationManagedDiskDetails(DestinationAccountDetails):
"""Details for the destination compute disks.

All required parameters must be populated in order to send to Azure.

:param account_id: Arm Id of the destination where the data has to be
moved.
:type account_id: str
:param data_destination_type: Required. Constant filled by server.
:type data_destination_type: str
:param resource_group_id: Required. Destination Resource Group Id where
the Compute disks should be created.
:type resource_group_id: str
:param staging_storage_account_id: Required. Arm Id of the storage account
that can be used to copy the vhd for staging.
:type staging_storage_account_id: str
"""

_validation = {
'data_destination_type': {'required': True},
'resource_group_id': {'required': True},
'staging_storage_account_id': {'required': True},
}

_attribute_map = {
'account_id': {'key': 'accountId', 'type': 'str'},
'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'},
'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'},
'staging_storage_account_id': {'key': 'stagingStorageAccountId', 'type': 'str'},
}

def __init__(self, *, resource_group_id: str, staging_storage_account_id: str, account_id: str=None, **kwargs) -> None:
super(DestinationManagedDiskDetails, self).__init__(account_id=account_id, **kwargs)
self.resource_group_id = resource_group_id
self.staging_storage_account_id = staging_storage_account_id
self.data_destination_type = 'ManagedDisk'
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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.
# --------------------------------------------------------------------------

from .destination_account_details import DestinationAccountDetails


class DestinationStorageAccountDetails(DestinationAccountDetails):
"""Details for the destination storage account.

All required parameters must be populated in order to send to Azure.

:param account_id: Arm Id of the destination where the data has to be
moved.
:type account_id: str
:param data_destination_type: Required. Constant filled by server.
:type data_destination_type: str
:param storage_account_id: Required. Destination Storage Account Arm Id.
:type storage_account_id: str
"""

_validation = {
'data_destination_type': {'required': True},
'storage_account_id': {'required': True},
}

_attribute_map = {
'account_id': {'key': 'accountId', 'type': 'str'},
'data_destination_type': {'key': 'dataDestinationType', 'type': 'str'},
'storage_account_id': {'key': 'storageAccountId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(DestinationStorageAccountDetails, self).__init__(**kwargs)
self.storage_account_id = kwargs.get('storage_account_id', None)
self.data_destination_type = 'StorageAccount'
Loading