Skip to content

Commit ebdf177

Browse files
author
SDKAuto
committed
CodeGen from PR 31076 in Azure/azure-rest-api-specs
Merge 5644ce64bc79f90b6ac3eb886df551db69d485e3 into abe3209e7c6924a58ab560ebab2349bc8fde6aa7
1 parent 2c98e7e commit ebdf177

31 files changed

+3734
-13551
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "c1cea38fb7e5cec9afe223a2ed15cbe2fbeecbdb",
2+
"commit": "690388dc9446708deec6509d4b882a4b275990dc",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/azurefleet/AzureFleet.Management",
5-
"@azure-tools/typespec-python": "0.26.0"
5+
"@azure-tools/typespec-python": "0.36.0"
66
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
__all__ = [
2222
"ComputeFleetMgmtClient",
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/computefleet/azure-mgmt-computefleet/azure/mgmt/computefleet/_client.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,10 @@
2020
from .operations import FleetsOperations, Operations
2121

2222
if TYPE_CHECKING:
23-
# pylint: disable=unused-import,ungrouped-imports
2423
from azure.core.credentials import TokenCredential
2524

2625

27-
class ComputeFleetMgmtClient: # pylint: disable=client-accepts-api-version-keyword
26+
class ComputeFleetMgmtClient:
2827
"""ComputeFleetMgmtClient.
2928
3029
:ivar operations: Operations operations
@@ -37,9 +36,8 @@ class ComputeFleetMgmtClient: # pylint: disable=client-accepts-api-version-keyw
3736
:type subscription_id: str
3837
:param base_url: Service host. Default value is "https://management.azure.com".
3938
:type base_url: str
40-
:keyword api_version: The API version to use for this operation. Default value is
41-
"2024-05-01-preview". Note that overriding this default value may result in unsupported
42-
behavior.
39+
:keyword api_version: The API version to use for this operation. Default value is "2024-11-01".
40+
Note that overriding this default value may result in unsupported behavior.
4341
:paramtype api_version: str
4442
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4543
Retry-After header is present.
@@ -52,8 +50,9 @@ def __init__(
5250
base_url: str = "https://management.azure.com",
5351
**kwargs: Any
5452
) -> None:
53+
_endpoint = "{endpoint}"
5554
self._config = ComputeFleetMgmtClientConfiguration(
56-
credential=credential, subscription_id=subscription_id, **kwargs
55+
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
5756
)
5857
_policies = kwargs.pop("policies", None)
5958
if _policies is None:
@@ -73,7 +72,7 @@ def __init__(
7372
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7473
self._config.http_logging_policy,
7574
]
76-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
75+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
7776

7877
self._serialize = Serializer()
7978
self._deserialize = Deserializer()
@@ -100,7 +99,11 @@ def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
10099
"""
101100

102101
request_copy = deepcopy(request)
103-
request_copy.url = self._client.format_url(request_copy.url)
102+
path_format_arguments = {
103+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
104+
}
105+
106+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
104107
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
105108

106109
def close(self) -> None:

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
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

21-
class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for ComputeFleetMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,14 +27,21 @@ class ComputeFleetMgmtClientConfiguration: # pylint: disable=too-many-instance-
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
: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-05-01-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-11-01".
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-05-01-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-11-01")
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-computefleet/{}".format(VERSION))

0 commit comments

Comments
 (0)