Skip to content

Commit

Permalink
[AutoRelease] t2-datamigration-2021-08-19-04035 (#20349)
Browse files Browse the repository at this point in the history
* CodeGen from PR 15259 in Azure/azure-rest-api-specs
Dev datamigration microsoft.data migration 2021 06 30 (#15259)

* Created new api version and refactoring changes (such as fixing new build restrictions)

* Adding breaking changes

* Adding location to the services update example

* Adding location for projects update and refactoring the task command

* Resolving tasks command ModelValidation test failure

* Resolving issue based on zhenglaizhang's recommendation

* Adding comma to resolve issue

Co-authored-by: Artem Pavlichenko <[email protected]>

* version,CHANGELOG

Co-authored-by: SDKAuto <[email protected]>
Co-authored-by: Artem Pavlichenko <[email protected]>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
  • Loading branch information
3 people authored Aug 24, 2021
1 parent 3fe8964 commit 3fbb0f9
Show file tree
Hide file tree
Showing 29 changed files with 2,473 additions and 606 deletions.
22 changes: 22 additions & 0 deletions sdk/datamigration/azure-mgmt-datamigration/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Release History

## 10.0.0 (2021-08-19)

**Features**

- Model ConnectToTargetAzureDbForMySqlTaskInput has a new parameter is_offline_migration
- Model MySqlConnectionInfo has a new parameter encrypt_connection
- Model TrackedResource has a new parameter system_data
- Model Project has a new parameter system_data
- Model ApiError has a new parameter system_data
- Model ProjectFile has a new parameter system_data
- Model DataMigrationService has a new parameter system_data
- Model ConnectToSourceMySqlTaskInput has a new parameter is_offline_migration
- Model ProjectTask has a new parameter system_data

**Breaking changes**

- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputError is now required
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutput is now required
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel is now required
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel is now required
- Parameter result_type of model MigrateSchemaSqlTaskOutputError is now required

## 9.0.0 (2021-04-07)

**Features**
Expand Down
1 change: 1 addition & 0 deletions sdk/datamigration/azure-mgmt-datamigration/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
11 changes: 11 additions & 0 deletions sdk/datamigration/azure-mgmt-datamigration/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.4.5",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "850425353115aa23d469f12f44847ff9e8326294",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/datamigration/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.4.5",
"readme": "specification/datamigration/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2018-07-15-preview"
self.api_version = "2021-06-30"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import DataMigrationManagementClientConfiguration
from .operations import ResourceSkusOperations
Expand Down Expand Up @@ -91,6 +92,24 @@ def __init__(
self.files = FilesOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"chosen_version": "2018-07-15-preview",
"total_api_version_list": ["2018-07-15-preview"],
"chosen_version": "2021-06-30",
"total_api_version_list": ["2021-06-30"],
"client": {
"name": "DataMigrationManagementClient",
"filename": "_data_migration_management_client",
Expand All @@ -10,8 +10,8 @@
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataMigrationManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataMigrationManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataMigrationManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataMigrationManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -106,11 +106,5 @@
"usages": "UsagesOperations",
"operations": "Operations",
"files": "FilesOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "9.0.0"
VERSION = "10.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2018-07-15-preview"
self.api_version = "2021-06-30"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand Down Expand Up @@ -88,6 +89,23 @@ def __init__(
self.files = FilesOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def list(
group_name: str,
service_name: str,
project_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.FileList"]:
"""Get files in a project.
Expand All @@ -69,7 +69,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -129,7 +129,7 @@ async def get(
service_name: str,
project_name: str,
file_name: str,
**kwargs
**kwargs: Any
) -> "_models.ProjectFile":
"""Get file information.
Expand All @@ -154,7 +154,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -200,7 +200,7 @@ async def create_or_update(
project_name: str,
file_name: str,
parameters: "_models.ProjectFile",
**kwargs
**kwargs: Any
) -> "_models.ProjectFile":
"""Create a file resource.
Expand All @@ -226,7 +226,7 @@ async def create_or_update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -280,7 +280,7 @@ async def delete(
service_name: str,
project_name: str,
file_name: str,
**kwargs
**kwargs: Any
) -> None:
"""Delete file.
Expand All @@ -304,7 +304,7 @@ async def delete(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -347,7 +347,7 @@ async def update(
project_name: str,
file_name: str,
parameters: "_models.ProjectFile",
**kwargs
**kwargs: Any
) -> "_models.ProjectFile":
"""Update a file.
Expand All @@ -373,7 +373,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -423,7 +423,7 @@ async def read(
service_name: str,
project_name: str,
file_name: str,
**kwargs
**kwargs: Any
) -> "_models.FileStorageInfo":
"""Request storage information for downloading the file content.
Expand All @@ -448,7 +448,7 @@ async def read(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -493,7 +493,7 @@ async def read_write(
service_name: str,
project_name: str,
file_name: str,
**kwargs
**kwargs: Any
) -> "_models.FileStorageInfo":
"""Request information for reading and writing file content.
Expand All @@ -517,7 +517,7 @@ async def read_write(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

# Construct URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:

def list(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.ServiceOperationList"]:
"""Get available resource provider actions (operations).
Expand All @@ -59,7 +59,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2018-07-15-preview"
api_version = "2021-06-30"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down
Loading

0 comments on commit 3fbb0f9

Please sign in to comment.