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] datamigration/resource-manager #2071

Merged
merged 9 commits into from
Apr 20, 2018
Next Next commit
Generated from d76bc8b3f4b0a026864d0e7810fb327bbb5cda18 (#2070)
DataMigration py conf
AutorestCI committed Apr 20, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2e951eb973b5954a99b2ce4e729d8f03b79f23d9
18 changes: 18 additions & 0 deletions azure-mgmt-datamigration/azure/mgmt/datamigration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .data_migration_service_client import DataMigrationServiceClient
from .version import VERSION

__all__ = ['DataMigrationServiceClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# 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 msrest.service_client import ServiceClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.resource_skus_operations import ResourceSkusOperations
from .operations.services_operations import ServicesOperations
from .operations.tasks_operations import TasksOperations
from .operations.projects_operations import ProjectsOperations
from .operations.usages_operations import UsagesOperations
from .operations.operations import Operations
from . import models


class DataMigrationServiceClientConfiguration(AzureConfiguration):
"""Configuration for DataMigrationServiceClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Identifier of the subscription
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(DataMigrationServiceClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-datamigration/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class DataMigrationServiceClient(object):
"""Data Migration Client

:ivar config: Configuration for client.
:vartype config: DataMigrationServiceClientConfiguration

:ivar resource_skus: ResourceSkus operations
:vartype resource_skus: azure.mgmt.datamigration.operations.ResourceSkusOperations
:ivar services: Services operations
:vartype services: azure.mgmt.datamigration.operations.ServicesOperations
:ivar tasks: Tasks operations
:vartype tasks: azure.mgmt.datamigration.operations.TasksOperations
:ivar projects: Projects operations
:vartype projects: azure.mgmt.datamigration.operations.ProjectsOperations
:ivar usages: Usages operations
:vartype usages: azure.mgmt.datamigration.operations.UsagesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.datamigration.operations.Operations

:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: Identifier of the subscription
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = DataMigrationServiceClientConfiguration(credentials, subscription_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2017-11-15-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.resource_skus = ResourceSkusOperations(
self._client, self.config, self._serialize, self._deserialize)
self.services = ServicesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.tasks = TasksOperations(
self._client, self.config, self._serialize, self._deserialize)
self.projects = ProjectsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.usages = UsagesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
220 changes: 220 additions & 0 deletions azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
# 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 .tracked_resource import TrackedResource
from .resource import Resource
from .odata_error import ODataError
from .task_output import TaskOutput
from .validation_error import ValidationError
from .wait_statistics import WaitStatistics
from .execution_statistics import ExecutionStatistics
from .query_execution_result import QueryExecutionResult
from .query_analysis_validation_result import QueryAnalysisValidationResult
from .schema_comparison_validation_result_type import SchemaComparisonValidationResultType
from .schema_comparison_validation_result import SchemaComparisonValidationResult
from .data_integrity_validation_result import DataIntegrityValidationResult
from .migration_validation_database_level_result import MigrationValidationDatabaseLevelResult
from .migration_validation_database_summary_result import MigrationValidationDatabaseSummaryResult
from .migration_validation_result import MigrationValidationResult
from .reportable_exception import ReportableException
from .migrate_sql_server_sql_db_task_output_error import MigrateSqlServerSqlDbTaskOutputError
from .migrate_sql_server_sql_db_task_output_table_level import MigrateSqlServerSqlDbTaskOutputTableLevel
from .data_item_migration_summary_result import DataItemMigrationSummaryResult
from .migrate_sql_server_sql_db_task_output_database_level import MigrateSqlServerSqlDbTaskOutputDatabaseLevel
from .migration_report_result import MigrationReportResult
from .database_summary_result import DatabaseSummaryResult
from .migrate_sql_server_sql_db_task_output_migration_level import MigrateSqlServerSqlDbTaskOutputMigrationLevel
from .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput
from .connection_info import ConnectionInfo
from .sql_connection_info import SqlConnectionInfo
from .sql_migration_task_input import SqlMigrationTaskInput
from .migration_validation_options import MigrationValidationOptions
from .migrate_sql_server_sql_db_database_input import MigrateSqlServerSqlDbDatabaseInput
from .migrate_sql_server_sql_db_task_input import MigrateSqlServerSqlDbTaskInput
from .migrate_sql_server_sql_db_task_properties import MigrateSqlServerSqlDbTaskProperties
from .database_table import DatabaseTable
from .get_user_tables_sql_task_output import GetUserTablesSqlTaskOutput
from .get_user_tables_sql_task_input import GetUserTablesSqlTaskInput
from .get_user_tables_sql_task_properties import GetUserTablesSqlTaskProperties
from .connect_to_target_sql_db_task_output import ConnectToTargetSqlDbTaskOutput
from .connect_to_target_sql_db_task_input import ConnectToTargetSqlDbTaskInput
from .connect_to_target_sql_db_task_properties import ConnectToTargetSqlDbTaskProperties
from .database_file_info import DatabaseFileInfo
from .connect_to_source_sql_server_task_output_database_level import ConnectToSourceSqlServerTaskOutputDatabaseLevel
from .connect_to_source_sql_server_task_output_task_level import ConnectToSourceSqlServerTaskOutputTaskLevel
from .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput
from .connect_to_source_sql_server_task_input import ConnectToSourceSqlServerTaskInput
from .connect_to_source_sql_server_task_properties import ConnectToSourceSqlServerTaskProperties
from .project_task_properties import ProjectTaskProperties
from .project_task import ProjectTask
from .service_sku import ServiceSku
from .data_migration_service import DataMigrationService
from .name_availability_request import NameAvailabilityRequest
from .database_info import DatabaseInfo
from .project import Project
from .api_error import ApiError, ApiErrorException
from .service_operation_display import ServiceOperationDisplay
from .service_operation import ServiceOperation
from .quota_name import QuotaName
from .quota import Quota
from .name_availability_response import NameAvailabilityResponse
from .available_service_sku_sku import AvailableServiceSkuSku
from .available_service_sku_capacity import AvailableServiceSkuCapacity
from .available_service_sku import AvailableServiceSku
from .data_migration_service_status_response import DataMigrationServiceStatusResponse
from .resource_sku_restrictions import ResourceSkuRestrictions
from .resource_sku_capabilities import ResourceSkuCapabilities
from .resource_sku_costs import ResourceSkuCosts
from .resource_sku_capacity import ResourceSkuCapacity
from .resource_sku import ResourceSku
from .database import Database
from .database_object_name import DatabaseObjectName
from .migration_table_metadata import MigrationTableMetadata
from .data_migration_project_metadata import DataMigrationProjectMetadata
from .data_migration_error import DataMigrationError
from .database_file_input import DatabaseFileInput
from .resource_sku_paged import ResourceSkuPaged
from .available_service_sku_paged import AvailableServiceSkuPaged
from .data_migration_service_paged import DataMigrationServicePaged
from .project_task_paged import ProjectTaskPaged
from .project_paged import ProjectPaged
from .quota_paged import QuotaPaged
from .service_operation_paged import ServiceOperationPaged
from .data_migration_service_client_enums import (
ValidationStatus,
Severity,
UpdateActionType,
ObjectType,
MigrationState,
DatabaseMigrationStage,
MigrationStatus,
AuthenticationType,
DatabaseState,
DatabaseCompatLevel,
DatabaseFileType,
ServerLevelPermissionsGroup,
TaskState,
ServiceProvisioningState,
ProjectTargetPlatform,
ProjectSourcePlatform,
ProjectProvisioningState,
NameCheckFailureReason,
ServiceScalability,
ResourceSkuRestrictionsType,
ResourceSkuRestrictionsReasonCode,
ResourceSkuCapacityScaleType,
ErrorType,
)

__all__ = [
'TrackedResource',
'Resource',
'ODataError',
'TaskOutput',
'ValidationError',
'WaitStatistics',
'ExecutionStatistics',
'QueryExecutionResult',
'QueryAnalysisValidationResult',
'SchemaComparisonValidationResultType',
'SchemaComparisonValidationResult',
'DataIntegrityValidationResult',
'MigrationValidationDatabaseLevelResult',
'MigrationValidationDatabaseSummaryResult',
'MigrationValidationResult',
'ReportableException',
'MigrateSqlServerSqlDbTaskOutputError',
'MigrateSqlServerSqlDbTaskOutputTableLevel',
'DataItemMigrationSummaryResult',
'MigrateSqlServerSqlDbTaskOutputDatabaseLevel',
'MigrationReportResult',
'DatabaseSummaryResult',
'MigrateSqlServerSqlDbTaskOutputMigrationLevel',
'MigrateSqlServerSqlDbTaskOutput',
'ConnectionInfo',
'SqlConnectionInfo',
'SqlMigrationTaskInput',
'MigrationValidationOptions',
'MigrateSqlServerSqlDbDatabaseInput',
'MigrateSqlServerSqlDbTaskInput',
'MigrateSqlServerSqlDbTaskProperties',
'DatabaseTable',
'GetUserTablesSqlTaskOutput',
'GetUserTablesSqlTaskInput',
'GetUserTablesSqlTaskProperties',
'ConnectToTargetSqlDbTaskOutput',
'ConnectToTargetSqlDbTaskInput',
'ConnectToTargetSqlDbTaskProperties',
'DatabaseFileInfo',
'ConnectToSourceSqlServerTaskOutputDatabaseLevel',
'ConnectToSourceSqlServerTaskOutputTaskLevel',
'ConnectToSourceSqlServerTaskOutput',
'ConnectToSourceSqlServerTaskInput',
'ConnectToSourceSqlServerTaskProperties',
'ProjectTaskProperties',
'ProjectTask',
'ServiceSku',
'DataMigrationService',
'NameAvailabilityRequest',
'DatabaseInfo',
'Project',
'ApiError', 'ApiErrorException',
'ServiceOperationDisplay',
'ServiceOperation',
'QuotaName',
'Quota',
'NameAvailabilityResponse',
'AvailableServiceSkuSku',
'AvailableServiceSkuCapacity',
'AvailableServiceSku',
'DataMigrationServiceStatusResponse',
'ResourceSkuRestrictions',
'ResourceSkuCapabilities',
'ResourceSkuCosts',
'ResourceSkuCapacity',
'ResourceSku',
'Database',
'DatabaseObjectName',
'MigrationTableMetadata',
'DataMigrationProjectMetadata',
'DataMigrationError',
'DatabaseFileInput',
'ResourceSkuPaged',
'AvailableServiceSkuPaged',
'DataMigrationServicePaged',
'ProjectTaskPaged',
'ProjectPaged',
'QuotaPaged',
'ServiceOperationPaged',
'ValidationStatus',
'Severity',
'UpdateActionType',
'ObjectType',
'MigrationState',
'DatabaseMigrationStage',
'MigrationStatus',
'AuthenticationType',
'DatabaseState',
'DatabaseCompatLevel',
'DatabaseFileType',
'ServerLevelPermissionsGroup',
'TaskState',
'ServiceProvisioningState',
'ProjectTargetPlatform',
'ProjectSourcePlatform',
'ProjectProvisioningState',
'NameCheckFailureReason',
'ServiceScalability',
'ResourceSkuRestrictionsType',
'ResourceSkuRestrictionsReasonCode',
'ResourceSkuCapacityScaleType',
'ErrorType',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 msrest.serialization import Model
from msrest.exceptions import HttpOperationError


class ApiError(Model):
"""Error information.

:param error: Error information in OData format
:type error: ~azure.mgmt.datamigration.models.ODataError
"""

_attribute_map = {
'error': {'key': 'error', 'type': 'ODataError'},
}

def __init__(self, error=None):
super(ApiError, self).__init__()
self.error = error


class ApiErrorException(HttpOperationError):
"""Server responsed with exception of type: 'ApiError'.

:param deserialize: A deserializer
:param response: Server response to be deserialized.
"""

def __init__(self, deserialize, response, *args):

super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args)
Loading