Skip to content

Commit e744c71

Browse files
[AutoRelease] t2-devopsinfrastructure-2024-10-17-69763(can only be merged by SDK owner) (#37959)
* code and test * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md * update-testcase * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com>
1 parent 5771ed1 commit e744c71

51 files changed

Lines changed: 2456 additions & 6333 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Release History
22

3+
## 1.0.0 (2024-11-21)
4+
5+
### Features Added
6+
7+
- Model `Quota` added property `unit`
8+
- Model `Quota` added property `current_value`
9+
- Model `Quota` added property `limit`
10+
- Operation group `SubscriptionUsagesOperations` added method `usages`
11+
12+
### Breaking Changes
13+
14+
- Enum `ManagedServiceIdentityType` renamed its value `SYSTEM_AND_USER_ASSIGNED` to `SYSTEM_ASSIGNED_USER_ASSIGNED`
15+
- Enum `OsDiskStorageAccountType` renamed its value `STANDARD_S_S_D` to `STANDARD_SSD`
16+
- Model `Quota` deleted or renamed its instance variable `properties`
17+
- Model `Quota` deleted or renamed its instance variable `type`
18+
- Model `Quota` deleted or renamed its instance variable `system_data`
19+
- Deleted or renamed enum value `StorageAccountType.PREMIUM_L_R_S`
20+
- Deleted or renamed enum value `StorageAccountType.PREMIUM_Z_R_S`
21+
- Deleted or renamed enum value `StorageAccountType.STANDARD_L_R_S`
22+
- Deleted or renamed enum value `StorageAccountType.STANDARD_S_S_D_L_R_S`
23+
- Deleted or renamed enum value `StorageAccountType.STANDARD_S_S_D_Z_R_S`
24+
- Deleted or renamed model `ActionType`
25+
- Deleted or renamed model `Operation`
26+
- Deleted or renamed model `OperationDisplay`
27+
- Deleted or renamed model `Origin`
28+
- Deleted or renamed model `QuotaProperties`
29+
- Deleted or renamed method `SubscriptionUsagesOperations.list_by_location`
30+
331
## 1.0.0b1 (2024-05-29)
432

533
- Initial version
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
2-
"commit": "53bed2dccf392c14a412735c38a0f55645812294",
2+
"commit": "95e89f00932d2a8f04ff80e28f8ce10ee586ca7d",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"typespec_src": "specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure",
5-
"@azure-tools/typespec-python": "0.23.12",
6-
"@autorest/python": "6.13.17"
4+
"typespec_src": "specification/devopsinfrastructure/Microsoft.DevOpsInfrastructure.Management",
5+
"@azure-tools/typespec-python": "0.36.0"
76
}

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

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

sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
__all__ = [
2222
"DevOpsInfrastructureMgmtClient",
2323
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
24+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2525

2626
_patch_sdk()

sdk/devopsinfrastructure/azure-mgmt-devopsinfrastructure/azure/mgmt/devopsinfrastructure/_client.py

Lines changed: 14 additions & 10 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
@@ -26,11 +27,10 @@
2627
)
2728

2829
if TYPE_CHECKING:
29-
# pylint: disable=unused-import,ungrouped-imports
3030
from azure.core.credentials import TokenCredential
3131

3232

33-
class DevOpsInfrastructureMgmtClient: # pylint: disable=client-accepts-api-version-keyword
33+
class DevOpsInfrastructureMgmtClient:
3434
"""DevOpsInfrastructureMgmtClient.
3535
3636
:ivar operations: Operations operations
@@ -48,13 +48,12 @@ class DevOpsInfrastructureMgmtClient: # pylint: disable=client-accepts-api-vers
4848
:vartype image_versions: azure.mgmt.devopsinfrastructure.operations.ImageVersionsOperations
4949
:param credential: Credential used to authenticate requests to the service. Required.
5050
:type credential: ~azure.core.credentials.TokenCredential
51-
:param subscription_id: The ID of the target subscription. Required.
51+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5252
:type subscription_id: str
5353
:param base_url: Service host. Default value is "https://management.azure.com".
5454
:type base_url: str
55-
:keyword api_version: The API version to use for this operation. Default value is
56-
"2024-04-04-preview". Note that overriding this default value may result in unsupported
57-
behavior.
55+
:keyword api_version: The API version to use for this operation. Default value is "2024-10-19".
56+
Note that overriding this default value may result in unsupported behavior.
5857
:paramtype api_version: str
5958
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
6059
Retry-After header is present.
@@ -67,8 +66,9 @@ def __init__(
6766
base_url: str = "https://management.azure.com",
6867
**kwargs: Any
6968
) -> None:
69+
_endpoint = "{endpoint}"
7070
self._config = DevOpsInfrastructureMgmtClientConfiguration(
71-
credential=credential, subscription_id=subscription_id, **kwargs
71+
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
7272
)
7373
_policies = kwargs.pop("policies", None)
7474
if _policies is None:
@@ -88,7 +88,7 @@ def __init__(
8888
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
8989
self._config.http_logging_policy,
9090
]
91-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
91+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
9292

9393
self._serialize = Serializer()
9494
self._deserialize = Deserializer()
@@ -123,13 +123,17 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
123123
"""
124124

125125
request_copy = deepcopy(request)
126-
request_copy.url = self._client.format_url(request_copy.url)
126+
path_format_arguments = {
127+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
128+
}
129+
130+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
127131
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
128132

129133
def close(self) -> None:
130134
self._client.close()
131135

132-
def __enter__(self) -> "DevOpsInfrastructureMgmtClient":
136+
def __enter__(self) -> Self:
133137
self._client.__enter__()
134138
return self
135139

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

@@ -26,16 +25,23 @@ class DevOpsInfrastructureMgmtClientConfiguration: # pylint: disable=too-many-i
2625
2726
:param credential: Credential used to authenticate requests to the service. Required.
2827
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: The ID of the target subscription. Required.
28+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: The API version to use for this operation. Default value is
32-
"2024-04-04-preview". Note that overriding this default value may result in unsupported
33-
behavior.
30+
:param base_url: Service host. Default value is "https://management.azure.com".
31+
:type base_url: str
32+
:keyword api_version: The API version to use for this operation. Default value is "2024-10-19".
33+
Note that overriding this default value may result in unsupported behavior.
3434
:paramtype api_version: str
3535
"""
3636

37-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38-
api_version: str = kwargs.pop("api_version", "2024-04-04-preview")
37+
def __init__(
38+
self,
39+
credential: "TokenCredential",
40+
subscription_id: str,
41+
base_url: str = "https://management.azure.com",
42+
**kwargs: Any
43+
) -> None:
44+
api_version: str = kwargs.pop("api_version", "2024-10-19")
3945

4046
if credential is None:
4147
raise ValueError("Parameter 'credential' must not be None.")
@@ -44,6 +50,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4450

4551
self.credential = credential
4652
self.subscription_id = subscription_id
53+
self.base_url = base_url
4754
self.api_version = api_version
4855
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4956
kwargs.setdefault("sdk_moniker", "mgmt-devopsinfrastructure/{}".format(VERSION))

0 commit comments

Comments
 (0)