Skip to content

Commit 6f83fe5

Browse files
azure-sdkmsyycChenxiJiang333
authored
[AutoRelease] t2-sql-2024-08-27-86175(can only be merged by SDK owner) (Azure#37048)
* code and test * Update CHANGELOG.md * Update CHANGELOG.md * Delete sdk/sql/azure-mgmt-sql/assets.json * update-testcases * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: Yuchao Yan <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 77b15b5 commit 6f83fe5

File tree

955 files changed

+33396
-9196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

955 files changed

+33396
-9196
lines changed

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

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

3+
## 4.0.0b19 (2024-09-09)
4+
5+
### Features Added
6+
7+
- The 'ReplicationLinksOperations' method 'begin_create_or_update' was added in the current version
8+
- The 'ReplicationLinksOperations' method 'begin_update' was added in the current version
9+
- The model or publicly exposed class 'ColumnDataType' had property 'INT' added in the current version
10+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had property 'target_database' added in the current version
11+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had property 'source_endpoint' added in the current version
12+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had property 'primary_availability_group_name' added in the current version
13+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had property 'secondary_availability_group_name' added in the current version
14+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had property 'source_replica_id' added in the current version
15+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had property 'target_replica_id' added in the current version
16+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had property 'link_state' added in the current version
17+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had property 'last_hardened_lsn' added in the current version
18+
- The model or publicly exposed class 'FailoverGroup' had property 'secondary_type' added in the current version
19+
- The model or publicly exposed class 'FailoverGroupUpdate' had property 'secondary_type' added in the current version
20+
- The model or publicly exposed class 'ManagedInstance' had property 'storage_iops' added in the current version
21+
- The model or publicly exposed class 'ManagedInstance' had property 'storage_throughput_mbps' added in the current version
22+
- The model or publicly exposed class 'ManagedInstanceUpdate' had property 'storage_iops' added in the current version
23+
- The model or publicly exposed class 'ManagedInstanceUpdate' had property 'storage_throughput_mbps' added in the current version
24+
- The model or publicly exposed class 'ReplicationLink' had property 'partner_database_id' added in the current version
25+
- The model or publicly exposed class 'FailoverGroupDatabasesSecondaryType' was added in the current version
26+
- The model or publicly exposed class 'ReplicationLinkUpdate' was added in the current version
27+
- The model or publicly exposed class 'ReplicationMode' was added in the current version
28+
- The 'ReplicationLinksOperations' method 'begin_create_or_update' was added in the current version
29+
- The 'ReplicationLinksOperations' method 'begin_update' was added in the current version
30+
31+
### Breaking Changes
32+
33+
- The 'DistributedAvailabilityGroupsOperations' method 'begin_failover' was deleted or renamed in the current version
34+
- The 'DistributedAvailabilityGroupsOperations' method 'begin_set_role' was deleted or renamed in the current version
35+
- The 'ColumnDataType' enum had its value 'INT_ENUM' deleted or renamed in the current version
36+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'distributed_availability_group_name' deleted or renamed in the current version
37+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'partner_link_role' deleted or renamed in the current version
38+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'partner_availability_group_name' deleted or renamed in the current version
39+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'partner_endpoint' deleted or renamed in the current version
40+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'instance_link_role' deleted or renamed in the current version
41+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'instance_availability_group_name' deleted or renamed in the current version
42+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'failover_mode' deleted or renamed in the current version
43+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'seeding_mode' deleted or renamed in the current version
44+
- The model or publicly exposed class 'DistributedAvailabilityGroup' had its instance variable 'databases' deleted or renamed in the current version
45+
- The model or publicly exposed class 'ManagedInstance' had its instance variable 'storage_i_ops' deleted or renamed in the current version
46+
- The model or publicly exposed class 'ManagedInstance' had its instance variable 'storage_throughput_m_bps' deleted or renamed in the current version
47+
- The model or publicly exposed class 'ManagedInstanceUpdate' had its instance variable 'storage_i_ops' deleted or renamed in the current version
48+
- The model or publicly exposed class 'ManagedInstanceUpdate' had its instance variable 'storage_throughput_m_bps' deleted or renamed in the current version
49+
- The model or publicly exposed class 'CertificateInfo' was deleted or renamed in the current version
50+
- The model or publicly exposed class 'DistributedAvailabilityGroupDatabase' was deleted or renamed in the current version
51+
- The model or publicly exposed class 'DistributedAvailabilityGroupSetRole' was deleted or renamed in the current version
52+
- The model or publicly exposed class 'DistributedAvailabilityGroupsFailoverRequest' was deleted or renamed in the current version
53+
- The model or publicly exposed class 'FailoverModeType' was deleted or renamed in the current version
54+
- The model or publicly exposed class 'FailoverType' was deleted or renamed in the current version
55+
- The model or publicly exposed class 'InstanceRole' was deleted or renamed in the current version
56+
- The model or publicly exposed class 'LinkRole' was deleted or renamed in the current version
57+
- The model or publicly exposed class 'ReplicaConnectedState' was deleted or renamed in the current version
58+
- The model or publicly exposed class 'ReplicaSynchronizationHealth' was deleted or renamed in the current version
59+
- The model or publicly exposed class 'ReplicationModeType' was deleted or renamed in the current version
60+
- The model or publicly exposed class 'RoleChangeType' was deleted or renamed in the current version
61+
- The model or publicly exposed class 'SeedingModeType' was deleted or renamed in the current version
62+
- The 'DistributedAvailabilityGroupsOperations' method 'begin_failover' was deleted or renamed in the current version
63+
- The 'DistributedAvailabilityGroupsOperations' method 'begin_set_role' was deleted or renamed in the current version
64+
365
## 4.0.0b18 (2024-07-11)
466

567
### Bugs Fixed

sdk/sql/azure-mgmt-sql/_meta.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "33c4457b1d13f83965f4fe3367dca4a6df898100",
2+
"commit": "fa6609332acece21de44c0bf885cbcb3d87bd01f",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.7",
6+
"@autorest/python@6.19.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/sql/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.13.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/sql/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/sql/resource-manager/readme.md"
1111
}

sdk/sql/azure-mgmt-sql/assets.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_serialization.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def _json_attemp(data):
144144
# context otherwise.
145145
_LOGGER.critical("Wasn't XML not JSON, failing")
146146
raise DeserializationError("XML is invalid") from err
147+
elif content_type.startswith("text/"):
148+
return data_as_str
147149
raise DeserializationError("Cannot deserialize content-type: {}".format(content_type))
148150

149151
@classmethod
@@ -1441,7 +1443,7 @@ def _deserialize(self, target_obj, data):
14411443
elif isinstance(response, type) and issubclass(response, Enum):
14421444
return self.deserialize_enum(data, response)
14431445

1444-
if data is None:
1446+
if data is None or data is CoreNull:
14451447
return data
14461448
try:
14471449
attributes = response._attribute_map # type: ignore

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_sql_management_client.py

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

99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
@@ -483,8 +484,6 @@ class SqlManagementClient: # pylint: disable=client-accepts-api-version-keyword
483484
ManagedInstanceAdvancedThreatProtectionSettingsOperations operations
484485
:vartype managed_instance_advanced_threat_protection_settings:
485486
azure.mgmt.sql.operations.ManagedInstanceAdvancedThreatProtectionSettingsOperations
486-
:ivar replication_links: ReplicationLinksOperations operations
487-
:vartype replication_links: azure.mgmt.sql.operations.ReplicationLinksOperations
488487
:ivar managed_database_move_operations: ManagedDatabaseMoveOperationsOperations operations
489488
:vartype managed_database_move_operations:
490489
azure.mgmt.sql.operations.ManagedDatabaseMoveOperationsOperations
@@ -598,6 +597,8 @@ class SqlManagementClient: # pylint: disable=client-accepts-api-version-keyword
598597
:vartype managed_instances: azure.mgmt.sql.operations.ManagedInstancesOperations
599598
:ivar servers: ServersOperations operations
600599
:vartype servers: azure.mgmt.sql.operations.ServersOperations
600+
:ivar replication_links: ReplicationLinksOperations operations
601+
:vartype replication_links: azure.mgmt.sql.operations.ReplicationLinksOperations
601602
:param credential: Credential needed for the client to connect to Azure. Required.
602603
:type credential: ~azure.core.credentials.TokenCredential
603604
:param subscription_id: The subscription ID that identifies an Azure subscription. Required.
@@ -936,9 +937,6 @@ def __init__(
936937
self._client, self._config, self._serialize, self._deserialize
937938
)
938939
)
939-
self.replication_links = ReplicationLinksOperations(
940-
self._client, self._config, self._serialize, self._deserialize
941-
)
942940
self.managed_database_move_operations = ManagedDatabaseMoveOperationsOperations(
943941
self._client, self._config, self._serialize, self._deserialize
944942
)
@@ -1048,6 +1046,9 @@ def __init__(
10481046
self._client, self._config, self._serialize, self._deserialize
10491047
)
10501048
self.servers = ServersOperations(self._client, self._config, self._serialize, self._deserialize)
1049+
self.replication_links = ReplicationLinksOperations(
1050+
self._client, self._config, self._serialize, self._deserialize
1051+
)
10511052

10521053
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
10531054
"""Runs the network request through the client's chained policies.
@@ -1074,7 +1075,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
10741075
def close(self) -> None:
10751076
self._client.close()
10761077

1077-
def __enter__(self) -> "SqlManagementClient":
1078+
def __enter__(self) -> Self:
10781079
self._client.__enter__()
10791080
return self
10801081

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_vendor.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/_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 = "4.0.0b18"
9+
VERSION = "4.0.0b19"

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_patch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#
2626
# --------------------------------------------------------------------------
2727

28+
2829
# This file is used for handwritten extensions to the generated code. Example:
2930
# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md
3031
def patch_sdk():

sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/_sql_management_client.py

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

99
from copy import deepcopy
1010
from typing import Any, Awaitable, TYPE_CHECKING
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import AsyncHttpResponse, HttpRequest
@@ -488,8 +489,6 @@ class SqlManagementClient: # pylint: disable=client-accepts-api-version-keyword
488489
ManagedInstanceAdvancedThreatProtectionSettingsOperations operations
489490
:vartype managed_instance_advanced_threat_protection_settings:
490491
azure.mgmt.sql.aio.operations.ManagedInstanceAdvancedThreatProtectionSettingsOperations
491-
:ivar replication_links: ReplicationLinksOperations operations
492-
:vartype replication_links: azure.mgmt.sql.aio.operations.ReplicationLinksOperations
493492
:ivar managed_database_move_operations: ManagedDatabaseMoveOperationsOperations operations
494493
:vartype managed_database_move_operations:
495494
azure.mgmt.sql.aio.operations.ManagedDatabaseMoveOperationsOperations
@@ -604,6 +603,8 @@ class SqlManagementClient: # pylint: disable=client-accepts-api-version-keyword
604603
:vartype managed_instances: azure.mgmt.sql.aio.operations.ManagedInstancesOperations
605604
:ivar servers: ServersOperations operations
606605
:vartype servers: azure.mgmt.sql.aio.operations.ServersOperations
606+
:ivar replication_links: ReplicationLinksOperations operations
607+
:vartype replication_links: azure.mgmt.sql.aio.operations.ReplicationLinksOperations
607608
:param credential: Credential needed for the client to connect to Azure. Required.
608609
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
609610
:param subscription_id: The subscription ID that identifies an Azure subscription. Required.
@@ -942,9 +943,6 @@ def __init__(
942943
self._client, self._config, self._serialize, self._deserialize
943944
)
944945
)
945-
self.replication_links = ReplicationLinksOperations(
946-
self._client, self._config, self._serialize, self._deserialize
947-
)
948946
self.managed_database_move_operations = ManagedDatabaseMoveOperationsOperations(
949947
self._client, self._config, self._serialize, self._deserialize
950948
)
@@ -1054,6 +1052,9 @@ def __init__(
10541052
self._client, self._config, self._serialize, self._deserialize
10551053
)
10561054
self.servers = ServersOperations(self._client, self._config, self._serialize, self._deserialize)
1055+
self.replication_links = ReplicationLinksOperations(
1056+
self._client, self._config, self._serialize, self._deserialize
1057+
)
10571058

10581059
def _send_request(
10591060
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
@@ -1082,7 +1083,7 @@ def _send_request(
10821083
async def close(self) -> None:
10831084
await self._client.close()
10841085

1085-
async def __aenter__(self) -> "SqlManagementClient":
1086+
async def __aenter__(self) -> Self:
10861087
await self._client.__aenter__()
10871088
return self
10881089

0 commit comments

Comments
 (0)