Skip to content

Commit ee4b0f3

Browse files
[AutoRelease] t2-sitemanager-2025-08-29-73765(can only be merged by SDK owner) (#42780)
* code and test * update version --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent d59f7b2 commit ee4b0f3

40 files changed

+324
-281
lines changed

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

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

3+
## 1.0.0 (2025-09-04)
4+
5+
### Features Added
6+
7+
- Client `SiteManagerMgmtClient` added optional signature `cloud_setting` in method `__init__`
8+
9+
### Other Changes
10+
11+
- First GA
12+
313
## 1.0.0b1 (2025-05-15)
414

515
### Other Changes
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
include _meta.json
2-
recursive-include tests *.py *.json
3-
recursive-include samples *.py *.md
41
include *.md
5-
include azure/__init__.py
6-
include azure/mgmt/__init__.py
72
include LICENSE
83
include azure/mgmt/sitemanager/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/mgmt/__init__.py
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"commit": "64a54347ebef32101bd1fcd29d23476b4b838bba",
2+
"apiVersion": "2025-06-01",
3+
"commit": "14849ffc5bc0c78ba942bcafa05e19e6162bb089",
34
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
45
"typespec_src": "specification/edge/Microsoft.Edge.Sites.Management",
5-
"@azure-tools/typespec-python": "0.44.2"
6+
"emitterVersion": "0.49.0"
67
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from .operations import SitesByServiceGroupOperations, SitesBySubscriptionOperations, SitesOperations
2323

2424
if TYPE_CHECKING:
25+
from azure.core import AzureClouds
2526
from azure.core.credentials import TokenCredential
2627

2728

@@ -41,19 +42,27 @@ class SiteManagerMgmtClient:
4142
:type subscription_id: str
4243
:param base_url: Service host. Default value is None.
4344
:type base_url: str
44-
:keyword api_version: The API version to use for this operation. Default value is
45-
"2025-03-01-preview". Note that overriding this default value may result in unsupported
46-
behavior.
45+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
46+
None.
47+
:paramtype cloud_setting: ~azure.core.AzureClouds
48+
:keyword api_version: The API version to use for this operation. Default value is "2025-06-01".
49+
Note that overriding this default value may result in unsupported behavior.
4750
:paramtype api_version: str
4851
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4952
Retry-After header is present.
5053
"""
5154

5255
def __init__(
53-
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
56+
self,
57+
credential: "TokenCredential",
58+
subscription_id: str,
59+
base_url: Optional[str] = None,
60+
*,
61+
cloud_setting: Optional["AzureClouds"] = None,
62+
**kwargs: Any
5463
) -> None:
5564
_endpoint = "{endpoint}"
56-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
65+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
5766
_endpoints = get_arm_endpoints(_cloud)
5867
if not base_url:
5968
base_url = _endpoints["resource_manager"]
@@ -62,6 +71,7 @@ def __init__(
6271
credential=credential,
6372
subscription_id=subscription_id,
6473
base_url=cast(str, base_url),
74+
cloud_setting=cloud_setting,
6575
credential_scopes=credential_scopes,
6676
**kwargs
6777
)

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import Any, TYPE_CHECKING
9+
from typing import Any, Optional, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1313

1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17+
from azure.core import AzureClouds
1718
from azure.core.credentials import TokenCredential
1819

1920

@@ -29,9 +30,11 @@ class SiteManagerMgmtClientConfiguration: # pylint: disable=too-many-instance-a
2930
:type subscription_id: str
3031
:param base_url: Service host. Default value is "https://management.azure.com".
3132
:type base_url: str
32-
:keyword api_version: The API version to use for this operation. Default value is
33-
"2025-03-01-preview". Note that overriding this default value may result in unsupported
34-
behavior.
33+
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
34+
None.
35+
:type cloud_setting: ~azure.core.AzureClouds
36+
:keyword api_version: The API version to use for this operation. Default value is "2025-06-01".
37+
Note that overriding this default value may result in unsupported behavior.
3538
:paramtype api_version: str
3639
"""
3740

@@ -40,9 +43,10 @@ def __init__(
4043
credential: "TokenCredential",
4144
subscription_id: str,
4245
base_url: str = "https://management.azure.com",
46+
cloud_setting: Optional["AzureClouds"] = None,
4347
**kwargs: Any
4448
) -> None:
45-
api_version: str = kwargs.pop("api_version", "2025-03-01-preview")
49+
api_version: str = kwargs.pop("api_version", "2025-06-01")
4650

4751
if credential is None:
4852
raise ValueError("Parameter 'credential' must not be None.")
@@ -52,6 +56,7 @@ def __init__(
5256
self.credential = credential
5357
self.subscription_id = subscription_id
5458
self.base_url = base_url
59+
self.cloud_setting = cloud_setting
5560
self.api_version = api_version
5661
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5762
kwargs.setdefault("sdk_moniker", "mgmt-sitemanager/{}".format(VERSION))

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
88
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
99
"""
10-
from typing import List
1110

12-
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
11+
12+
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level
1313

1414

1515
def patch_sdk():

0 commit comments

Comments
 (0)