Skip to content

Commit 2a0efb8

Browse files
Azure CLI BotSDKAutoArtem Pavlichenko
authored and
hodd
committed
[AutoRelease] t2-datamigration-2021-08-19-04035 (Azure#20349)
* CodeGen from PR 15259 in Azure/azure-rest-api-specs Dev datamigration microsoft.data migration 2021 06 30 (Azure#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>
1 parent e523e30 commit 2a0efb8

29 files changed

+2473
-606
lines changed

sdk/datamigration/azure-mgmt-datamigration/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Release History
22

3+
## 10.0.0 (2021-08-19)
4+
5+
**Features**
6+
7+
- Model ConnectToTargetAzureDbForMySqlTaskInput has a new parameter is_offline_migration
8+
- Model MySqlConnectionInfo has a new parameter encrypt_connection
9+
- Model TrackedResource has a new parameter system_data
10+
- Model Project has a new parameter system_data
11+
- Model ApiError has a new parameter system_data
12+
- Model ProjectFile has a new parameter system_data
13+
- Model DataMigrationService has a new parameter system_data
14+
- Model ConnectToSourceMySqlTaskInput has a new parameter is_offline_migration
15+
- Model ProjectTask has a new parameter system_data
16+
17+
**Breaking changes**
18+
19+
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputError is now required
20+
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutput is now required
21+
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputMigrationLevel is now required
22+
- Parameter result_type of model MigrateSchemaSqlServerSqlDbTaskOutputDatabaseLevel is now required
23+
- Parameter result_type of model MigrateSchemaSqlTaskOutputError is now required
24+
325
## 9.0.0 (2021-04-07)
426

527
**Features**

sdk/datamigration/azure-mgmt-datamigration/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "850425353115aa23d469f12f44847ff9e8326294",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"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",
10+
"readme": "specification/datamigration/resource-manager/readme.md"
11+
}

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2018-07-15-preview"
51+
self.api_version = "2021-06-30"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION))
5454
self._configure(**kwargs)

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_data_migration_management_client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import DataMigrationManagementClientConfiguration
2122
from .operations import ResourceSkusOperations
@@ -91,6 +92,24 @@ def __init__(
9192
self.files = FilesOperations(
9293
self._client, self._config, self._serialize, self._deserialize)
9394

95+
def _send_request(self, http_request, **kwargs):
96+
# type: (HttpRequest, Any) -> HttpResponse
97+
"""Runs the network request through the client's chained policies.
98+
99+
:param http_request: The network request you want to make. Required.
100+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
101+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
102+
:return: The response of your network call. Does not do error handling on your response.
103+
:rtype: ~azure.core.pipeline.transport.HttpResponse
104+
"""
105+
path_format_arguments = {
106+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
107+
}
108+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
109+
stream = kwargs.pop("stream", True)
110+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
111+
return pipeline_response.http_response
112+
94113
def close(self):
95114
# type: () -> None
96115
self._client.close()

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_metadata.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "2018-07-15-preview",
3-
"total_api_version_list": ["2018-07-15-preview"],
2+
"chosen_version": "2021-06-30",
3+
"total_api_version_list": ["2021-06-30"],
44
"client": {
55
"name": "DataMigrationManagementClient",
66
"filename": "_data_migration_management_client",
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"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\"]}}}",
14-
"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\"]}}}"
13+
"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\"]}}}",
14+
"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\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -106,11 +106,5 @@
106106
"usages": "UsagesOperations",
107107
"operations": "Operations",
108108
"files": "FilesOperations"
109-
},
110-
"operation_mixins": {
111-
"sync_imports": "None",
112-
"async_imports": "None",
113-
"operations": {
114-
}
115109
}
116110
}

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "9.0.0"
9+
VERSION = "10.0.0"

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2018-07-15-preview"
48+
self.api_version = "2021-06-30"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-datamigration/{}'.format(VERSION))
5151
self._configure(**kwargs)

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/_data_migration_management_client.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -88,6 +89,23 @@ def __init__(
8889
self.files = FilesOperations(
8990
self._client, self._config, self._serialize, self._deserialize)
9091

92+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
93+
"""Runs the network request through the client's chained policies.
94+
95+
:param http_request: The network request you want to make. Required.
96+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
97+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
98+
:return: The response of your network call. Does not do error handling on your response.
99+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
100+
"""
101+
path_format_arguments = {
102+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
103+
}
104+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
105+
stream = kwargs.pop("stream", True)
106+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
107+
return pipeline_response.http_response
108+
91109
async def close(self) -> None:
92110
await self._client.close()
93111

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_files_operations.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def list(
4646
group_name: str,
4747
service_name: str,
4848
project_name: str,
49-
**kwargs
49+
**kwargs: Any
5050
) -> AsyncIterable["_models.FileList"]:
5151
"""Get files in a project.
5252
@@ -69,7 +69,7 @@ def list(
6969
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
7070
}
7171
error_map.update(kwargs.pop('error_map', {}))
72-
api_version = "2018-07-15-preview"
72+
api_version = "2021-06-30"
7373
accept = "application/json"
7474

7575
def prepare_request(next_link=None):
@@ -129,7 +129,7 @@ async def get(
129129
service_name: str,
130130
project_name: str,
131131
file_name: str,
132-
**kwargs
132+
**kwargs: Any
133133
) -> "_models.ProjectFile":
134134
"""Get file information.
135135
@@ -154,7 +154,7 @@ async def get(
154154
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
155155
}
156156
error_map.update(kwargs.pop('error_map', {}))
157-
api_version = "2018-07-15-preview"
157+
api_version = "2021-06-30"
158158
accept = "application/json"
159159

160160
# Construct URL
@@ -200,7 +200,7 @@ async def create_or_update(
200200
project_name: str,
201201
file_name: str,
202202
parameters: "_models.ProjectFile",
203-
**kwargs
203+
**kwargs: Any
204204
) -> "_models.ProjectFile":
205205
"""Create a file resource.
206206
@@ -226,7 +226,7 @@ async def create_or_update(
226226
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
227227
}
228228
error_map.update(kwargs.pop('error_map', {}))
229-
api_version = "2018-07-15-preview"
229+
api_version = "2021-06-30"
230230
content_type = kwargs.pop("content_type", "application/json")
231231
accept = "application/json"
232232

@@ -280,7 +280,7 @@ async def delete(
280280
service_name: str,
281281
project_name: str,
282282
file_name: str,
283-
**kwargs
283+
**kwargs: Any
284284
) -> None:
285285
"""Delete file.
286286
@@ -304,7 +304,7 @@ async def delete(
304304
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
305305
}
306306
error_map.update(kwargs.pop('error_map', {}))
307-
api_version = "2018-07-15-preview"
307+
api_version = "2021-06-30"
308308
accept = "application/json"
309309

310310
# Construct URL
@@ -347,7 +347,7 @@ async def update(
347347
project_name: str,
348348
file_name: str,
349349
parameters: "_models.ProjectFile",
350-
**kwargs
350+
**kwargs: Any
351351
) -> "_models.ProjectFile":
352352
"""Update a file.
353353
@@ -373,7 +373,7 @@ async def update(
373373
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
374374
}
375375
error_map.update(kwargs.pop('error_map', {}))
376-
api_version = "2018-07-15-preview"
376+
api_version = "2021-06-30"
377377
content_type = kwargs.pop("content_type", "application/json")
378378
accept = "application/json"
379379

@@ -423,7 +423,7 @@ async def read(
423423
service_name: str,
424424
project_name: str,
425425
file_name: str,
426-
**kwargs
426+
**kwargs: Any
427427
) -> "_models.FileStorageInfo":
428428
"""Request storage information for downloading the file content.
429429
@@ -448,7 +448,7 @@ async def read(
448448
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
449449
}
450450
error_map.update(kwargs.pop('error_map', {}))
451-
api_version = "2018-07-15-preview"
451+
api_version = "2021-06-30"
452452
accept = "application/json"
453453

454454
# Construct URL
@@ -493,7 +493,7 @@ async def read_write(
493493
service_name: str,
494494
project_name: str,
495495
file_name: str,
496-
**kwargs
496+
**kwargs: Any
497497
) -> "_models.FileStorageInfo":
498498
"""Request information for reading and writing file content.
499499
@@ -517,7 +517,7 @@ async def read_write(
517517
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
518518
}
519519
error_map.update(kwargs.pop('error_map', {}))
520-
api_version = "2018-07-15-preview"
520+
api_version = "2021-06-30"
521521
accept = "application/json"
522522

523523
# Construct URL

sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/aio/operations/_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4343

4444
def list(
4545
self,
46-
**kwargs
46+
**kwargs: Any
4747
) -> AsyncIterable["_models.ServiceOperationList"]:
4848
"""Get available resource provider actions (operations).
4949
@@ -59,7 +59,7 @@ def list(
5959
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
6060
}
6161
error_map.update(kwargs.pop('error_map', {}))
62-
api_version = "2018-07-15-preview"
62+
api_version = "2021-06-30"
6363
accept = "application/json"
6464

6565
def prepare_request(next_link=None):

0 commit comments

Comments
 (0)